neighbor maximum-prefix
Syntax
neighbor {<IP-ADDRESS>|<PEER-GROUP-NAME>}
maximum-prefix <MAXIMUM> [threshold <THRESHOLD>]
[restart <RESTART-INTERVAL>] [warning-only]
no neighbor {<IP-ADDRESS>|<PEER-GROUP-NAME>} maximum-prefix
Description
Controls the number of prefixes that can be received from a neighbor.
By default, the device accepts 128,000 prefixes from a BGP neighbor with the 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 will be 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, the sessions will be automatically re-established upon the timer expiration.
The
no
form of this command disables this function.
Command context
config-bgp-ipv4-uc
or
config-bgp-ipv6-uc
Parameters
<IP-ADDRESS>
Specifies an IP address.
<PEER-GROUP-NAME>
Specifies a Peer-Group.
<MAXIMUM>
Specifies the maximum number of prefixes allowed from the specified neighbor. Range: 1-128000. Default: 128000.
threhold
An optional integer value that specifies at what percentage of configured maximum-value a warning message will be generated. Default: 75. Range: 1-100.
For example, if the maximum-value configured is 1000 and the threshold 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 <RESTART-INTERVAL>
Specifies interval in seconds for restarting the BGP connection after the limit is exceeded. Range: 30-65535.
warning-only
Specifies generating and logging a warning message without tearing down the BGP session if the prefix limit is exceeded.
Authority
Administrators
Examples
Drop the peering session when more than 1,000 prefixes are received:
switch(config-bgp-ipv4-uc)# neighbor 10.0.0.1 maximum-prefix 1000
Log a warning message when more than 1,000 prefixes are received:
switch(config-bgp-ipv4-uc)# neighbor 10.0.0.1 maximum-prefix 1000 warning-only
Log a warning message when 500 prefixes are received and drop the session when 1,000 prefixes are received:
switch(config-bgp-ipv4-uc)# neighbor 10.0.0.1 maximum-prefix 1000 threshold 50
Initially warn when 500 prefixes are received and rewarn when 1000 prefixes received without disconnecting the session:
switch(config-bgp-ipv4-uc)# neighbor 10.0.0.1 maximum-prefix 1000 threshold 50 warning-only
Unconfigure threshold value:
switch(config-bgp-ipv4-uc)# no neighbor 10.0.0.1 maximum-prefix 1000 threshold 50
Unconfigure maximum-prefix feature completely:
switch(config-bgp-ipv4-uc)# no neighbor 10.0.0.1 maximum-prefix