peer ignore

Use peer ignore to disable BGP session establishment with a peer or peer group.

Use undo peer ignore to enable BGP session establishment with a peer or peer group.

Syntax

peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ignore [ graceful graceful-time { community { community-number | aa:nn } | local-preference preference | med med } * ]

undo peer { group-name | ipv4-address [ mask-length ] | ipv6-address [ prefix-length ] } ignore

Default

BGP can establish a session to a peer or peer group.

Views

BGP instance view

BGP-VPN instance 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 tears down sessions to 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 tears down sessions to all dynamic peers in the subnet.

graceful graceful-time: Gracefully shuts down the session to a peer or peer group in the specified graceful shutdown period of time. The value range for the graceful-time argument is 60 to 65535 seconds. If you do not specify this option, the command shuts down the session to the peer or peer group immediately.

community { community-number | aa:nn }: Specifies the community attribute for advertised routes. The community-number argument represents the community sequence number in the range of 1 to 4294967295. The aa:nn argument represents the community number. Both aa and nn are in the range of 0 to 65535. If you do not specify this option, the command does not change the community attribute for advertised routes.

local-preference preference: Specifies the local preference for advertised routes, in the range of 0 to 4294967295. A larger value represents a higher preference. If you do not specify this option, the command does not change the local preference for advertised routes.

med med: Specifies the MED value for advertised routes, in the range of 0 to 4294967295. The smaller the MED value, the higher the route priority. If you do not specify this option, the command does not change the MED value for advertised routes.

Usage guidelines

This command enables you to temporarily tear down the BGP session to a peer or peer group. You can perform network upgrade and maintenance without needing to delete and reconfigure the peer or peer group. To recover the session, execute the undo peer ignore command.

If a session has been established to a peer, executing the peer ignore command for the peer tears down the session and clears all related routing information.

If sessions have been established to a peer group, executing the peer ignore command for the peer group disables the sessions to all peers in the group and clears all related routing information.

If you specify the graceful keyword in the peer ignore command, BGP performs the following tasks:

For a BGP peer or peer group, the configuration made by the peer ignore command takes precedence over the configuration made by the ignore all-peers command.

Examples

# In BGP instance view, disable session establishment with peer 1.1.1.1.

<Sysname> system-view
[Sysname] bgp 100
[Sysname-bgp-default] peer 1.1.1.1 ignore

# In BGP instance view, configure BGP to gracefully shut down the session to peer 1.1.1.1 in 60 seconds, advertise all routes to peer 1.1.1.1, and change the community attribute and local preference for the advertised routes to 1:1 and 200, respectively.

<Sysname> system-view
[Sysname] bgp 1
[Sysname-bgp-default] peer 1.1.1.1 ignore graceful 60 community 1:1 local-preference 200

Related commands

ignore all-peers