Specifications
Implementing BGP on Cisco IOS XR Software
Information About Implementing BGP on Cisco IOS XR Software
RC-4
Cisco IOS XR Routing Configuration Guide
BGP Router Identifier
For BGP sessions between neighbors to be established, BGP must be assigned a router ID. The router 
ID is sent to BGP peers in the OPEN message when a BGP session is established.
BGP attempts to obtain a router ID in the following ways (in order of preference):
• By means of the address configured using the bgp router-id command in router configuration mode.
• By using the highest IPv4 address on a loopback interface in the system if the router is booted with 
saved loopback address configuration.
• By using the primary IPv4 address of the first loopback address that gets configured if there are not 
any in the saved configuration.
If none of these methods for obtaining a router ID succeeds, BGP does not have a router ID and cannot 
establish any peering sessions with BGP neighbors. In such an instance, an error message is entered in 
the system log, and the show bgp summary command displays a router ID of 0.0.0.0.
After BGP has obtained a router ID, it continues to use it even if a better router ID becomes available. 
This usage avoids unnecessary flapping for all BGP sessions. However, if the router ID currently in use 
becomes invalid (because the interface goes down or its configuration is changed), BGP selects a new 
router ID (using the rules described) and all established peering sessions are reset.
Note We strongly recommend that the bgp router-id command is configured to prevent unnecessary changes 
to the router ID (and consequent flapping of BGP sessions).
BGP Default Limits
Cisco IOS XR BGP imposes maximum limits on the number of neighbors that can be configured on the 
router and on the maximum number of prefixes that are accepted from a peer for a given address family. 
This limitation safeguards the router from resource depletion caused by misconfiguration, either locally 
or on the remote neighbor. The following limits apply to BGP configurations:
• The default maximum number of peers that can be configured is 4000. The default can be changed 
using the bgp maximum neighbor command. The limit range is 1 to 15000. Any attempt to 
configure additional peers beyond the maximum limit or set the maximum limit to a number that is 
less than the number of peers currently configured will fail.
• To prevent a peer from flooding BGP with advertisements, a limit is placed on the number of 
prefixes that are accepted from a peer for each supported address family. The default limits can be 
overridden through configuration of the maximum-prefix limit command for the peer for the 
appropriate address family. The following default limits are used if the user does not configure the 
maximum number of prefixes for the address family:
–
512K (524,288) prefixes for IPv4 unicast. 
–
128K (131,072) prefixes for IPv4 multicast. 
–
128K (131,072) prefixes for IPv6 unicast.
–
128K (131,072) prefixes for IPv6 multicast
–
512K (524,288) prefixes for VPNv4 unicast
–
512K (524,288) prefixes for VPNv6 unicast










