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.

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