neighbor maximum-prefix

Syntax

neighbor {<IP-ADDR>|<PEER-GROUP-NAME>} 
        maximum-prefix <MAXIMUM> [threshold <THRESHOLD>] 
        [restart <INTERVAL>] [warning-only]

no neighbor {<IP-ADDR>|<PEER-GROUP-NAME>} maximum-prefix

Description

Sets the maximum number of prefixes that can be received from a neighbor.

By default, the device accepts 128,000 prefixes from a BGP neighbor with a threshold value of 75%. A warning message is generated when the number of prefixes per neighbor reaches 75% of default prefix limit. Another warning message is generated when the default prefix limit is reached.

The session is re-established only if the number of routes received from the BGP peer does not exceed the configured prefix limit. When the restart timer is configured, sessions are automatically re-established when the timer expires.

The no form of this command disables the maximum number of prefixes limit.

Command context

config-bgp-ipv4-uc

config-bgp-ipv6-uc

Parameters

<IP-ADDRESS>

Specifies the IP address of the neighbor in IPv4 format (x.x.x.x), where x is a decimal number from 0 to 255, or IPv6 format (xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx), where x is a hexadecimal number from 0 to F.

<PEER-GROUP-NAME>

Specifies a Peer-Group.

maximum-prefix <MAXIMUM>

Specifies the maximum number of prefixes allowed from the specified neighbor. Range: 1 to 128000. Default: 128000.

threshold <THRESHOLD>

Specifies at what percentage of MAXIMUM a warning message is generated. Range: 1 to 100. Default: 75.

For example, if MAXIMUM is set to 1000 and threshold is 70, the router generates a warning message when the number of BGP learned routes from the neighbor exceeds 70 percent of 1000 (700) routes.

restart <INTERVAL>

Specifies interval in seconds for restarting the BGP connection when the prefix limit is exceeded. Range: 30 to 65535.

warning-only

Specifies generating and logging a warning message without disconnecting the BGP session when the prefix limit is exceeded.

Authority

Administrators or local user group members with execution rights for this command.

Examples

Setting the prefix limit to 1000 prefixes:

switch(config-bgp-ipv4-uc)# neighbor 10.0.0.1 maximum-prefix 1000

Enabling logging of a warning message when more than 1000 prefixes are received:

switch(config-bgp-ipv4-uc)# neighbor 10.0.0.1 maximum-prefix 1000 warning-only

Setting the prefix limit to 1000 prefixes and enabling logging of a warning message when 500 prefixes are received:

switch(config-bgp-ipv4-uc)# neighbor 10.0.0.1 maximum-prefix 1000 threshold 50

Setting the prefix limit to 1000 prefixes and enabling logging of a warning message when 500 prefixes are received and a second warning when the prefix limit is exceeded without disconnecting the session:

switch(config-bgp-ipv4-uc)# neighbor 10.0.0.1 maximum-prefix 1000 threshold 50 warning-only

Removing the threshold value:

switch(config-bgp-ipv4-uc)# no neighbor 10.0.0.1 maximum-prefix 1000 threshold 50

Disabling the maximum-prefix feature:

switch(config-bgp-ipv4-uc)# no neighbor 10.0.0.1 maximum-prefix