← CCNP Enterprise: ENCOR core and operations
24 / 24 · 75 MIN

BGP: selection, failure and recovery

Explain the first decisive path difference and define recovery evidence that matches the service.

Compare alternatives for the same prefix

Best-path selection compares eligible BGP paths for the same prefix. Before ranking attributes, confirm acceptance and next-hop resolution. A rejected route cannot win through high local preference. Choosing between two /24 paths also does not remove a separate /32 route: forwarding uses the most specific available match. During an incident, first identify the exact destination and the prefix forwarding its packets. Then collect that prefix’s path attributes, including policy changes. This order avoids investigating an aggregate’s AS_PATH while traffic follows an unexpected more-specific route.

Stop at the first decisive difference

In this lesson’s cases, paths arrive through eBGP, next hops are reachable, and neither AIGP nor algorithm overrides are used. In the Cisco ordering studied here, higher weight precedes higher local preference; shorter AS_PATH decides only after earlier criteria tie, including local origination preference. For the same /32, A has weight 0, local preference 100 and AS_SEQUENCE 65101. B has weight 0, local preference 200 and AS_SEQUENCE 65102 65102 65102. B wins despite its longer AS path. With both local preferences at 100, A wins. Do not add attributes into a score. Nor should AS_PATH be interpreted as milliseconds, circuit capacity or the exact number of physical routers.

Attribute scope limits its effect

Weight is router-local in Cisco’s implementation; it is not an attribute sent to a neighbor in an UPDATE. Local preference represents preference within an AS and is not normally advertised to external eBGP peers. In the lab, edge assigns these values through input policies; the partner is not assumed to send the intended preference. When A has local preference 300 and B receives weight 50, B wins again. This demonstrates a local difference rather than a coordinated decision across every bank router. MED is not a universal substitute: default comparison has conditions, including routes from the same neighboring AS. If the intent is to influence another operator’s incoming traffic, confirm that operator’s policy and measure the outcome.

An alternative helps only while it remains usable

With both paths accepted, administratively shutting the preferred neighbor removes that alternative and allows the other path to be selected. Shutting both leaves service without a route. These lab steps are reversible and record BGP, RIB, kernel and ping. A shared incorrect filter can remove both paths without dropping either neighbor, so two peers do not eliminate common failures. A real migration also needs surviving capacity, shared dependencies and application state considered. A long TCP session may not survive a path change even if a new ping succeeds. Define whether acceptance needs new connections, continuity of existing sessions or both; do not replace that decision with a single green indicator.

Repeat, restore and bound the conclusion

Run the script on a lab machine with Docker and the specified FRR image. Before each change, predict the selected path or absence of a route. Compare the prediction with snapshots and explain the first difference. The script removes its containers and networks at the end, including after a failed check. Both partners use synthetic loopback endpoints with the same address; they do not represent a replicated application. Execution uses FRR 10.4.5 rather than IOS XE. The references are not interchangeable at every tie-break: for example, the inspected documentation differs on the direction of the final peer-address comparison. Executed cases stop at weight, local preference or AS_PATH before that point. Production acceptance needs the exact version, actual policies, application traffic and agreed timing criteria.

# Run from the project root on an isolated Docker lab host:
python3 content/labs/ccnp-bgp-paths/run.py /tmp/ccnp-bgp-evidence.json
# Requires the pinned FRR image stated in run.py to be present.
# Compare phases, configs, BGP paths, RIB and kernel routes.
# No published ports or host mounts; owned resources removed in finally.
# ICMP loopbacks are not a replicated application or a convergence SLA.
IN PRACTICE

The shorter route does not win: B has local preference 200 against A’s 100. After equalizing preference, A wins; a local weight on B changes the outcome again.

Common pitfalls

Shortest AS_PATH as an absolute rule; weight as a propagated attribute; ping as an application session; two peers as physical diversity; the FRR algorithm as complete IOS XE evidence.

Related topics: High availability · Observability and acceptance

Take this idea with you

Explain the first deciding difference and test recovery at the level where service is consumed.

Create account

Reference: Select BGP Best-path Algorithm · 350-401 ENCOR v1.2, effective 2026-03-19; core component of CCNP Enterprise

CCNP® and Cisco® are registered trademarks of Cisco Systems, Inc. and/or its affiliates. bigsavant.com is an independent preparation platform and is not affiliated with, associated with, sponsored, authorised or endorsed by Cisco. Content and questions are original, are not official exam questions, and completing our tests does not award or guarantee any certification. Names are used only to identify the subject. All other trademarks belong to their respective owners.