Overview
Introduces advanced features for BGP path selection, covering best paths and multipaths, additional paths, and selection using controller-programmed metrics, with benefits, operational details, and configuration steps.
BGP Configuration Guide for Cisco 8000 Series Routers, Cisco IOS XR Releases
Introduces advanced features for BGP path selection, covering best paths and multipaths, additional paths, and selection using controller-programmed metrics, with benefits, operational details, and configuration steps.
A best path and multipath prefix is a BGP routing outcome that
identifies the optimal route (best path) for each destination prefix based on established selection rules
enables the installation of multiple qualified paths (multipaths) in the forwarding table to enhance load balancing and redundancy, and
determines which routes are advertised to BGP peers and how traffic is forwarded throughout the network.
BGP routers receive multiple paths to the same destination prefix. By default, the BGP best path algorithm compares all valid paths and selects one as the best path to install in the local IP routing table and use for traffic forwarding. Only this best path is typically advertised to other BGP peers, which ensures consistent routing decisions across the network.
However, to improve bandwidth utilization and provide redundancy, BGP implementations can select additional paths-called multipaths-if certain conditions are met. These multiple eligible paths are installed in the forwarding table, and incoming packets are load-balanced across the best path and the multipaths.
Route reflectors in BGP can use community strings to signal local path decisions, differentiating between best paths and multipaths. The introduction of the BGP add-path feature allows a router to advertise more than the best path, signaling all equivalent or backup paths as per network policy and multipath rules.
By default, BGP only advertises the best path to its peers. This behavior may not show you the entire routing state available on a BGP speaker.
If Add-Path is not configured, installing multipath does not change what is advertised to peers.
A BGP router receives three paths to destination 10.1.1.0/24 from different peers. It selects one best path for routing and advertises only that path to other peers. If multipath is enabled and two paths qualify, both are used for forwarding traffic, providing load balancing and redundancy, though only the best path is advertised unless BGP add-path feature is configured.
Change the default selection behavior of the BGP best-path algorithm to suit specific routing requirements.
BGP routers may learn multiple paths to a destination. By default, they use a specific algorithm to choose the best path. You can tune this behavior to influence routing and traffic flow between autonomous systems (ASes).
Ensure you have access to global configuration mode on your router.
Confirm that BGP is already enabled on the router.
Follow these steps to modify BGP best-path selection criteria:
| 1. | Enter BGP configuration mode, and adjust MED comparison behavior.
Example:
|
|
| 2. | Customize path attribute evaluation.
Example:
|
The BGP best-path algorithm selects routes based on your modified criteria.
A BGP additional path is a BGP feature that
enables a BGP speaker to advertise multiple paths for the same network prefix
provides path diversity to improve convergence and operational flexibility, and
supports granular control of path selection and advertisement types per neighbor based on outbound policy configuration.
| Feature Name |
Release Information |
Feature Description |
|---|---|---|
| Additonal path control per neighbor |
Release 25.4.1 | Introduced in this release on: Fixed Systems (8010 [ASIC: A100])(select variants only*) *This feature is now supported on:
|
| Additonal path control per neighbor |
Release 25.1.1 | Introduced in this release on: Fixed Systems (8010 [ASIC: A100])(select variants only*) *This feature is supported on Cisco 8011-4G24Y4H-I routers. |
| Additonal path control per neighbor |
Release 24.4.1 | Introduced in this release on: Fixed Systems (8200 [ASIC: P100], 8700 [ASIC: P100, K100])(select variants only); Modular Systems (8800 [LC ASIC: P100])(select variants only*) *This feature is supported on:
|
| Additonal path control per neighbor |
Release 7.3.15 | This features allows flexibility and granular control of the advertisement of additional paths based on the neighbor outbound policy configuration. This is done by allowing configuration of combinations diff erent path selection procedures unlike singular path selection, and extending neighbor outpound policy to have finer control of the path types to be advertised. This feature enables operational efficiency to manage additional paths and reduce scale of the paths in a typical clustered network architecture. Without this feature, the path scale limitation of the memory is impacted, and control plane convergence issues develop because of the excessive number of paths. |
The BGP additional paths feature modifies BGP protocol behavior so a BGP speaker can send more than one path for a given prefix.
Benefits for path diversity and convergence
This modification provides network path diversity and enables edge routers to achieve prefix-independent convergence (PIC), especially in iBGP networks.
Enhanced policy control and scalability
By supporting multiple path types and expanded policy controls per neighbor, the feature helps prevent issues like path scale limitations and enables better control plane convergence.
BGP additional paths can advertise the following types of paths for a single prefix:
Backup paths - enable fast convergence and rapid restoration of connectivity.
Group-best paths - help resolve route oscillation scenarios.
All paths - emulate an iBGP full mesh by advertising every possible path.
BGP best path selection using controller-programmed metrics is a BGP path selection feature that
enables BGP to select optimal overlay routes using controller-provided path metrics
integrates controller agent metrics into the Routing Information Base (RIB) through the SL-APIv2 interface, and
ensures that BGP routing decisions for MPLS-forwarded IP routes accurately reflect the underlay path characteristics programmed by the network controller.
SL-APIv2 is version 2 of the Cisco Service Layer API, a programmatic interface that enables external controllers or applications to interact with IOS XR system services. The SL-APIv2 interface operates as part of the Service Layer Application Framework (SLAF) and supports use cases such as controller-injected route metrics, traffic engineering, and dynamic path optimization.
| Feature Name |
Release Information |
Feature Description |
|---|---|---|
| BGP best path selection using controller-programmed metrics |
Release 26.1.1 | Introduced in this release on: Modular Systems (8800 [LC ASIC: Q200]) Optimize overlay traffic steering using BGP best path selection with controller-programmed metrics, enabling traffic to follow preferred underlay paths. The network controller injects preferred path metrics into the Routing Information Base (RIB) through the Service Layer Application Programming Interface (SL API) version 2. BGP uses these metrics to calculate the best path for overlay routes. This feature supports seamless Segment Routing (SR) label transitions, simplifies migration from legacy protocols, and improves per-prefix traffic visibility. The feature introduces these changes: CLI: nexthop preference admin-distance YANG Data Models:
(see GitHub, YANG Data Models Navigator) |
BGP best path selection in large-scale networks relies on metrics from IGP-installed routes. These metrics do not always represent controller-optimized underlay paths. As a result, BGP can steer overlay traffic along suboptimal paths, which reduces network efficiency and limits centralized traffic engineering benefits.
With BGP best path selection using controller-programmed metrics, the network controller uses its agent and the SLAF to inject preferred path metrics into the RIB. BGP tracks next-hop changes through the RIB and uses the injected controller metrics during best path computation. This behavior aligns overlay routing decisions with accurate, controller-selected underlay paths.
You gain several benefits by using controller-programmed metrics for BGP path selection:
Optimized routing and traffic steering
When the network controller overrides an IGP-installed MPLS-forwarded IP route, you benefit from optimal traffic steering, improved performance, and greater resource efficiency because BGP uses the metric set by the controller for best path calculation.
Non-disruptive transitions and enhanced control
You gain seamless forwarding and non-disruptive transitions of Segment Routing (SR) labels, even when the controller updates metrics. The controller influences BGP routing decisions to support granular traffic engineering and enables you to adapt dynamically to changing network conditions.
Simplified migration and reduced complexity
Controller-based metric updates and steering provide a foundation for decommissioning legacy label distribution protocols. This approach streamlines your operations and simplifies management of multiple control-plane mechanisms.
Improved visibility
Per-prefix egress accounting for controller-programmed prefixes helps you monitor network accuracy, simplifies troubleshooting, and improves visibility into your traffic flows.
The key components involved in the process are:
Network controller and agent: The network controller and agent program optimized MPLS-forwarded IP routes and associated metrics into the router using the SL API version 2 interface.
Routing Information Base (RIB): The RIB receives labeled and unlabeled routes, prioritizes them by prefix and label, and shares route information with BGP and the Forwarding Information Base (FIB).
BGP process: The BGP process registers with the RIB for next-hop tracking (NHT) and uses the most preferred metric during best path computation.
Forwarding Information Base (FIB): The FIB programs the forwarding plane based on the path selected by BGP.
The network controller injects optimized underlay metrics into the RIB. This approach enables BGP best-path selection using controller-programmed metrics.
These stages describe the BGP best path selection using controller-programmed metrics:
Configure BGP best path selection so that the controller can program metrics for optimal path selection.
This task involves enabling specific BGP and RIB settings so that controller-programmed metrics influence the BGP best path selection. The configuration ensures that best paths are chosen from a single protocol source.
| 1. | Configure BGP to use administrative distance–based nexthop preference under the required address family and enable nexthop preference for best path selection. Example:
|
|
| 2. | Check that nexthop preference and admin distance are in use. Confirm that the output includes statements such as:
Example:
|
|
| 3. | Verify the BGP route details for a given prefix. In the output, check for the line: Nexthop Preference: <value> Example:
|
|
| 4. | Compare BGP best path selection for the prefix. Review the paths and confirm that nexthop preference values influence best path selection. Example:
|
|
| 5. | Display the nexthop administrative distance and status. Identify entries corresponding to the test prefix's nexthop. Confirm that the AdminDist field matches the expected value, for example, 110. Example:
|
|
| 6. | View detailed nexthop information. Ensure that the status is [Reachable] and the admin distance aligns with the configuration. Example:
|
(Optional) Validate additional metrics.
| To verify... |
run the... |
|---|---|
| route installation in RIB |
show route <ip-prefix> command. |
| forwarding details |
show cef <ip-prefix> detail command. |
| the MPLS forwarding path |
show mpls forwarding command. |
| SWAN-imposed routes |
show service-layer route command. |
| the health of the service-layer agent |
show grpc service-layer summary command. |
| agent logs |
show appmgr application name swanagent logs command. |
| the administrative distance for a nexthop |
show rib nexthop <ip-address> command. |