BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases

PDF

BGP default peer and prefix limits

Want to summarize with AI?

Log in

Overview

Provides guidelines for BGP default limits that restrict maximum peers and prefixes to prevent resource depletion, control scaling, and maintain router stability. Describes default and configurable limits and how BGP enforces these limits to protect router resources.

BGP default limits are safeguards that

  • restrict the maximum number of BGP peers and prefixes to prevent resource depletion,

  • allow network operators to control neighbor and prefix scaling, and

  • help maintain router stability in case of misconfiguration.

Table 1. Feature History Table

Feature Name

Release Information

Feature Description

Support for increased number of BGP peers

Release 7.3.1

This feature is now enhanced to support 750 IPv4 and 750 IPv6 BGP peers.

BGP imposes maximum limits on how many neighbors you can configure on a router and on the number of prefixes the router accepts from each peer for each address family.

Default BGP peer and prefix limit values

These default limits apply to BGP configurations:

  • Maximum number of BGP peers:

    • Default: 4000

    • Configurable range: 1 to 15000

      Use the bgp maximum neighbor command to change.

    • Attempts to exceed the maximum or reduce it below the current number of peers will fail.

  • Table 2. Default maximum prefixes accepted per peer, by address family

    Address family

    Default maximum prefixes

    IPv4 unicast 1,048,576
    IPv4 labeled-unicast 131,072
    IPv4 tunnel 1,048,576
    IPv6 unicast 524,288
    IPv6 labeled-unicast 131,072
    IPv4 multicast 131,072
    IPv6 multicast 131,072
    IPv4 MVPN 2,097,152
    VPNv4 unicast 2,097,152
    IPv4 MDT 131,072
    VPNv6 unicast 1,048,576
    L2VPN EVPN 2,097,152

    You can override these values using the maximum-prefix limit command for each peer and address family.


How BGP default limits work

Summary

The key components involved in the process are:

  • Router: Tracks peer and prefix counts.

  • BGP neighbor: Sends prefix advertisements.

  • Configuration commands: Allow you to adjust limits as needed.

BGP monitors the number of peers and received prefixes to enforce default or configured limits, protecting the router from excessive resource usage.

Workflow

These stages describe how BGP default limits work:

  • The router checks the number of configured peers when changes are made.

  • If a peer tries to exceed the maximum, the router rejects the configuration.

  • For prefixes, the router monitors the count for each neighbor and address family.

  • If the number of received prefixes exceeds the limit, either the default or the configured limit, the router sends a cease notification and terminates the BGP peering with that neighbor.

  • If you lower the maximum-prefix limit after the session has started and the neighbor has already sent more prefixes than allowed, the router immediately sends a cease notification and ends the peering.

Result: BGP protects router resources and ensures reliable operation by enforcing these limits and terminating peerings that exceed them.