peer enable
Use peer enable to enable BGP to exchange routing information for an address family with a peer or peer group.
Use undo peer enable to disable BGP from exchanging routing information for an address family with a peer or peer group.
Syntax
In BGP IPv4 unicast address family view/BGP-VPN IPv4 unicast address family view/BGP VPNv4 address family view/BGP-VPN VPNv4 address family view/BGP VPNv6 address family view/BGP L2VPN address family view:
peer { group-name | ip-address } enable
undo peer { group-name | ip-address } enable
In BGP IPv6 unicast address family view:
peer { group-name | ipv6-address } enable
undo peer { group-name | ipv6-address } enable
In BGP-VPN IPv6 unicast address family view:
peer { group-name | ipv6-address } enable
undo peer { group-name | ipv6-address } enable
Default
BGP cannot exchange routing information with a peer or peer group.
Views
BGP IPv4 unicast address family view, BGP-VPN IPv4 unicast address family view, BGP-VPNv4 address family view, BGP-VPN VPNv4 address family view, BGP IPv6 unicast address family view, BGP-VPN IPv6 unicast address family view, BGP-VPNv6 address family view, BGP L2VPN address family view
Predefined user roles
network-admin
mdc-admin
Parameters
group-name: Specifies a peer group by its name, a case-sensitive string of 1 to 47 characters. The peer group must have been created.
ip-address: Specifies a peer by its IP address. The peer must have been created.
ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.
Usage guidelines
Executing the peer enable command in different views enables BGP to exchange routing information for the corresponding address families with the specified peer.
In BGP IPv4 unicast address family view, the command enables the capability to exchange IPv4 unicast routing information, and adds the learned routes to the BGP routing table of the public network.
In BGP-VPN IPv4 unicast address family view, the command enables the capability to exchange IPv4 unicast routing information, and adds the learned routes to the BGP routing table of the specified VPN instance.
In BGP VPNv4 address family view, the command enables the capability to exchange VPNv4 routing information. In an MPLS L3VPN network, execute the command on PE devices in BGP VPNv4 address family view.
In BGP-VPN VPNv4 address family view, the command enables the capability to exchange VPNv4 routing information. In a nested VPN network, execute this command on ISP PE devices in BGP-VPN VPNv4 address family view to enable the PE devices to exchange BGP VPNv4 routing information with ISP CEs, and add the VPNv4 routes learned by the PE devices to the routing table of the specified VPN instance.
In BGP IPv6 unicast address family view, the command enables the capability to exchange IPv6 unicast routing information, and adds the learned routes to the IPv6 BGP routing table of the public network.
In BGP-VPN IPv6 unicast address family view, the command enables the capability to exchange IPv6 unicast routing information, and adds the learned routes to the IPv6 BGP routing table of the specified VPN instance.
In BGP VPNv6 address family view, the command enables the capability to exchange VPNv6 routing information. In an IPv6 MPLS L3VPN network, execute the command on PE devices in BGP VPNv6 address family view.
In BGP L2VPN address family view, the command enables the capability to exchange L2VPN information. In an MPLS L2VPN or a VPLS network, execute the command on PE devices in BGP L2VPN address family view.
The undo peer enable command disables BGP to exchange routing information for the corresponding address family with the peer.
Examples
# In BGP IPv4 unicast address family view, enable BGP to exchange IPv4 unicast routing information with peer 1.1.1.1.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp] address-family ipv4 unicast [Sysname-bgp-ipv4] peer 1.1.1.1 enable
# In BGP-VPN IPv4 unicast address family view, enable BGP to exchange IPv4 unicast routing information with peer 1.1.1.1.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp] ip vpn-instance vpn1 [Sysname-bgp-vpn1] address-family ipv4 unicast [Sysname-bgp-ipv4-vpn1] peer 1.1.1.1 enable
# In BGP-VPN IPv6 unicast address family view, enable BGP to exchange IPv6 unicast routing information with peer 1::1.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp] ip vpn-instance vpn1 [Sysname-bgp-vpn1] address-family ipv6 unicast [Sysname-bgp-ipv6-vpn1] peer 1::1 enable
# In BGP L2VPN address family view, enable BGP to exchange L2VPN information with peer 1::1.
<Sysname> system-view [Sysname] bgp 100 [Sysname-bgp] address-family l2vpn [Sysname-bgp-l2vpn] peer 1.1.1.1 enable
Related commands
display bgp peer ipv4 unicast
display bgp peer ipv6 unicast