The peer enable command enables the specified peer or peer group to exchange route information in the address family view.
The undo peer enable command disables the specified peer or peer group to exchange route information in the address family view.
By default, only the peer in the BGP IPv4 unicast address family view is automatically enabled.
peer { group-name | ipv4-address | ipv6-address } enable
undo peer { group-name | ipv4-address | ipv6-address } enable
| Parameter | Description | Value |
|---|---|---|
| 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 | Specifies the IPv4 address of the peer. | It is in dotted decimal notation. |
| ipv6-address | Specifies the IPv6 address of the peer. | It is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
ipv4-address is valid only in the BGP view, BGP-IPv4 unicast address family view, BGP-VPN-Target address family view, BGP-IPv6 unicast address family view.
ipv6-address is valid only in the BGP-IPv6 unicast address family view.
BGP view, BGP-L2VPN address family view, BGP-VPNv4 address family view, BGP-VPNv6 address family view, BGP-IPv4 unicast address family view, BGP-IPv6 unicast address family view, BGP-VPN-Target address family view
Only the AntiDDoS8000 series support BGP-VPNv6 address family view.
Usage Scenario
By default, only peers in the BGP IPv4 unicast address family are automatically enabled. After the peer as-number command is used in the BGP view, the system automatically runs the peer enable command to enable a peer. In other address family view, however, a peer must be enabled manually.
After the undo default ipv4-unicast command is run, the peer enable command needs to be run in the BGP view or the BGP-IPv4 unicast address family view to enable the IPv4 unicast address family for the created BGP peer.
Prerequisites
The peer as-number command has been used to create a peer or peer group.
Precautions
Enabling or disabling a BGP peer in an address family, for example, running the peer enable command or the undo peer enable command in a VPNv4 address family, causes teardown and re-establishment of the BGP connection of the peer in other address families.
To configure a 6PE device to send labeled routes, specify an IPv4 unicast address for the peer of the device in the IPv6 unicast address family view.
# Prohibit the exchange of the IPv4 route information with the specified peers.
<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.2 as-number 200
[sysname-bgp] ipv4-family unicast
[sysname-bgp-af-ipv4] undo peer 1.1.1.2 enable
# Enable the exchange of the BGP-VPNv4 route information with the specified peers.
<sysname> system-view
[sysname] bgp 100
[sysname-bgp] peer 1.1.1.2 as-number 100
[sysname-bgp] ipv4-family vpnv4
[sysname-bgp-af-vpnv4] peer 1.1.1.2 enable