neighbor peer-group (assigning members)
To configure a BGP neighbor to be a member of a peer group, use the neighbor peer-group command in address family or router configuration mode. To remove the neighbor from the peer group, use the no form of this command.
neighbor {ip-address | ipv6-address} peer-group peer-group-name
no neighbor {ip-address | ipv6-address} peer-group peer-group-name
Syntax Description
ip-address
|
IP address of the BGP neighbor that belongs to the peer group specified by the peer-group-name argument.
|
ipv6-address
|
IPv6 address of the BGP neighbor that belongs to the peer group specified by the peer-group-name argument.
|
peer-group-name
|
Name of the BGP peer group to which this neighbor belongs.
|
Defaults
There are no BGP neighbors in a peer group.
Command Modes
Address family
Router configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
12.0(7)T
|
Address family configuration mode was added.
|
12.2(2)T
|
Support for IPv6 was added.
|
12.2(25)SG
|
This command was integrated into Cisco IOS Release 12.2(25)SG.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Cisco IOS XE Release 2.1
|
This command was introduced on Cisco ASR 1000 Series Routers.
|
Usage Guidelines
The neighbor at the IP address indicated inherits all the configured options of the peer group.
Note Using the
no form of the
neighbor peer-group command removes all of the BGP configuration for that neighbor, not just the peer group association.
Examples
The following router configuration mode example assigns three neighbors to the peer group named internal:
neighbor internal peer-group
neighbor internal remote-as 100
neighbor internal update-source loopback 0
neighbor internal route-map set-med out
neighbor internal filter-list 1 out
neighbor internal filter-list 2 in
neighbor 172.16.232.53 peer-group internal
neighbor 172.16.232.54 peer-group internal
neighbor 172.16.232.55 peer-group internal
neighbor 172.16.232.55 filter-list 3 in
The following address family configuration mode example assigns three neighbors to the peer group named internal:
address-family ipv4 unicast
neighbor internal peer-group
neighbor internal remote-as 100
neighbor internal update-source loopback 0
neighbor internal route-map set-med out
neighbor internal filter-list 1 out
neighbor internal filter-list 2 in
neighbor 172.16.232.53 peer-group internal
neighbor 172.16.232.54 peer-group internal
neighbor 172.16.232.55 peer-group internal
neighbor 172.16.232.55 filter-list 3 in
Related Commands
Command
|
Description
|
address-family ipv4 (BGP)
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.
|
address-family vpnv4
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.
|
neighbor peer-group (creating)
|
Creates a BGP peer group.
|
neighbor shutdown
|
Disables a neighbor or peer group.
|
neighbor peer-group (creating)
To create a BGP or multiprotocol BGP peer group, use the neighbor peer-group command in address family or router configuration mode. To remove the peer group and all of its members, use the no form of this command.
neighbor peer-group-name peer-group
no neighbor peer-group-name peer-group
Syntax Description
peer-group-name
|
Name of the BGP peer group.
|
Defaults
There is no BGP peer group.
Command Modes
Router configuration
Command History
Release
|
Modification
|
11.0
|
This command was introduced.
|
11.1(20)CC
|
The nlri unicast, nlri multicast, and nlri unicast multicast keywords were added.
|
12.0(2)S
|
The nlri unicast, nlri multicast, and nlri unicast multicast keywords were added.
|
12.0(7)T
|
The nlri unicast, nlri multicast, and nlri unicast multicast keywords were removed.
Address family configuration mode was added.
|
12.2(25)SG
|
This command was integrated into Cisco IOS Release 12.2(25)SG.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends on your feature set, platform, and platform hardware.
|
Usage Guidelines
Often in a BGP or multiprotocol BGP speaker, many neighbors are configured with the same update policies (that is, same outbound route maps, distribute lists, filter lists, update source, and so on). Neighbors with the same update policies can be grouped into peer groups to simplify configuration and make update calculation more efficient.
Note Peer group members can span multiple logical IP subnets, and can transmit, or pass along, routes from one peer group member to another.
Once a peer group is created with the neighbor peer-group command, it can be configured with the neighbor commands. By default, members of the peer group inherit all the configuration options of the peer group. Members also can be configured to override the options that do not affect outbound updates.
All the peer group members will inherit the current configuration as well as changes made to the peer group. Peer group members will always inherit the following configuration options by default:
•
remote-as (if configured)
•
version
•
update-source
•
outbound route-maps
•
outbound filter-lists
•
outbound distribute-lists
•
minimum-advertisement-interval
•
next-hop-self
If a peer group is not configured with a remote-as option, the members can be configured with the neighbor {ip-address | peer-group-name} remote-ascommand. This command allows you to create peer groups containing external BGP (eBGP) neighbors.
Examples
The following example configurations show how to create these types of neighbor peer group:
•
internal Border Gateway Protocol (iBGP) peer group
•
eBGP peer group
•
Multiprotocol BGP peer group
iBGP Peer Group
In the following example, the peer group named internal configures the members of the peer group to be iBGP neighbors. By definition, this is an iBGP peer group because the router bgp command and the neighbor remote-as command indicate the same autonomous system (in this case, autonomous system 100). All the peer group members use loopback 0 as the update source and use set-med as the outbound route map. The neighbor internalfilter-list 2 in command shows that, except for 172.16.232.55, all the neighbors have filter list 2 as the inbound filter list.
neighbor internal peer-group
neighbor internal remote-as 100
neighbor internal update-source loopback 0
neighbor internal route-map set-med out
neighbor internal filter-list 1 out
neighbor internal filter-list 2 in
neighbor 172.16.232.53 peer-group internal
neighbor 172.16.232.54 peer-group internal
neighbor 172.16.232.55 peer-group internal
neighbor 172.16.232.55 filter-list 3 in
eBGP Peer Group
The following example defines the peer group named external-peers without the neighbor remote-as command. By definition, this is an eBGP peer group because each individual member of the peer group is configured with its respective autonomous system number separately. Thus the peer group consists of members from autonomous systems 200, 300, and 400. All the peer group members have the set-metric route map as an outbound route map and filter list 99 as an outbound filter list. Except for neighbor 172.16.232.110, all of them have 101 as the inbound filter list.
neighbor external-peers peer-group
neighbor external-peers route-map set-metric out
neighbor external-peers filter-list 99 out
neighbor external-peers filter-list 101 in
neighbor 172.16.232.90 remote-as 200
neighbor 172.16.232.90 peer-group external-peers
neighbor 172.16.232.100 remote-as 300
neighbor 172.16.232.100 peer-group external-peers
neighbor 172.16.232.110 remote-as 400
neighbor 172.16.232.110 peer-group external-peers
neighbor 172.16.232.110 filter-list 400 in
Multiprotocol BGP Peer Group
In the following example, all members of the peer group are multicast-capable:
neighbor 10.1.1.1 remote-as 1
neighbor 172.16.2.2 remote-as 2
address-family ipv4 multicast
neighbor mygroup peer-group
neighbor 10.1.1.1 peer-group mygroup
neighbor 172.16.2.2 peer-group mygroup
neighbor 10.1.1.1 activate
neighbor 172.16.2.2 activate
Related Commands
Command
|
Description
|
address-family ipv4 (BGP)
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard IPv4 address prefixes.
|
address-family vpnv4
|
Places the router in address family configuration mode for configuring routing sessions such as BGP, RIP, or static routing sessions that use standard VPNv4 address prefixes.
|
clear ip bgp peer-group
|
Removes all the members of a BGP peer group.
|
show ip bgp peer-group
|
Displays information about BGP peer groups.
|