Overview
Describes how BGP maximum-prefix limits the number of prefixes received from a neighbor and terminates the session if exceeded, while discard extra paths drops excess prefixes without session flapping to maintain stability.
BGP maximum-prefix is a BGP functionality that enforces a limit on the number of prefixes received from a neighbor for a specific address family and terminates the BGP session if the prefix count exceeds the configured limit.
The discard extra paths option is an enhancement to the BGP maximum-prefix functionality that drops excess prefixes received from a neighbor without flapping the session and limits the memory footprint of BGP.
BGP maximum-prefix overview
The BGP maximum-prefix capability allows you to configure an upper threshold on the number of prefixes that can be accepted from a neighbor for a particular address family. If the number of received prefixes exceeds the configured limit, the system performs these actions:
-
Terminates the BGP session and sends a cease notification to the neighbor.
-
Keeps the session down until you manually clear it using the clear bgp command.
-
Restarts the session automatically after a specified period if configured with the maximum-prefix command and the restart keyword.
Starting with IOS-XR Release 7.3.1, the system no longer applies default limits unless you explicitly configure the maximum number of prefixes for the address family.
Discard extra paths behavior
The discard extra paths option modifies BGP maximum-prefixbehavior. With discard extra paths option configured, when excess prefixes are received, they are dropped, but the BGP session remains stable. If the discard extra paths configuration is removed, BGP sends a route-refresh message to the neighbor if it supports the refresh capability; otherwise, the session flaps.
Effects of changing the maximum-prefix value
Changing the maximum-prefix value triggers these specific actions:
-
If the new value exceeds the current prefix count, the additional prefixes are saved.
-
If the new value is less than the current prefix count, some prefixes are deleted to align with the new limit. There is no control over which prefixes are removed.
Benefits of BGP maximum-prefix and discard extra paths
BGP maximum-prefix and discard extra paths functionality provides these benefits:
-
Limits the memory usage of BGP by dropping excess prefixes received beyond the configured maximum.
-
Prevents session flapping, ensuring stability of the BGP peer even when the prefix limit is exceeded.
-
Helps maintain operational continuity by avoiding disruptions caused by exceeding the prefix limit.