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 IPv4 multicast address family view:

peer { group-name | ipv4-address [ mask-length ] } enable

undo peer { group-name | ipv4-address [ mask-length ] } enable

In BGP IPv6 unicast address family view:

peer { group-name | ipv6-address [ prefix-length ] } enable

undo peer { group-name | ipv6-address [ prefix-length ] } enable

BGP LS address family view:

peer { group-name | ipv6-address [ prefix-length ] } enable

undo peer { group-name | ipv6-address [ prefix-length ] } enable

In BGP-VPN IPv6 unicast address family view/BGP IPv6 multicast address family view:

peer { group-name | ipv6-address [ prefix-length ] } enable

undo peer { group-name | ipv6-address [ prefix-length ] } 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 IPv6 unicast address family view

BGP LS address family view

BGP-VPN IPv6 unicast address family view

BGP IPv4 multicast address family view

BGP IPv6 multicast address family view

Predefined user roles

network-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.

ipv4-address: Specifies a peer by its IPv4 address. The peer must have been created.

mask-length: Specifies a mask length in the range of 0 to 32. You can use the ipv4-address and mask-length arguments together to specify a subnet. If you specify a subnet in this command, BGP exchanges routing information for an address family with all dynamic peers in the subnet.

ipv6-address: Specifies a peer by its IPv6 address. The peer must have been created.

prefix-length: Specifies a prefix length in the range of 0 to 128. You can use the ipv6-address and prefix-length arguments together to specify a subnet. If you specify a subnet in this command, BGP exchanges routing information for an address family with all dynamic peers in the subnet.

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.

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-default] address-family ipv4 unicast
[Sysname-bgp-default-ipv4] peer 1.1.1.1 enable

Related commands

display bgp peer