The peer group command adds a peer to a peer group.
The undo peer group command deletes a peer.
By default, no peer group is created.
peer { ipv4-address | ipv6-address } group group-name
undo peer { ipv4-address | ipv6-address } group group-name
| Parameter | Description | Value |
|---|---|---|
ipv4-address |
Specifies the IPv4 address of the peer. |
- |
ipv6-address |
Specifies the IPv6 address of the peer. |
- |
group-name |
Specifies the name of the peer group. |
The name is a string of 1 to 47 characters without any space. It is case-sensitive. |
ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN-Target address family view, BGP-VPN instance IPv4 address family view, BGP-VPNv4 address family view
ipv6-address is valid only in the BGP-IPv6 unicast address family view and BGP-VPN instance IPv6 address family view.
BGP view, BGP-VPNv4 address family view, BGP-VPN instance IPv4 address family view, BGP-VPN instance IPv6 address family view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN-Target address family view
Usage Scenario
On a large-scale BGP network, there are a large number of peers and many of them have the same routing policies. To configure these peers, you have to repeatedly use some commands. In such a case, configuring peer groups can simplify configurations. If you intend to perform the same configuration on several peers, create and configure a peer group. Then, add the peers to the peer group. The peers will inherit the configurations of the peer group.
Configuration Impact
After the peer group command is run, BGP peers are added to a specified peer group.
Precautions
If a peer group has no AS number, all peers that are added to the peer group keep their own AS numbers. if a peer group has an AS number, the peers added to the peer group must have the same AS number with the peer group.
The members of a peer group can be configured with different route receiving and advertising policies.
The undo peer group command has the same function with the undo peer command and the undo peer enable command.
To enable a peer to inherit the configurations of a peer group in an address family view, add the peer to the peer group in the address family view.
# Create an IBGP peer group named test, and add one peer to the peer group.
<sysnamesystem-view
[sysname] bgp 100
[sysname-bgp] group test internal
[sysname-bgp] peer 1.1.1.1 group test
# Create a peer group named test, and add a peer to the peer group.
<sysname> system-view
[sysname] bgp 100
[sysname-bgp] group test external
[sysname-bgp] peer 1:2::3:4 as-number 200
[sysname-bgp] ipv6-family
[sysname-bgp-af-ipv6] peer test enable
[sysname-bgp-af-ipv6] peer 1:2::3:4 group test