You can associate BGP neighbors with a BGP4+ peer group. All of the attributes that are allowed on a neighbor are also allowed on a peer group.
An attribute value configured for a neighbor takes precedence over the attribute value configured for a peer group. The default attribute is used if the neither the peer group nor the neighbor has the attribute configured.
The following are the constraints when configuring a BGP Peer Group.
Once you have added a neighbor of a particular address family (IPv4 or IPv6), you cannot add a neighbor of the other address family. For example, if you have added a neighbor with IPv6 address to a peer group, you can only add IPv6 neighbors to this peer group. When you try to add a neighbor with a different address family, either of the following messages displays.
%Error: Peer Group is already associated with an IPv4 neighbor, can not be associated with IPv6 neighbor %Error: Peer Group is already associated with an IPv6 neighbor, can not be associated with IPv4 neighbor
The error message depends on the IP address family of neighbors already associated with this peer group.
The following warning will display when you add a neighbor to a peer group for the first time. This example message displays when adding the first IPv6 neighbor to a peer group.
%Warning:Please activate Peer-group for IPv6 address-family in default-vrf. IPv4 address-family is disabled for this peer group
The following message will display when you remove the last configured IPv6 BGP neighbor from the peer group and the peer group is empty. You can then add a BGP neighbor of any address family to it.
%Warning: IPv4 address-family is enabled for this peer group