Day 17 — BGP ORIGIN: IGP, EGP and Incomplete Without the Common Misconceptions

Learning objective

Interpret the ORIGIN attribute correctly, explain the preference order IGP < EGP < incomplete in Cisco best-path selection, and troubleshoot a policy that changes ORIGIN without confusing it with route ownership or the IGP protocol running in the network.


BGP ORIGIN: IGP, EGP and Incomplete Without the Common Misconceptions
BGP ORIGIN: IGP, EGP and Incomplete Without the Common Misconceptions



1. Opening — the word “origin” causes more confusion than the attribute

BGP's ORIGIN attribute has three values:

  • IGP
  • EGP
  • INCOMPLETE

Cisco commonly displays them as:

  • i
  • e
  • ?

The names are historical. They do not mean “this prefix is currently carried by OSPF,” “this prefix belongs to the AS shown here,” or “BGP does not know the AS that owns it.”

ORIGIN indicates how the route information was introduced into BGP according to the attribute semantics. In Cisco configurations, a prefix originated with a BGP network statement commonly appears with ORIGIN IGP, while redistribution commonly creates ORIGIN incomplete unless policy changes it.


2. ORIGIN classification

RFC 4271 defines ORIGIN as a well-known mandatory attribute with three values.

IGP

Indicates the NLRI was learned through an interior routing mechanism in the original BGP semantics. In modern Cisco operations, network-originated routes are typically displayed with i.

EGP

Represents the historical Exterior Gateway Protocol origin value. The old EGP protocol is obsolete in modern networks, but the ORIGIN value remains defined.

INCOMPLETE

Indicates the origin cannot be represented as IGP or EGP under the attribute semantics. Redistributed routes commonly appear as ? on Cisco.


3. Best-path preference

After earlier Cisco selection criteria such as Weight, LOCAL_PREF, local origination and AS_PATH length, Cisco prefers the route with the lowest ORIGIN type in this order:

IGP (i)  preferred over  EGP (e)  preferred over  incomplete (?)

Do not translate that into “IGP routes are always preferred over redistributed routes.” The comparison applies at this stage only if all higher-priority criteria have tied and the routes are eligible.


4. ORIGIN is not the same as ORIGINATOR_ID

These are completely different attributes.

  • ORIGIN is the base BGP attribute described here.
  • ORIGINATOR_ID is a route-reflection attribute used to prevent reflection loops.

The route-reflector module will treat ORIGINATOR_ID separately.


5. Scenario — Delta Origin-Code Tie Break

Illustrative lab — not a real incident.

Topology

           Service S AS65100
              /          \
             /            \
       P1 AS65010      P2 AS65020
             \            /
              \          /
             Enterprise E
                AS65050

S originates 192.0.2.128/25 and both providers carry it to E.

P1 advertises the path without changing ORIGIN, so E sees an IGP-origin code.

P2 uses an outbound route map toward E:

set origin incomplete

The AS_PATH lengths are intentionally equal:

  • P1: 65010 65100 i
  • P2: 65020 65100 ?

If earlier attributes tie, E should prefer the IGP-origin path via P1.


6. Prerequisites

  • Four-router topology similar to Day 16.
  • Equal Weight and LOCAL_PREF at E.
  • Equal AS_PATH length.
  • Reachable next hops.
  • No MED difference used to decide earlier/later unexpectedly.

The lab isolates ORIGIN by controlling other variables.


7. Topic-specific configuration excerpt

P2 policy toward E

route-map MARK-INCOMPLETE permit 10
 set origin incomplete
!
router bgp 65020
 address-family ipv4 unicast
  neighbor 203.0.113.6 route-map MARK-INCOMPLETE out

P1 has no ORIGIN-changing policy toward E.

The full topology configuration is stored in the companion lab directory.


8. Verification before modification

At E:

show ip bgp 192.0.2.128
show ip route 192.0.2.128 255.255.255.128

Identify the Path field and origin code at the end of each path.

Expected conceptual view:

65010 65100 i
65020 65100 ?

The exact formatting depends on the IOS XE image; do not fabricate a full command output.


9. Controlled modification

Change P2's route map from incomplete to IGP for the lab comparison:

route-map MARK-INCOMPLETE permit 10
 set origin igp

After a safe outbound refresh, both paths should have equal ORIGIN. E then proceeds to later best-path criteria.

This demonstrates that ORIGIN is one comparison step, not an absolute winner independent of the rest of the algorithm.


10. Fault injection

Illustrative lab — not a real incident.

Lab name

Delta Origin Rewrite

Fault

A broad outbound route map on P1 accidentally marks all advertisements as incomplete:

route-map BROAD-ORIGIN permit 10
 set origin incomplete

If P2 continues advertising IGP origin and earlier attributes tie, E can switch to P2.

Why this is subtle

The prefix, AS_PATH and next hop all look legitimate. The only policy difference is the one-character origin code at the end of the path display.


11. Troubleshooting sequence

  1. Confirm the candidate paths and best path.
  2. Check Weight and LOCAL_PREF.
  3. Compare AS_PATH length.
  4. Read the ORIGIN code at the end of each path.
  5. Determine whether the value is natural from route origination or modified by policy.
  6. Inspect set origin route-map clauses.
  7. Confirm the route-map direction and scope.
  8. Do not confuse ORIGIN with route ownership or ORIGINATOR_ID.
  9. Correct the smallest unintended rewrite.
  10. Refresh safely and confirm the path-selection result.

12. Root cause and correction

Root cause

An outbound policy rewrote ORIGIN to incomplete on the path that was intended to remain preferred.

Correction

Remove the unnecessary set origin statement or constrain it to the prefixes that genuinely require that policy.

Why it works

With the artificial ORIGIN disadvantage removed, the route can tie or win according to the remaining best-path criteria.


13. Post-fix verification

show ip bgp 192.0.2.128
show route-map
show running-config | section route-map

If the best path changes, verify the RIB and data plane as well:

show ip route 192.0.2.128 255.255.255.128

14. Rollback

Remove the route-map from the neighbor or restore the previous set origin value, depending on the intended policy.

Example:

router bgp 65010
 address-family ipv4 unicast
  no neighbor <E-peer> route-map BROAD-ORIGIN out

Preserve the original route display so the origin-code difference remains documented.


15. Production lessons

Terminology lesson

ORIGIN is historical BGP metadata; it is not a statement of legal prefix ownership or current IGP reachability.

Selection lesson

IGP origin is preferred over EGP, which is preferred over incomplete—but only after earlier criteria tie.

Troubleshooting lesson

The tiny i, e or ? at the end of a path can explain a best-path decision when more obvious attributes are equal.

Policy lesson

Avoid rewriting ORIGIN without a clear, documented reason. LOCAL_PREF and communities are often clearer tools for policy expression.

Documentation lesson

Never confuse ORIGIN with ORIGINATOR_ID; their names overlap but their purposes do not.


15A. Four common ORIGIN misconceptions

Misconception 1 — i means OSPF or IS-IS

It does not. The ORIGIN code is BGP metadata. A route can display i even when no OSPF adjacency exists anywhere near the originating router.

Misconception 2 — ? means the prefix owner is unknown

It does not. ? represents ORIGIN incomplete. Ownership and authorization are separate questions handled through routing policy, registry data and mechanisms such as RPKI—not the ORIGIN code.

Misconception 3 — ORIGIN tells you where the route entered your AS

It does not. For that operational question, inspect the BGP peer, next hop, AS_PATH, communities and route-policy evidence.

Misconception 4 — ORIGIN should be rewritten to make a path primary

It can influence best-path selection, but it is usually a poor first choice for expressing enterprise policy because LOCAL_PREF is clearer and evaluated earlier. Rewriting ORIGIN can also make troubleshooting harder by obscuring how the route was originally introduced.


15B. When set origin is useful in a lab

set origin is valuable for education because it isolates the ORIGIN comparison without requiring multiple route-injection mechanisms. In production, use it only when a documented interconnection or migration design calls for it.

Before deploying a route map that changes ORIGIN, record:

  • which prefixes match;
  • whether the route map is inbound or outbound;
  • whether other route-map clauses continue processing;
  • the intended best-path effect;
  • which routers can observe the rewritten value;
  • how the change will be rolled back.

That discipline prevents a one-line policy change from becoming an invisible tie-breaker across a large prefix set.


15C. Observability: how to prove ORIGIN actually caused the decision

When investigating a production path-selection question, do not stop at seeing i on the best path and ? on an alternate path. Prove that all earlier criteria tied.

A defensible evidence chain is:

1. Both paths valid and next hops reachable
2. Weight equal
3. LOCAL_PREF equal
4. Neither path wins on local origination
5. AS_PATH length equal
6. ORIGIN differs
7. Selected path matches the documented ORIGIN preference

If any earlier item differs, ORIGIN may be visible but not causative.

This distinction matters for incident reports. Saying “the route won because of ORIGIN” is a technical claim that should be supported by the full comparison, not merely by noticing different origin codes after the fact.

For automated validation, collect structured path attributes before and after the change and compare only the fields relevant to the intended experiment. That approach will be developed further in the automation module.


15D. Why the EGP origin code still exists

The e value is easy to misread because modern engineers rarely operate the historical Exterior Gateway Protocol that gave the value its name. BGP retained the three-value ORIGIN field for protocol compatibility and path semantics even as EGP itself disappeared from ordinary production use.

That means a modern route displaying e should trigger a policy investigation rather than an assumption that an ancient EGP session is running somewhere. It may have been created by explicit policy, migrated configuration, imported routing information or a lab exercise.

The operational response is the same evidence-based method used throughout this series: identify the neighbor that supplied the path, inspect the full set of attributes, trace any route map that can rewrite ORIGIN, and compare the observed value against the intended policy. Historical names are not substitutes for current-state evidence.


16. Knowledge check

Q1

Does ORIGIN i mean the route is currently learned through OSPF?

Answer: No. It is the BGP ORIGIN attribute value. On Cisco, routes introduced with a BGP network statement commonly display i, regardless of which IGP may exist elsewhere.

Q2

Which ORIGIN value is preferred if all earlier criteria tie?

Answer: IGP is preferred over EGP, and EGP is preferred over incomplete.

Q3

Is ORIGIN the same as ORIGINATOR_ID?

Answer: No. ORIGIN is a base path attribute; ORIGINATOR_ID is a route-reflection loop-prevention attribute.


17. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — ORIGIN attribute values and Decision Process.
  2. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.18.x: Configuring BGP* — origin type in the Cisco best-path sequence.
  3. Cisco — *Connecting to a Service Provider Using External BGP, IOS XE 17.x* — route-map policy and BGP output origin codes.
  4. Cisco — route-map command references for set origin.

Accessed: 2026-08-11.


Day 16 — BGP AS_PATH: Loop Prevention, Path Length and Controlled Prepending

Learning objective

Read and interpret AS_PATH, explain its role in autonomous-system loop prevention and best-path selection, apply controlled prepending, and diagnose a policy that makes a normally preferred path unnecessarily long.


BGP AS_PATH: Loop Prevention, Path Length and Controlled Prepending
BGP AS_PATH: Loop Prevention, Path Length and Controlled Prepending



1. Opening — BGP remembers the autonomous systems a route crossed

Unlike an IGP metric, AS_PATH is not a measurement of latency, bandwidth or geographic distance. It is a record of autonomous-system path information carried with the route.

Each eBGP hop normally adds its AS number as the route crosses an AS boundary. When a BGP speaker sees its own AS in the received path, the ordinary loop-prevention behavior is to reject the route rather than accept a path that has already traversed the local AS.

Cisco's best-path algorithm also uses AS_PATH length: after earlier attributes such as Weight, LOCAL_PREF and local origination, a shorter AS path is normally preferred.

These two roles—loop prevention and path selection—must not be confused.


2. AS_PATH is not a latency metric

Suppose two candidate routes are:

Path A: 65010 65100
Path B: 65020 65030 65100

BGP sees Path A as shorter in AS sequence length. That does not prove Path A has lower latency or more available bandwidth. It simply crosses fewer AS_SEQUENCE entries for the comparison.

Policy may intentionally prefer the longer AS path through higher LOCAL_PREF, and that would be completely valid because LOCAL_PREF is evaluated earlier in Cisco's sequence.

Never explain BGP as “always choosing the shortest AS path.”


3. Loop prevention

RFC 4271's AS_PATH processing provides inter-AS loop detection. When a BGP speaker receives an UPDATE containing its own AS in the AS_PATH, normal processing prevents that route from being accepted as a loop-free external path.

There are specialized mechanisms such as allowas-in and migration-related local-AS features that alter default behavior in controlled designs. Those belong in later migration and advanced-policy posts.

For normal eBGP:

> Seeing your own AS in the path is a strong loop signal.


4. AS_SEQUENCE and modern AS_SET warning

The common path you read in operational tables is an ordered AS_SEQUENCE.

Older BGP aggregation designs could create AS_SET path segments. However, RFC 9774, published in May 2025, prohibits originating new AS_SET and AS_CONFED_SET segments. Day 11 already incorporated that current standards change.

Therefore this series will not recommend AS_SET-based aggregation as modern design practice.


5. Prepending

AS-path prepending intentionally adds repeated AS numbers so a path appears longer to remote BGP decision processes.

Example:

Normal:    65010 65100
Prepended: 65010 65010 65010 65100

Prepending is commonly used to influence inbound traffic by making one advertisement less attractive to external networks.

But it is a weak signal compared with higher-priority policy in the remote AS. A provider can use LOCAL_PREF to prefer the prepended route anyway.

Prepending therefore influences; it does not command.


6. Scenario — Summit Path-Length Shift

Illustrative lab — not a real incident.

Topology

                 Service S
                 AS65100
                 /      \
                /        \
          P1 AS65010    P2 AS65020
              |             |
              | eBGP        | eBGP
              +------ E -----+
                   AS65050

Service router S originates 192.0.2.128/25 and advertises it to both providers.

Enterprise E receives:

  • via P1: 65010 65100
  • via P2: 65020 65100

The paths have equal AS-path length before modification.

Controlled change

P1 prepends its own AS twice on the advertisement toward E.

Expected P1 path becomes conceptually:

65010 65010 65010 65100

P2 remains shorter and can become preferred if earlier attributes tie.


7. Prerequisites

  • Four routers.
  • eBGP S–P1, S–P2, P1–E and P2–E.
  • Documentation-safe point-to-point addressing.
  • All next hops reachable.
  • Equal Weight and LOCAL_PREF at E.

The topology is deliberately small; it models path policy rather than a real Internet transit business relationship.


8. Topic-specific configuration excerpt

Service S — AS65100

ip route 192.0.2.128 255.255.255.128 Null0
!
router bgp 65100
 bgp router-id 10.51.0.1
 neighbor 192.0.2.1 remote-as 65010
 neighbor 198.51.100.1 remote-as 65020
 address-family ipv4 unicast
  network 192.0.2.128 mask 255.255.255.128
  neighbor 192.0.2.1 activate
  neighbor 198.51.100.1 activate
 exit-address-family

P1 — AS65010

route-map PREPEND-TO-E permit 10
 set as-path prepend 65010 65010
!
router bgp 65010
 neighbor 192.0.2.2 remote-as 65100
 neighbor 203.0.113.2 remote-as 65050
 address-family ipv4 unicast
  neighbor 192.0.2.2 activate
  neighbor 203.0.113.2 activate
 exit-address-family

Do not apply PREPEND-TO-E yet in the baseline.

P2 — AS65020

router bgp 65020
 neighbor 198.51.100.2 remote-as 65100
 neighbor 203.0.113.6 remote-as 65050
 address-family ipv4 unicast
  neighbor 198.51.100.2 activate
  neighbor 203.0.113.6 activate
 exit-address-family

E — AS65050

router bgp 65050
 neighbor 203.0.113.1 remote-as 65010
 neighbor 203.0.113.5 remote-as 65020
 address-family ipv4 unicast
  neighbor 203.0.113.1 activate
  neighbor 203.0.113.5 activate
 exit-address-family

The lab package provides the full interface plan.


9. Verification before modification

At E:

show ip bgp 192.0.2.128
show ip bgp regexp _65100$
show ip route 192.0.2.128 255.255.255.128

At P1:

show ip bgp 192.0.2.128
show ip bgp neighbors 203.0.113.2 advertised-routes

Capture the original AS_PATH through each provider.

Because the two path lengths are equal, do not claim which path wins the remaining tie-breakers before observing the actual lab.


10. Controlled modification — prepend P1 toward E

On P1:

configure terminal
router bgp 65010
 address-family ipv4 unicast
  neighbor 203.0.113.2 route-map PREPEND-TO-E out
end

Use a safe outbound refresh so the changed advertisement is sent.

Expected result

At E, the route through P1 should show additional 65010 entries. If all earlier selection attributes tie, the route through P2 now has the shorter AS_PATH and should be preferred.


11. Fault injection

Illustrative lab — not a real incident.

Lab name

Summit Excessive Prepend

Fault

An operator intends to add two prepends but adds six repeated AS numbers instead.

route-map PREPEND-TO-E permit 10
 set as-path prepend 65010 65010 65010 65010 65010 65010

Expected impact

The P1 advertisement becomes much less attractive to networks that consider AS_PATH length at the relevant stage.

Important caveat

The change may have no effect in a remote AS that deliberately gives the P1 route higher LOCAL_PREF. That is not a BGP failure; it is remote policy winning earlier.


12. Troubleshooting sequence

  1. Confirm the exact prefix and both candidate paths.
  2. Verify next-hop reachability.
  3. Check Weight and LOCAL_PREF before blaming AS_PATH.
  4. Read the AS_PATH on the receiving router.
  5. Identify whether repeated ASNs are natural transit hops or intentional prepends.
  6. Inspect outbound route maps on the advertising edge.
  7. Confirm the route-map scope: neighbor, direction and address family.
  8. Compare intended versus actual number of prepends.
  9. Remove or reduce the smallest incorrect policy.
  10. Refresh safely and verify the path returns to the intended ranking.

13. Root cause and correction

Root cause

An outbound route map on P1 made its path substantially longer than intended.

Correction

Reduce the prepend count or remove the route map if no de-preference is required.

route-map PREPEND-TO-E permit 10
 set as-path prepend 65010 65010

Why it works

The receiving BGP speaker sees a shorter path through P1 than it saw during the fault, allowing the normal decision hierarchy to evaluate the revised path.


14. Post-fix verification

At E:

show ip bgp 192.0.2.128
show ip route 192.0.2.128 255.255.255.128

At P1:

show route-map PREPEND-TO-E
show ip bgp neighbors 203.0.113.2 advertised-routes

If the purpose is real inbound traffic engineering, supplement route-table verification with flow/telemetry evidence. A BGP best path does not alone prove how all remote networks will send traffic.


15. Rollback

router bgp 65010
 address-family ipv4 unicast
  no neighbor 203.0.113.2 route-map PREPEND-TO-E out

Preserve the route-map and before/after path evidence before rollback if an incident investigation is active.


16. Production lessons

Protocol lesson

AS_PATH provides autonomous-system path information and loop prevention; it is not a performance metric.

Policy lesson

Shortest AS_PATH matters only after earlier path-selection criteria tie.

Traffic-engineering lesson

Prepending is an influence mechanism for remote selection, not a guarantee.

Security lesson

Unexpected AS_PATH changes can indicate leaks, hijacks, misconfiguration or migration behavior. Compare against expected routing relationships.

Standards lesson

Do not design new aggregation around AS_SET/AS_CONFED_SET; RFC 9774 now prohibits their origination.


16A. Prepending strategy and its limits

A prepend count should be chosen from evidence, not folklore. “Prepend three times” is not a protocol rule. The useful count depends on competing paths and the remote networks whose decisions matter.

A disciplined process is:

  1. Measure the normal AS_PATHs seen from representative external vantage points.
  2. Identify which remote ASes actually send the traffic of interest.
  3. Check whether your provider offers BGP communities that change LOCAL_PREF inside the provider; those can be more predictable than blind prepending.
  4. Apply the minimum prepend needed to create the intended relative difference.
  5. Observe route collectors, provider looking glasses or telemetry where authorized.
  6. Roll back if the change shifts traffic farther than intended.

The same prepend can produce different results in different remote ASes because each AS owns its own policy.

Do not prepend somebody else's ASN casually

Operational policy normally prepends the local ASN to make the local advertisement less attractive. Adding arbitrary third-party ASNs can create misleading path information and trigger loop prevention or filtering. Specialized migration features can alter AS-path construction, but those require their own design treatment.

More prepends can reduce resilience

If an alternate path is made excessively unattractive, some remote networks may keep using another path even after conditions change, depending on their available routes and policy. Prepending should therefore be tested not only in the healthy state but also during primary-path failure and restoration.


17. Knowledge check

Q1

Why might a longer AS_PATH still be selected?

Answer: A higher-priority criterion such as Weight or LOCAL_PREF can prefer it before AS_PATH length is evaluated.

Q2

What is the basic loop-prevention signal in ordinary eBGP AS_PATH processing?

Answer: The receiving BGP speaker sees its own AS number already present in the AS_PATH and rejects the looping route under normal behavior.

Q3

Does prepending force every remote AS to avoid the prepended path?

Answer: No. Remote policy such as LOCAL_PREF can override the AS_PATH-length preference.


18. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — AS_PATH attribute, loop prevention and Decision Process.
  2. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.18.x: Configuring BGP* — shortest AS path in Cisco best-path selection.
  3. Cisco — *Connecting to a Service Provider Using External BGP, IOS XE 17.x* — AS-path policy examples.
  4. RFC 9774 — *Deprecation of AS_SET and AS_CONFED_SET in BGP* — current prohibition on originating those path segment types.

Accessed: 2026-08-11.


Day 15 — Locally Originated BGP Paths: The Best-Path Step Hidden Behind Weight

Learning objective

Explain the Cisco best-path preference for a locally originated path, distinguish that decision step from the commonly observed Weight 32768 on local routes, and diagnose an accidental local origin that creates a blackhole.


Locally Originated BGP Paths: The Best-Path Step Hidden Behind Weight
Locally Originated BGP Paths: The Best-Path Step Hidden Behind Weight



1. Opening — “local wins” is more nuanced than it looks

Cisco's best-path documentation includes a step that prefers a path originated by BGP on the local router. Engineers often learn this as a simple rule: “local routes win.”

But Cisco also commonly assigns Weight 32768 to locally originated routes, while ordinary received paths have Weight 0. Because Weight is evaluated earlier, many labs never actually reach the explicit “locally originated” comparison step—the local route has already won on Weight.

Day 15 removes that ambiguity.

We deliberately equalize Weight so we can see why local origination is a distinct selection concept. Then we turn the same behavior into a troubleshooting scenario: an accidental network statement backed by a Null0 route causes the router to prefer a local path when the engineering intent was to use an external route.


2. What Cisco means by locally originated

Cisco best-path guidance identifies paths sourced by local BGP configuration such as network or redistribution as locally originated. Cisco also documents nuance around locally generated aggregates.

The key design point is not that local origination is “more truthful.” It simply reflects the local router's policy assertion that it originates the NLRI into BGP.

That assertion can be correct—or dangerously wrong.

A network statement does not verify business ownership, reachability of an application, or whether advertising the prefix is safe. It requires the configured route condition to be satisfied in the local routing table, as covered on Day 10.


3. Why Weight can hide this step

A typical local BGP route on Cisco appears with Weight 32768. A received route normally starts at Weight 0.

Therefore a table may look like this conceptually:

Local path      Weight 32768
Received path   Weight     0

The local path wins at the Weight step, before the algorithm reaches the separate local-origination comparison.

To isolate the next step, our lab assigns Weight 32768 to the received path too. LOCAL_PREF remains equal. Now the router must continue to the local-origination comparison.

This is a teaching technique, not a recommended production policy.


4. Scenario — Quarry Accidental Origin

Illustrative lab — not a real incident.

Topology

Service / upstream R1               Edge R2
      AS65010                       AS65020
203.0.113.0/24 ---- eBGP ---- 192.0.2.2
                                  |
                           local static Null0
                           203.0.113.0/24
                                  +
                           BGP network statement

R2 receives 203.0.113.0/24 from R1. R2 also has a local static route to Null0 and a matching BGP network statement.

For the experiment, the received route is assigned Weight 32768 so Weight ties.

Objective

  • Prove both BGP paths exist.
  • Equalize Weight.
  • Observe that the locally originated path remains preferred.
  • Treat the local origin as an injected fault.
  • Remove the unintended local origination and verify the eBGP path becomes usable.

5. Prerequisites

  • Two IOS XE-capable nodes.
  • Direct eBGP.
  • 203.0.113.0/24 originated by R1 for the lab.
  • Console access to R2.
  • Understanding that Null0 provides control-plane reachability for origination but discards packets sent to it.

6. Baseline configuration

R1 — AS65010

hostname R1
interface GigabitEthernet0/0
 ip address 192.0.2.1 255.255.255.252
 no shutdown
!
ip route 203.0.113.0 255.255.255.0 Null0
!
router bgp 65010
 bgp router-id 10.10.10.1
 neighbor 192.0.2.2 remote-as 65020
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0
  neighbor 192.0.2.2 activate
 exit-address-family

R2 — AS65020

hostname R2
interface GigabitEthernet0/0
 ip address 192.0.2.2 255.255.255.252
 no shutdown
!
ip route 203.0.113.0 255.255.255.0 Null0
!
route-map EQUALIZE-WEIGHT permit 10
 set weight 32768
!
router bgp 65020
 bgp router-id 10.20.20.2
 neighbor 192.0.2.1 remote-as 65010
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0
  neighbor 192.0.2.1 activate
  neighbor 192.0.2.1 route-map EQUALIZE-WEIGHT in
 exit-address-family

This configuration is intentionally unsafe for the prefix: it creates an alternate local origin to Null0.


7. Verification before modification

On R2:

show ip bgp 203.0.113.0
show ip route 203.0.113.0
show route-map EQUALIZE-WEIGHT
show running-config | section router bgp

Evidence to capture:

  • one path is locally originated;
  • one path is learned from 192.0.2.1;
  • both are assigned equal Weight for this controlled experiment;
  • LOCAL_PREF does not create a difference;
  • the local path remains preferred.

Do not fabricate exact output flags. Record them from the selected IOS XE image if the lab is executed.


8. Why the locally originated path matters operationally

A local origin is a policy statement: “this router/AS can originate this NLRI.”

If that statement is backed only by a discard route and no valid forwarding path to the real service, traffic can be attracted and discarded.

This is why Day 10 treated route origination as an export boundary rather than a mere syntax exercise.

Best-path selection magnifies the risk: once a local origin exists, it can outrank an otherwise healthy external path.


9. Fault injection

Illustrative lab — not a real incident.

Lab name

Quarry Accidental Origin

Fault

The network 203.0.113.0 mask 255.255.255.0 statement and supporting Null0 route are present on R2 even though R2 is not supposed to originate the service prefix.

Symptoms

  • eBGP to R1 is Established;
  • R2 receives a valid external path;
  • R2 still selects the local path;
  • forwarding toward the prefix follows the local RIB entry to Null0 and fails.

Misdiagnosis to avoid

“BGP is ignoring the provider route.”

BGP is not ignoring it. It is selecting another eligible path according to policy and implementation rules.


10. Troubleshooting sequence

  1. Confirm the service prefix.
  2. Verify R1 advertises the prefix.
  3. Verify R2 receives the eBGP path.
  4. Inspect all BGP paths, not only the best path.
  5. Check Weight and LOCAL_PREF.
  6. Identify the locally originated path and its source.
  7. Inspect network, redistribution and aggregate configuration.
  8. Inspect the RIB entry satisfying the local origin.
  9. Determine whether the local route represents real service reachability or only Null0.
  10. Remove the smallest incorrect origin source and verify selection again.

11. Controlled correction

If R2 should not originate the prefix:

configure terminal
router bgp 65020
 address-family ipv4 unicast
  no network 203.0.113.0 mask 255.255.255.0
 exit-address-family
no ip route 203.0.113.0 255.255.255.0 Null0
end

If the static route is required for another valid purpose, do not remove it blindly; remove only the BGP origination statement or redesign the route source.

Expected result

The local BGP path disappears. The received eBGP path remains and can become best if it is otherwise eligible.


12. Root cause and correction

Root cause

R2 was configured to originate the same prefix that it was supposed to learn externally. The local origin was supported by a discard route, creating a blackhole.

Correction

Remove the unintended BGP origin and, where appropriate, the discard route that existed only to satisfy it.

Why it works

Once the local path no longer exists, the received path can proceed through best-path selection without competing against a local origin.


13. Post-fix verification

show ip bgp 203.0.113.0
show ip route 203.0.113.0
show ip bgp neighbors 192.0.2.1 routes

Confirm:

  • only the intended external path remains;
  • next hop is reachable;
  • the route is installed according to normal RIB rules;
  • no local advertisement of the prefix remains unless explicitly intended.

14. Rollback

Only rollback if R2 is genuinely supposed to originate the service prefix:

ip route 203.0.113.0 255.255.255.0 Null0
router bgp 65020
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0

Before restoring, verify that the discard route is an intentional aggregate/origination safety mechanism rather than the original cause of service loss.


15. Production lessons

Selection lesson

Do not assume the observed “local wins” behavior is only the explicit local-origination step; default Cisco Weight often decides first.

Origination lesson

A BGP origin is a policy assertion, not proof that the application exists.

Troubleshooting lesson

When a received route looks healthy but is not selected, inspect all local route-generation mechanisms before manipulating external attributes.

Change-management lesson

network, redistribution and aggregate changes can affect path selection as well as advertisement scope.

Safety lesson

Null0 routes are useful in controlled aggregation/origination designs but become dangerous when they outlive the policy that justified them.


15A. Local network, redistribution and aggregate nuance

Cisco's best-path documentation distinguishes among forms of local origination. Routes generated by network or redistribution are locally sourced, while aggregate routes have their own local-generation behavior. Cisco support guidance further notes that local paths sourced by network or redistribution can be preferred over a locally generated aggregate when the comparison reaches that local-path logic.

This matters when a router has multiple local representations of the same destination or overlapping aggregate/specific policy. The correct troubleshooting question is not only “is the route local?” but also “how was this local BGP path created?”

Useful evidence includes:

show running-config | section router bgp
show ip bgp <prefix>
show ip route <prefix>
show route-map

Then trace the path source to one of these mechanisms:

  • exact network origination;
  • redistribution;
  • aggregate generation;
  • policy-driven conditional origination.

Later posts will treat aggregation and conditional advertisement at greater scale. For this day, the lesson is that local generation is not a single undifferentiated state.


15B. Why accidental local origination is a change-control problem

An accidental local origin can survive long after the engineer who created it has forgotten why the supporting static route exists. That is especially common with Null0 routes used to satisfy aggregate or advertisement requirements.

A production change review should therefore pair every local BGP origin with:

  • an owner;
  • a business reason;
  • the exact route that satisfies origination;
  • the expected forwarding behavior;
  • a monitoring signal for loss of the real service behind the prefix;
  • a rollback condition.

The route should never be treated as self-justifying merely because BGP accepts it.


16. Knowledge check

Q1

Why did the lab set the received route's Weight to 32768?

Answer: To tie the normal local-route Weight and expose the separate locally originated best-path comparison instead of letting Weight decide first.

Q2

Does a network statement prove that hosts inside the prefix are reachable?

Answer: No. It originates the NLRI when the required local routing condition is satisfied; it does not validate application reachability or prefix ownership.

Q3

What is the smallest correction if the static route is still needed but BGP must not originate the prefix?

Answer: Remove the BGP network statement while preserving the static route if that static route has a separate valid purpose.


17. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — Decision Process framework.
  2. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.18.x: Configuring BGP* — Cisco best-path ordering and local-path preference.
  3. Cisco — *Select BGP Best-path Algorithm* — locally originated path behavior and Cisco selection details.
  4. Cisco — *Connecting to a Service Provider Using External BGP, IOS XE 17.x* — local route examples showing Weight 32768 and path display fields.

Accessed: 2026-08-11.


Day 14 — BGP LOCAL_PREF: Building an AS-Wide Outbound Exit Policy

Learning objective

Use LOCAL_PREF to create a consistent preferred exit throughout an autonomous system, verify that the attribute is propagated to iBGP peers but not ordinary eBGP peers, and correct a conflicting edge policy.


BGP LOCAL_PREF
BGP LOCAL_PREF



1. Opening — policy must travel farther than one router

Weight solved a local problem on Day 13. LOCAL_PREF solves a different problem: several routers inside one AS need to agree on the preferred outbound exit.

Consider an enterprise with two edge routers. Edge E1 connects to ISP-A and Edge E2 connects to ISP-B. A core router C1 learns both Internet paths through iBGP. The enterprise wants traffic to prefer E1 during normal operation but retain E2 as a backup.

A local-only Weight change on E1 cannot communicate that preference to C1. LOCAL_PREF can.

RFC 4271 defines LOCAL_PREF as a well-known discretionary attribute used inside an AS. Higher LOCAL_PREF is preferred. In ordinary eBGP operation, LOCAL_PREF is not sent to external peers; it is an internal policy signal.


2. What LOCAL_PREF represents

LOCAL_PREF answers an internal policy question:

> “Which exit does this AS prefer for this route?”

It does not tell a remote AS how to enter your network. It tells routers inside your AS how strongly they should prefer a path relative to another path.

Cisco IOS XE documentation uses a default local preference of 100 when no different policy is applied. Operators often use values such as 200 for primary, 150 for secondary and 100 for default, but those numbers are conventions—not protocol-mandated tiers.

The only protocol rule that matters for selection is that the higher LOCAL_PREF wins, assuming the paths are eligible and no earlier Cisco-specific Weight decision has already separated them.


3. Propagation boundary

RFC 4271 requires LOCAL_PREF to be included in UPDATEs to internal peers and prohibits including it in ordinary UPDATEs sent to external peers, except for the special case of BGP confederations.

Operationally:

ISP-A ---> E1 -- LOCAL_PREF 200 --> C1
ISP-B ---> E2 -- LOCAL_PREF 100 --> C1

C1 can make the same preferred-exit decision as the edge routers because the policy value travels through iBGP.

This is why LOCAL_PREF is the canonical BGP tool for outbound exit selection inside an AS.


4. Where to set LOCAL_PREF

The cleanest pattern is usually to classify the route at the ingress edge where it enters the AS.

For example:

route-map ISP-A-IN permit 10
 set local-preference 200
!
router bgp 65030
 address-family ipv4 unicast
  neighbor 192.0.2.1 route-map ISP-A-IN in

The route then carries LOCAL_PREF 200 when E1 advertises it to iBGP peers.

Cisco also provides bgp default local-preference to change the default local preference on a router, but broad defaults deserve caution because they can alter many routes at once.


5. Scenario — Meridian Preferred Exit

Illustrative lab 

Topology

BGP LOCAL_PREF: Building an AS-Wide Outbound Exit Policy
BGP LOCAL_PREF: Building an AS-Wide Outbound Exit Policy



 ISP-A R1                 ISP-B R2
 AS65010                  AS65020
    | eBGP                   | eBGP
    |                        |
 E1 ----------------------- E2
 AS65030        iBGP        AS65030
   \                         /
    \        iBGP           /
             C1
          AS65030

Use documentation-safe transit addressing:

  • R1–E1: 192.0.2.0/30
  • R2–E2: 198.51.100.0/30
  • E1–C1: 203.0.113.0/30
  • E2–C1: 203.0.113.4/30
  • E1–E2: 203.0.113.8/30

Both providers advertise lab prefix 192.0.2.128/25.

Objective

  • E1 sets LOCAL_PREF 200 on the ISP-A path.
  • E2 leaves the ISP-B path at 100.
  • Both edges use next-hop-self toward C1 for this foundation lab.
  • C1 prefers E1.
  • Removing E1's policy causes C1 to return to later tie-breakers.

6. Prerequisites

  • Five logical roles: R1, R2, E1, E2 and C1.
  • IOS XE-compatible lab nodes for enterprise BGP roles.
  • Full-mesh iBGP among E1, E2 and C1 for this small topology.
  • Reachable iBGP next hops.
  • Both provider paths otherwise constructed to be comparable.

Route reflectors are intentionally deferred to the iBGP-scaling module.


7. Topic-specific configuration excerpt

The complete interface underlay is stored in the companion lab files. The policy-relevant configuration is shown here.

E1

ip prefix-list LAB-SERVICE permit 192.0.2.128/25
!
route-map ISP-A-IN permit 10
 match ip address prefix-list LAB-SERVICE
 set local-preference 200
route-map ISP-A-IN permit 20
!
router bgp 65030
 neighbor 192.0.2.1 remote-as 65010
 neighbor 203.0.113.2 remote-as 65030
 neighbor 203.0.113.10 remote-as 65030
 address-family ipv4 unicast
  neighbor 192.0.2.1 activate
  neighbor 192.0.2.1 route-map ISP-A-IN in
  neighbor 203.0.113.2 activate
  neighbor 203.0.113.2 next-hop-self
  neighbor 203.0.113.10 activate
  neighbor 203.0.113.10 next-hop-self
 exit-address-family

E2

router bgp 65030
 neighbor 198.51.100.1 remote-as 65020
 neighbor 203.0.113.6 remote-as 65030
 neighbor 203.0.113.9 remote-as 65030
 address-family ipv4 unicast
  neighbor 198.51.100.1 activate
  neighbor 203.0.113.6 activate
  neighbor 203.0.113.6 next-hop-self
  neighbor 203.0.113.9 activate
  neighbor 203.0.113.9 next-hop-self
 exit-address-family

C1

router bgp 65030
 neighbor 203.0.113.1 remote-as 65030
 neighbor 203.0.113.5 remote-as 65030
 address-family ipv4 unicast
  neighbor 203.0.113.1 activate
  neighbor 203.0.113.5 activate
 exit-address-family

The exact interface mapping in the lab package must match these neighbor addresses before execution.


8. Verification before policy

On C1:

show ip bgp 192.0.2.128
show ip bgp summary
show ip route 203.0.113.1
show ip route 203.0.113.5

On E1 and E2:

show ip bgp 192.0.2.128
show ip bgp neighbors <internal-peer> advertised-routes

Record the baseline before setting LOCAL_PREF 200. Do not assume which equal path wins before policy; late tie-breakers can depend on IDs and arrival order.


9. Controlled modification

Apply the inbound route map on E1 and use a safe inbound refresh if needed.

Expected path logic:

ISP-A path enters E1
        |
set LOCAL_PREF 200
        |
iBGP advertisement to C1
        |
C1 compares 200 versus 100
        |
C1 prefers E1 exit

Verify on C1:

show ip bgp 192.0.2.128
show ip route 192.0.2.128 255.255.255.128

The path via E1 should display the higher LOCAL_PREF and become best if Weight is equal and both paths remain eligible.


10. Fault injection

Illustrative lab — not a real incident.

Lab name

Meridian Split Policy

Fault

E2 accidentally applies LOCAL_PREF 250 to the ISP-B path while E1 applies 200.

route-map ISP-B-IN permit 10
 set local-preference 250
!
router bgp 65030
 address-family ipv4 unicast
  neighbor 198.51.100.1 route-map ISP-B-IN in

Expected symptom

C1 prefers E2, even though documentation says ISP-A is primary.

Misleading symptom

Both edge sessions are healthy. There is no protocol failure. The problem is policy correctness.


11. Troubleshooting sequence

  1. Confirm the affected prefix and desired primary exit.
  2. Verify both eBGP sessions.
  3. Inspect C1's candidate paths and LOCAL_PREF values.
  4. Trace each LOCAL_PREF back to the ingress edge policy.
  5. Inspect inbound route maps and prefix-list matches.
  6. Check for bgp default local-preference on either edge.
  7. Check for Cisco Weight that could override the LOCAL_PREF decision locally.
  8. Confirm next-hop reachability and RIB installation.
  9. Correct the smallest wrong policy value or match condition.
  10. Refresh safely and verify stable convergence.

12. Root cause and correction

Root cause

The backup edge assigned a higher LOCAL_PREF than the designated primary edge.

Correction

Remove or lower the incorrect E2 policy so the intended ranking is restored—for example E1 = 200, E2 = 100.

Why it works

LOCAL_PREF is propagated inside the AS, so C1 and the edge routers can make a consistent outbound-exit decision from the same policy signal.


13. Post-fix verification

On C1:

show ip bgp 192.0.2.128
show ip route 192.0.2.128 255.255.255.128

On E1/E2:

show route-map
show running-config | section router bgp
show ip bgp neighbors <peer> routes

If a data-plane endpoint exists, verify traffic exits through E1 and that failure of E1 causes the tested prefix to use E2.


14. Rollback

On E1:

router bgp 65030
 address-family ipv4 unicast
  no neighbor 192.0.2.1 route-map ISP-A-IN in

If the route map is used elsewhere, do not delete it globally until references are checked.

Rollback should restore the baseline decision process, not necessarily force the path through a specific peer.


15. Production design considerations

Set policy at ingress

Classifying a route when it enters the AS makes intent easier to reason about than changing preference repeatedly downstream.

Use a documented preference scale

Values are arbitrary, but a documented internal convention reduces accidental inversions.

Do not confuse outbound and inbound engineering

LOCAL_PREF primarily influences which exit your AS uses. It does not directly force external networks to choose how they enter your AS.

Audit broad defaults

bgp default local-preference can be valid, but broad defaults have larger blast radius than selective route-map policy.

Watch interactions with security

RPKI or customer/peer classification policy may intentionally lower LOCAL_PREF for certain routes. A later broad route map must not accidentally undo those controls.


15A. What LOCAL_PREF does not solve

LOCAL_PREF is powerful precisely because it is scoped to routing policy inside the AS, but that means it does not solve every traffic-engineering problem.

It does not force inbound traffic

If AS65030 gives ISP-A a LOCAL_PREF of 200, that tells AS65030's own routers to leave through ISP-A. A remote network choosing how to reach AS65030 does not receive that LOCAL_PREF in normal eBGP and cannot use it directly. Inbound engineering requires different tools such as selective advertisement, more-specific prefixes, provider communities, MED in the appropriate relationship, or carefully designed AS-path prepending.

It does not repair an unreachable next hop

A path with LOCAL_PREF 200 is not useful if its next hop is inaccessible. Day 12 remains a prerequisite: path eligibility and recursive resolution come before assuming that a preference value will translate into forwarding.

It does not override Cisco Weight

On a Cisco router, a local Weight difference is evaluated before LOCAL_PREF. If one edge has an unexplained Weight override, the router can disagree with the AS-wide policy even though the LOCAL_PREF values are correct.

It should not become a dumping ground for every policy decision

A mature design often uses communities to classify route source or business relationship and then derives LOCAL_PREF from that classification. This separates route meaning from route preference and makes policy easier to audit. The community modules later in the series will build that pattern explicitly.


15B. Preference-scale design

There is no RFC-defined enterprise scale such as 100/200/300. Operators create their own. A useful scale leaves room between tiers so emergency or security policy can insert temporary values without renumbering everything.

For example, an organization might document:

50   = degraded / temporary fallback
100  = normal backup transit
150  = normal secondary transit
200  = primary transit
250  = customer or preferred private interconnect class

Those numbers are only an example. The engineering requirement is consistency: every ingress policy that assigns LOCAL_PREF must align with the same documented hierarchy, and security policy must not be accidentally overridden by a generic route map later in the chain.


16. Knowledge check

Q1

Why does C1 learn the preferred-exit policy when Weight would not provide it?

Answer: LOCAL_PREF is carried to iBGP peers inside the AS, while Weight is local to one Cisco router.

Q2

Does LOCAL_PREF normally cross an eBGP boundary?

Answer: No. RFC 4271 says it must not be included in ordinary UPDATEs sent to external peers, except in the special case of BGP confederations.

Q3

Which LOCAL_PREF is preferred: 80 or 200?

Answer: 200, because higher LOCAL_PREF is preferred.


17. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — LOCAL_PREF definition and propagation rules.
  2. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.18.x: Configuring BGP* — local preference in the Cisco best-path sequence and default 100 behavior.
  3. Cisco — *Cisco IOS IP Routing: BGP Command Reference* — bgp default local-preference.
  4. Cisco — *Cisco IOS IP Routing: Protocol-Independent Command Reference* — set local-preference.

Accessed: 2026-08-11.


Day 13 — Cisco BGP Weight: Local-Only Best-Path Policy Without AS-Wide Propagation

Learning objective

Use Cisco Weight to prefer one path on a single IOS XE router, prove that the decision remains local to that router, and distinguish Weight from standards-based attributes such as LOCAL_PREF.


Cisco BGP Weight: Local-Only Best-Path Policy Without AS-Wide Propagation
Cisco BGP Weight: Local-Only Best-Path Policy Without AS-Wide Propagation



1. Opening — a powerful knob with a deliberately small scope

An enterprise edge router receives the same destination from two external peers. Both routes are valid. Both have reachable next hops. Their standard BGP attributes are otherwise equal enough that the router reaches late tie-breakers.

The operator wants only this router to prefer ISP-A. Other routers in the autonomous system must not inherit that preference.

Cisco Weight is designed for exactly that kind of local decision.

Weight is evaluated before LOCAL_PREF in Cisco's best-path sequence. The higher value wins. The important operational boundary is that Weight is local to the Cisco router: it is not a BGP path attribute defined by RFC 4271 and it is not advertised to BGP peers.

That makes Weight useful—and dangerous. It can create a preference that is invisible to the rest of the AS unless engineers deliberately inspect the router where it was applied.


2. Standards behavior versus Cisco behavior

RFC 4271 defines the standard BGP path attributes used by interoperable BGP speakers. Weight is not among them.

Cisco IOS and IOS XE add Weight as a local selection value. Cisco documentation places it at the beginning of the Cisco best-path algorithm: among otherwise eligible paths, the path with the highest Weight is preferred before the algorithm evaluates LOCAL_PREF and later attributes.

Two consequences follow:

  1. A Weight change can override a LOCAL_PREF difference on the same router.
  2. The Weight change does not travel in an UPDATE to another router.

Do not describe Weight as a transitive, non-transitive, well-known or optional BGP attribute. Those classifications apply to BGP path attributes; Weight is a Cisco-local selection property.


3. Common sources of Weight

Cisco IOS XE can assign Weight in more than one way.

Neighbor-level Weight

A neighbor-level setting applies a local Weight to routes learned from that peer:

neighbor 192.0.2.1 weight 250

This is simple but broad: every applicable route from the neighbor receives the configured value.

Route-map set weight

A route map can set Weight selectively based on prefix, AS path, community or another supported match:

route-map PREFER-SERVICE permit 10
 match ip address prefix-list SERVICE
 set weight 300

Cisco documentation notes that a Weight assigned by set weight can override Weight assigned with the neighbor-level command for matching routes.

Locally originated routes

Cisco commonly displays Weight 32768 for locally originated BGP routes. Received routes normally show Weight 0 unless policy changes it. Day 15 will isolate the separate “locally originated” best-path step rather than relying only on the default Weight difference.


4. Scope comparison: Weight versus LOCAL_PREF

| Property | Weight | LOCAL_PREF |
|---|---|---|
| Standard BGP attribute | No | Yes |
| Cisco-local selection value | Yes | No |
| Advertised to iBGP peers | No | Yes, within the AS |
| Advertised to ordinary eBGP peers | No | No |
| Higher value preferred | Yes | Yes |
| Best use | One-router preference | AS-wide exit policy |

If several routers must agree on the preferred exit, LOCAL_PREF is normally the more appropriate mechanism. If only one Cisco router should prefer a path, Weight can be intentionally narrow.


5. Scenario — Harbor Edge Local Preference

Illustrative lab — not a real incident.

Topology


Cisco BGP Weight: Local-Only Best-Path Policy Without AS-Wide Propagation
Cisco BGP Weight: Local-Only Best-Path Policy Without AS-Wide Propagation


        ISP-A R1                    ISP-B R2
         AS65010                     AS65020
     192.0.2.1/30              198.51.100.1/30
            \                      /
             \ eBGP          eBGP /
              \                  /
               EDGE-R3 AS65030
       192.0.2.2/30   198.51.100.2/30
                       |
                203.0.113.0/24
              learned from both peers

Both providers advertise 203.0.113.0/24. In the closed lab, both paths are deliberately constructed with equal higher-priority standard attributes so the Weight change is easy to observe.

Objective

  • Establish both eBGP sessions.
  • Verify both paths are eligible.
  • Apply Weight 250 to routes from ISP-A.
  • Confirm R3 prefers ISP-A locally.
  • Confirm no BGP UPDATE contains “Weight”.
  • Remove the setting and verify the original decision process returns.

6. Prerequisites

  • Three IOS XE-capable nodes.
  • IOS XE 17.18.x documentation baseline.
  • Direct eBGP from R3 to R1 and R2.
  • Both provider next hops reachable.
  • Console or out-of-band management.
  • A lab-only prefix, 203.0.113.0/24, originated by each provider for controlled comparison.

The dual origination is intentionally artificial for attribute training. Do not model real prefix ownership from it.


7. Baseline configuration

R1 — AS65010

hostname R1
interface GigabitEthernet0/0
 ip address 192.0.2.1 255.255.255.252
 no shutdown
!
ip route 203.0.113.0 255.255.255.0 Null0
!
router bgp 65010
 bgp router-id 10.10.10.1
 neighbor 192.0.2.2 remote-as 65030
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0
  neighbor 192.0.2.2 activate
 exit-address-family

R2 — AS65020

hostname R2
interface GigabitEthernet0/0
 ip address 198.51.100.1 255.255.255.252
 no shutdown
!
ip route 203.0.113.0 255.255.255.0 Null0
!
router bgp 65020
 bgp router-id 10.20.20.2
 neighbor 198.51.100.2 remote-as 65030
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0
  neighbor 198.51.100.2 activate
 exit-address-family

R3 — AS65030

hostname R3
interface GigabitEthernet0/0
 ip address 192.0.2.2 255.255.255.252
 no shutdown
interface GigabitEthernet0/1
 ip address 198.51.100.2 255.255.255.252
 no shutdown
!
router bgp 65030
 bgp router-id 10.30.30.3
 neighbor 192.0.2.1 remote-as 65010
 neighbor 198.51.100.1 remote-as 65020
 address-family ipv4 unicast
  neighbor 192.0.2.1 activate
  neighbor 198.51.100.1 activate
 exit-address-family

8. Verification before modification

On R3:

show ip bgp summary
show ip bgp 203.0.113.0
show ip route 203.0.113.0
show ip route 192.0.2.1
show ip route 198.51.100.1

Confirm:

  • both sessions are Established;
  • both paths to the prefix exist;
  • both next hops resolve;
  • received Weight is the unmodified default for both paths;
  • whichever path is best before the experiment is recorded as baseline evidence.

Do not invent which peer wins the late tie-breakers. The selected image and exact router IDs can influence the baseline result.


9. Controlled modification — prefer ISP-A locally

On R3:

configure terminal
router bgp 65030
 address-family ipv4 unicast
  neighbor 192.0.2.1 weight 250
 end

Use an inbound soft refresh or appropriate safe reprocessing method if the selected image requires routes to be re-evaluated for the new neighbor Weight.

Then verify:

show ip bgp 203.0.113.0
show ip route 203.0.113.0

Expected result

The path learned from 192.0.2.1 should display Weight 250 and become preferred if it remains otherwise eligible.

The peer does not receive an UPDATE containing Weight because Weight is not transmitted as a BGP path attribute.


10. Fault injection

Illustrative lab — not a real incident.

Lab name

Harbor Hidden Weight Override

Fault

An engineer applies Weight 400 to ISP-B while an existing AS-wide LOCAL_PREF policy intends ISP-A to be preferred.

router bgp 65030
 address-family ipv4 unicast
  neighbor 198.51.100.1 weight 400

Expected symptoms

  • R3 chooses ISP-B locally.
  • Other routers in AS65030 do not learn “Weight 400”.
  • A troubleshooting engineer who checks only route policy on another router may see no reason for R3's decision.

Lesson

A local implementation knob can override a standards-based policy on one router without creating an obvious AS-wide policy artifact.


11. Step-by-step troubleshooting

  1. Confirm the affected prefix.
  2. Verify both BGP paths are valid and next hops reachable.
  3. Inspect the full BGP path detail, including Weight and LOCAL_PREF.
  4. Determine whether Weight came from a neighbor command or route map.
  5. Check route-map precedence and matches.
  6. Compare R3's decision with another router in the AS.
  7. Remember that packet captures of BGP UPDATE messages will not show Weight.
  8. Identify whether the intended policy is router-local or AS-wide.
  9. Remove the smallest incorrect Weight policy.
  10. Re-evaluate the route and verify forwarding.

12. Root cause and correction

Root cause

The router-local Weight value took precedence over later selection attributes.

Correction

Remove or narrow the Weight policy if the intent is not local to that router. If the intended decision must be shared throughout the AS, implement an appropriately designed LOCAL_PREF policy instead.

Why the correction works

It removes the earlier Cisco-local selection override, allowing the path to be compared using the intended standard attributes and later tie-breakers.


13. Post-fix verification

show ip bgp 203.0.113.0
show running-config | section router bgp
show route-map
show ip route 203.0.113.0

Record:

  • Weight on each path;
  • selected best path;
  • next-hop resolution;
  • route installed in the RIB;
  • any change in traffic path if a forwarding endpoint is added.

14. Rollback

router bgp 65030
 address-family ipv4 unicast
  no neighbor 192.0.2.1 weight 250
  no neighbor 198.51.100.1 weight 400

If Weight was set by route map, rollback the route-map clause rather than only removing a neighbor command.

Preserve before/after show ip bgp evidence because the local-only nature of Weight can otherwise make the original cause hard to reconstruct.


15. Production lessons

Design lesson

Use Weight only when router-local policy is actually desired.

Operations lesson

A distributed troubleshooting workflow must include local path-selection state; an AS-wide policy review alone can miss Weight.

Change-management lesson

Because Weight is evaluated early, a small configuration change can redirect large traffic volumes immediately on that router.

Portability lesson

Weight is Cisco-specific. Designs intended to remain vendor-neutral should prefer standards-based policy mechanisms when possible.

Security lesson

Unexpected local preference overrides can defeat carefully designed containment or preferred-exit policy. Treat path-selection changes as high-impact routing changes.


16. Knowledge check

Q1

Why does another iBGP router not see the Weight value configured on R3?

Answer: Weight is a Cisco-local selection property, not a BGP path attribute carried in UPDATE messages.

Q2

Which path wins if one path has Weight 300 and another has higher LOCAL_PREF but Weight 0, assuming both are eligible?

Answer: On Cisco's documented selection order, the path with Weight 300 is evaluated as better before LOCAL_PREF is considered.

Q3

When is LOCAL_PREF usually a better tool than Weight?

Answer: When the preferred exit should be communicated consistently to other BGP speakers inside the same AS.


17. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — standard BGP path attributes and Decision Process.
  2. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.18.x: Configuring BGP* — Cisco path-selection ordering.
  3. Cisco — *Connecting to a Service Provider Using External BGP, IOS XE 17.x* — configuring neighbor Weight and policy examples.
  4. Cisco — *Cisco IOS IP Routing: BGP Command Reference* — neighbor weight syntax and behavior.

Accessed: 2026-08-11.


Day 12 — BGP NEXT_HOP: Reachability, iBGP Preservation and `next-hop-self`

Learning objective

Predict common NEXT_HOP behavior across eBGP and iBGP, prove whether a received next hop is recursively reachable, and correct an iBGP path that is unusable because the external next hop was preserved.


BGP NEXT_HOP: Reachability, iBGP Preservation and `next-hop-self`
BGP NEXT_HOP: Reachability, iBGP Preservation and `next-hop-self`



1. Opening — a route can be learned correctly and still be unusable

BGP may know the destination, prefer the path attributes and still refuse to use the route because the next hop cannot be resolved.

This is one of the most important boundaries between the BGP control plane and the rest of the routing system.

Imagine three routers:

  • R1 is an external peer.
  • R2 learns a service prefix from R1 with eBGP.
  • R2 advertises that route to R3 with iBGP.

By default, iBGP commonly preserves the BGP NEXT_HOP of an externally learned route. If R3 has no route to that external next-hop address, the route can become unusable even though the R2–R3 iBGP session is perfectly Established.

The fix may be next-hop-self—but only after proving that next-hop reachability is the actual cause.


2. NEXT_HOP is a path attribute

RFC 4271 defines NEXT_HOP as a well-known mandatory path attribute in the base IPv4-unicast model.

Its purpose is to identify the next-hop IP address used to reach the destinations described by the associated NLRI.

This means BGP path selection cannot be understood only by reading AS_PATH or LOCAL_PREF. The forwarding system must be able to resolve the next hop.

Cisco's IOS XE 17.18.x BGP documentation explicitly notes that a path with an inaccessible next hop is not eligible to proceed normally through selection/use.


3. Common eBGP behavior

On directly connected eBGP sessions, Cisco normally advertises itself as the next hop for routes it sends to the external neighbor.

That is why a route learned from one eBGP hop usually points to the peer's directly reachable interface address.

However, BGP standards and implementations also support scenarios involving third-party next hops and explicit next-hop-unchanged behavior. Do not reduce the protocol to the slogan “eBGP always changes next hop.”

The safe operational wording is:

> Direct eBGP on Cisco normally changes the advertised next hop to the sending router, unless a specific design/feature causes different behavior.


4. Common iBGP behavior

When a router advertises an eBGP-learned route to an iBGP peer, the external NEXT_HOP is commonly preserved.

That design makes sense when the internal routing system knows how to reach external-facing next hops. Service-provider and large enterprise networks often intentionally carry those next-hop addresses in an IGP.

But a small enterprise design may not do that.

If R3 receives:

203.0.113.0/24 via NEXT_HOP 192.0.2.1

and has no route to 192.0.2.1, the BGP path is not operationally usable.


5. next-hop-self changes the dependency

Cisco's neighbor next-hop-self command makes the local BGP speaker advertise itself as the next hop toward the selected neighbor for the applicable routes/behavior.

In our three-router example, R2 can tell R3:

203.0.113.0/24 via NEXT_HOP 198.51.100.1

where 198.51.100.1 is R2's directly connected internal address toward R3.

Now R3 can resolve the next hop without learning the R1–R2 external transit subnet.

This is a design choice, not a universal requirement.


6. Alternative design: carry the external next hop in the IGP

Instead of changing NEXT_HOP, an AS can make the existing next-hop address reachable through its IGP or another internal routing mechanism.

That may be preferable in networks where:

  • preserving edge next-hop identity matters;
  • multiple exits exist;
  • route reflectors must not become forwarding hops;
  • BGP PIC or other convergence designs depend on particular next-hop architecture.

The correct solution therefore depends on the intended control-plane and forwarding architecture.

next-hop-self is not a substitute for design.


7. Route-reflector caveat

Cisco documentation contains an important warning: using ordinary neighbor next-hop-self on a route reflector does not rewrite the next hop of all reflected client routes in the way an inexperienced operator might expect.

For route-reflector designs, Cisco documents route-map-based approaches for specific reflected-route next-hop changes and warns that incorrect attribute rewriting can create loops or loss of connectivity.

That advanced case belongs in the route-reflector module.

For Day 12, R2 is a normal iBGP speaker, not a route reflector.


8. Scenario — Ridge Internal Next-Hop Failure

Illustrative lab — not a real incident.

Topology


BGP NEXT_HOP: Reachability, iBGP Preservation and `next-hop-self`
BGP NEXT_HOP: Reachability, iBGP Preservation and `next-hop-self`


203.0.113.0/24
      |
     R1
   AS65010
192.0.2.1/30
      |
      | eBGP
      |
192.0.2.2/30
     R2 ---------------- R3
   AS65020             AS65020
198.51.100.1/30      198.51.100.2/30
        <--------- iBGP --------->

Objective

  • R1 originates 203.0.113.0/24.
  • R2 learns it through eBGP.
  • R2 advertises it to R3 through iBGP.
  • R3 initially has no route to 192.0.2.1, the preserved external next hop.
  • We prove the next-hop failure, then configure next-hop-self on R2 toward R3.

9. Prerequisites

  • Three IOS XE-capable nodes.
  • IOS XE 17.18.x documentation baseline.
  • Direct eBGP R1–R2.
  • Direct iBGP R2–R3.
  • No IGP/static route on R3 to the R1–R2 transit subnet initially.
  • Console access.

10. Baseline configuration

R1 — AS 65010

hostname R1
interface GigabitEthernet0/0
 ip address 192.0.2.1 255.255.255.252
 no shutdown
!
ip route 203.0.113.0 255.255.255.0 Null0
!
router bgp 65010
 bgp router-id 10.10.10.1
 neighbor 192.0.2.2 remote-as 65020
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.0
  neighbor 192.0.2.2 activate
 exit-address-family

R2 — AS 65020

hostname R2
interface GigabitEthernet0/0
 ip address 192.0.2.2 255.255.255.252
 no shutdown
interface GigabitEthernet0/1
 ip address 198.51.100.1 255.255.255.252
 no shutdown
!
router bgp 65020
 bgp router-id 10.20.20.2
 neighbor 192.0.2.1 remote-as 65010
 neighbor 198.51.100.2 remote-as 65020
 address-family ipv4 unicast
  neighbor 192.0.2.1 activate
  neighbor 198.51.100.2 activate
 exit-address-family

R3 — AS 65020

hostname R3
interface GigabitEthernet0/0
 ip address 198.51.100.2 255.255.255.252
 no shutdown
!
router bgp 65020
 bgp router-id 10.20.20.3
 neighbor 198.51.100.1 remote-as 65020
 address-family ipv4 unicast
  neighbor 198.51.100.1 activate
 exit-address-family

Critically, R3 has no static or IGP route to 192.0.2.0/30.


11. Verification before modification

R2

show ip bgp 203.0.113.0
show ip route 192.0.2.1
show ip bgp neighbors 198.51.100.2 advertised-routes

R2 should be able to resolve 192.0.2.1 because that external neighbor is directly connected.

R3

show ip bgp 203.0.113.0
show ip route 192.0.2.1
show ip route 203.0.113.0
show ip bgp summary

Evidence expectation

The route can be visible in R3's BGP information while failing eligibility/installation because the NEXT_HOP cannot be resolved.

Use the selected image's actual output to document the status. Do not fabricate the exact code/wording that marks the path inaccessible.


12. Fault injection

Illustrative lab — not a real incident.

Lab name

Ridge Internal Next-Hop Failure

Fault

The baseline itself is the fault: R2 advertises the eBGP-learned route to R3 without rewriting NEXT_HOP, and R3 has no route to the external next-hop address.

Symptom

  • iBGP is Established;
  • the destination may appear in BGP detail;
  • the route is not usable/installed as expected;
  • forwarding to the service prefix fails from R3.

Misleading conclusion to avoid

“The iBGP session is up, so the route must be good.”


13. Step-by-step troubleshooting

  1. Confirm the exact destination prefix.
  2. Confirm R2 learned it from R1.
  3. Confirm R2 advertises it toward R3.
  4. Inspect the NEXT_HOP value at R3.
  5. Perform a route lookup for that next-hop address on R3.
  6. Distinguish destination reachability from next-hop reachability.
  7. Confirm no policy intentionally rewrites NEXT_HOP.
  8. Decide whether the design should carry the external transit subnet internally or rewrite next hop at R2.
  9. Apply the smallest design-correct fix.
  10. Verify RIB/FIB and forwarding after correction.

The decisive command in this lab is not a neighbor reset. It is a route lookup for the BGP next hop.


14. Controlled modification — set next hop to R2

On R2:

configure terminal
router bgp 65020
 address-family ipv4 unicast
  neighbor 198.51.100.2 next-hop-self
 end

If the selected IOS XE image uses the command in router scope rather than address-family scope, follow the exact release/platform command reference. Do not silently blend syntax.

Use a safe outbound refresh/re-advertisement if needed so R3 receives the updated attribute.


15. Expected result

R3 should now receive the route with R2 as the BGP NEXT_HOP for the relevant advertisement.

Because R2's 198.51.100.1 address is directly connected to R3, next-hop resolution succeeds.

Expected pipeline:

BGP NLRI present
       |
NEXT_HOP = 198.51.100.1
       |
R3 RIB resolves 198.51.100.1 as connected
       |
BGP path becomes usable
       |
Route can be installed subject to remaining policy/selection rules

16. Root cause and correction

Root cause

R3 learned the destination through iBGP with a preserved external NEXT_HOP (192.0.2.1) that was absent from R3's routing table.

Correction

R2 rewrites the next hop toward R3 with next-hop-self.

Why it works

The change removes R3's dependency on reachability to the external R1–R2 transit address and replaces it with a directly reachable internal next hop: R2.


17. Post-fix verification

On R3:

show ip bgp 203.0.113.0
show ip route 198.51.100.1
show ip route 203.0.113.0

On R2:

show ip bgp neighbors 198.51.100.2 advertised-routes
show ip bgp 203.0.113.0

Positive test

Use a reachable test endpoint if you want end-to-end forwarding validation. The lab's Null0-backed service prefix is primarily a control-plane example, so do not claim application success from it.

Negative test

Remove next-hop-self again and verify that the route returns to the unreachable-next-hop condition if no alternate next-hop reachability exists.


18. Rollback

router bgp 65020
 address-family ipv4 unicast
  no neighbor 198.51.100.2 next-hop-self

Rollback is safe only if the original design intentionally provides next-hop reachability another way. Otherwise removing the command recreates the fault.

Preserve:

  • route details before and after;
  • R3 route lookup for the old and new next hops;
  • advertised-route evidence from R2;
  • relevant configuration.

19. Production design considerations

Do not hide IGP design problems blindly

If a large network is supposed to carry BGP next hops in its IGP, adding next-hop-self everywhere may conceal the real architecture failure.

Do not make route reflectors forwarding dependencies accidentally

Route-reflector next-hop rewriting requires separate design analysis. Cisco specifically warns about ordinary next-hop-self behavior on reflected routes.

Monitor recursive reachability

BGP peer-state monitoring does not detect every next-hop failure. Next-hop tracking and RIB/FIB monitoring are essential for convergence and forwarding assurance.

Separate control-plane visibility from forwarding usability

A route can appear in BGP detail and still fail to install or forward.


20. Production lessons

Protocol lesson

NEXT_HOP is not cosmetic metadata; it links BGP reachability to the underlying routing system.

Troubleshooting lesson

When a route is present in BGP but not usable, perform a route lookup for the next hop before manipulating preference attributes.

Design lesson

Choose intentionally between preserving external next hops internally and rewriting them with next-hop-self.

Change-management lesson

Changing NEXT_HOP can redirect large amounts of traffic. Verify capacity and forwarding before applying it broadly.

Security lesson

Uncontrolled next-hop manipulation can create loops, blackholes or unintended forwarding paths. Treat it as a high-impact attribute change.


21. Knowledge check

Q1

Why can an iBGP-learned route be visible but unusable?

Answer: Its BGP NEXT_HOP may be unreachable in the receiving router's RIB, preventing the path from becoming a usable route.

Q2

What does next-hop-self change in this lab?

Answer: R2 advertises itself as the next hop toward R3, replacing the preserved external R1 next hop with an address R3 can resolve directly.

Q3

Is next-hop-self always the correct solution?

Answer: No. Some designs intentionally preserve BGP next hops and carry them in the IGP or another internal reachability mechanism. The correct solution depends on the architecture.


22. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — NEXT_HOP attribute and route-processing behavior.
  2. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.18.x: Configuring BGP* — inaccessible next-hop handling and BGP path processing.
  3. Cisco — *Cisco IOS IP Routing: BGP Command Reference* — neighbor next-hop-self and neighbor next-hop-unchanged.
  4. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.x: BGP Next Hop Unchanged* — common eBGP next-hop behavior and explicit unchanged behavior.
  5. Cisco — *Configuring Internal BGP Features* — route-reflector next-hop caveats.

Accessed: 2026-08-11.


Day 11 — BGP Aggregation: Summary Routes, ATOMIC_AGGREGATE, AGGREGATOR and the End of AS_SET

Learning objective

Create and verify a BGP aggregate from contributing routes, explain the purpose of ATOMIC_AGGREGATE and AGGREGATOR, use summary-only safely, and avoid legacy AS_SET origination that is prohibited by RFC 9774.


BGP Aggregation: Summary Routes, ATOMIC_AGGREGATE, AGGREGATOR and the End of AS_SET
BGP Aggregation: Summary Routes, ATOMIC_AGGREGATE, AGGREGATOR and the End of AS_SET



1. Opening — aggregation reduces detail, and that loss of detail is the point

BGP aggregation takes several more-specific routes and represents them with a less-specific prefix.

That can reduce routing-table scale and hide unnecessary internal detail, but it also changes what downstream routers know. A summary route may remain advertised even when one of its component prefixes disappears. Path information can become less precise. Route-origin security becomes harder when an aggregate's origin semantics are ambiguous.

For years, many BGP tutorials taught aggregate-address ... as-set as a normal method to preserve contributing AS information. That guidance is no longer current.

In May 2025, RFC 9774 updated BGP standards and prohibited the origination of AS_SET and AS_CONFED_SET path segments. This is a major curriculum correction that a current BGP series must make explicit.

Day 11 therefore teaches both:

  • how Cisco aggregation works;
  • how current standards constrain which legacy aggregation techniques should no longer be used.

2. Aggregation versus origination

Day 10 covered network and redistribution as ways to originate local reachability.

Aggregation is different.

Cisco IOS XE documentation describes aggregate-address as creating an aggregate when at least one more-specific contributing route exists in the BGP table.

Conceptually:

203.0.113.0/25
203.0.113.128/25
        |
        +---- aggregate ----> 203.0.113.0/24

The aggregate does not prove both component routes are healthy forever. It proves that the conditions for generating the aggregate are currently met.

That distinction creates both operational value and risk.


3. The aggregate-address control

A basic Cisco aggregation command uses the form:

aggregate-address 203.0.113.0 255.255.255.0

Cisco documentation states that aggregation applies to routes that exist in the BGP table and that the aggregate is generated when at least one more-specific route in the range exists.

Without additional suppression, more-specific component routes can continue to be advertised alongside the aggregate.

This is useful when you want:

  • a stable summary;
  • plus specific routes for traffic engineering or failure visibility.

4. summary-only suppresses the contributing specifics from advertisement

Adding:

aggregate-address 203.0.113.0 255.255.255.0 summary-only

instructs Cisco BGP to advertise the aggregate while suppressing more-specific routes covered by it toward neighbors, subject to other policy and implementation behavior.

This can dramatically reduce downstream routing detail.

But the consequence must be understood:

> Once only the summary is visible, a remote network can no longer distinguish which components are currently backed by more-specific reachability inside the aggregating AS.

This is not automatically bad; it is exactly what summarization is intended to do. It simply means the aggregating AS now owns responsibility for forwarding every destination represented by the summary.


5. ATOMIC_AGGREGATE — a warning that path detail was lost

RFC 4271 defines ATOMIC_AGGREGATE as a well-known discretionary attribute.

Its purpose is informational: the aggregate may not preserve all AS-path detail of its contributing routes. RFC 4271 warns that the actual path to destinations represented by the aggregate may not be exactly the path expressed in the aggregate's AS_PATH.

Cisco IOS XE documentation for traditional aggregation describes ATOMIC_AGGREGATE behavior with aggregate-address when path information is summarized rather than represented as an AS_SET.

Do not interpret ATOMIC_AGGREGATE as a preference value. It is not a “make this route atomic/better” knob.


6. AGGREGATOR — identifying the aggregation point

RFC 4271 defines AGGREGATOR as an optional transitive attribute.

A BGP speaker that performs aggregation may include information identifying:

  • the AS that performed the aggregation;
  • the BGP speaker/identifier associated with that aggregation.

This helps operators understand where an aggregate was formed.

However, attribute visibility in actual CLI output must be verified on the selected platform/release and route. Do not fabricate an AGGREGATOR field in expected output merely because the standard allows it.


7. Critical current standard: RFC 9774 prohibits new AS_SET origination

Older BGP standards and many vendor examples described an AS_SET as a way to place the unordered set of contributing AS numbers into an aggregate's AS_PATH.

RFC 6472 first recommended against that practice.

RFC 9774, published in May 2025, advances the guidance to a standards requirement. It updates RFC 4271 and RFC 5065 and prohibits originating BGP routes containing AS_SET or AS_CONFED_SET path segments.

Why?

Key reasons include:

  • ambiguous route-origin semantics;
  • complications for RPKI-based security;
  • inconsistent or unstable AS_PATH origin interpretation;
  • implementation complexity;
  • limited real-world value.

Therefore this series will not use aggregate-address ... as-set as a recommended production configuration.

Cisco syntax caveat

Cisco documentation may still expose or describe an as-set keyword because implementation documentation can outlive evolving protocol standards.

If the selected IOS XE image accepts the command, that does not make new AS_SET origination appropriate under current IETF standards.

This is exactly why the project separates:

  • standards behavior;
  • vendor CLI availability;
  • recommended production practice.

8. Scenario — Summit Aggregate Boundary

Illustrative lab — not a real incident.

Objective

R1 originates two /25 component prefixes and generates a /24 aggregate toward R2. We first advertise the aggregate plus specifics. Then we enable summary-only. Finally, we remove one component route while leaving the other present to demonstrate that the aggregate can continue to exist even though part of the summarized space has lost its contributing route.

Topology

BGP Aggregation: Summary Routes, ATOMIC_AGGREGATE, AGGREGATOR and the End of AS_SET
BGP Aggregation: Summary Routes, ATOMIC_AGGREGATE, AGGREGATOR and the End of AS_SET


BGP Route Origination: Network Statements, Redistribution and Safe Export Boundaries
203.0.113.0/25 ------\
                       >--- R1 AS65010 --- eBGP --- R2 AS65020
203.0.113.128/25 ----/          |
                         203.0.113.0/24 aggregate

Standards rule

No AS_SET is generated in this lab.


9. Prerequisites

  • Two IOS XE-capable nodes.
  • IOS XE 17.18.x documentation baseline.
  • Console access.
  • Two local component prefixes backed by static routes.
  • Independent management path.

10. Baseline configuration

R1

hostname R1
!
interface GigabitEthernet0/0
 ip address 192.0.2.1 255.255.255.252
 no shutdown
!
ip route 203.0.113.0 255.255.255.128 Null0
ip route 203.0.113.128 255.255.255.128 Null0
!
router bgp 65010
 bgp router-id 10.10.10.1
 neighbor 192.0.2.2 remote-as 65020
 address-family ipv4 unicast
  network 203.0.113.0 mask 255.255.255.128
  network 203.0.113.128 mask 255.255.255.128
  aggregate-address 203.0.113.0 255.255.255.0
  neighbor 192.0.2.2 activate
 exit-address-family

R2

hostname R2
!
interface GigabitEthernet0/0
 ip address 192.0.2.2 255.255.255.252
 no shutdown
!
router bgp 65020
 bgp router-id 10.20.20.2
 neighbor 192.0.2.1 remote-as 65010
 address-family ipv4 unicast
  neighbor 192.0.2.1 activate
 exit-address-family

11. Verification before modification

R1

show ip bgp 203.0.113.0 255.255.255.0
show ip bgp 203.0.113.0 255.255.255.128
show ip bgp 203.0.113.128 255.255.255.128
show ip bgp neighbors 192.0.2.2 advertised-routes

R2

show ip bgp
show ip bgp 203.0.113.0 255.255.255.0

Expected logical state:

  • aggregate exists;
  • both components exist;
  • without summary-only, the components remain eligible to be advertised alongside the aggregate, subject to policy.

12. Controlled modification — suppress the specifics

On R1:

configure terminal
router bgp 65010
 address-family ipv4 unicast
  no aggregate-address 203.0.113.0 255.255.255.0
  aggregate-address 203.0.113.0 255.255.255.0 summary-only
 end

Use the least disruptive route re-advertisement method required by the platform if immediate policy propagation is needed.

Expected control-plane result

R2 should retain the /24 aggregate while the two /25 specifics are suppressed from advertisement by the aggregate's summary-only behavior.


13. Fault injection — lose one component but keep the summary

Illustrative lab — not a real incident.

Lab name

Summit Aggregate Boundary — Hidden Component Loss

Fault

On R1, remove one component route and its network statement:

configure terminal
no ip route 203.0.113.128 255.255.255.128 Null0
router bgp 65010
 address-family ipv4 unicast
  no network 203.0.113.128 mask 255.255.255.128
 end

Expected control-plane observation

Because 203.0.113.0/25 still contributes to the aggregate, the /24 can remain generated and advertised.

Operational implication

R2 still sees the summary and cannot infer from that summary alone that one component disappeared.

The actual forwarding result for destinations in the missing component depends on R1's remaining RIB/FIB and network design. Validate it rather than claiming a blackhole automatically.


14. Troubleshooting workflow

  1. Confirm the remote peer still sees the /24 aggregate.
  2. Check whether the missing service maps to a specific component prefix.
  3. On R1, inspect the BGP table for both /25 components.
  4. Inspect the local RIB for both component source routes.
  5. Confirm summary-only is suppressing remote visibility of specifics.
  6. Determine whether the aggregate remains because another component still exists.
  7. Test forwarding to addresses in the healthy component and the failed component separately.
  8. Restore the missing component only if its underlying service/reachability is actually valid.
  9. Re-verify aggregate and component state.
  10. Decide whether the design requires conditional aggregation or additional monitoring to avoid masking this failure class.

15. Root cause and correction

Root cause

One contributing /25 disappeared while another remained, so the /24 aggregate continued to satisfy the aggregate-generation condition.

Correction

Restore the missing component only when its underlying reachability is intentionally available:

ip route 203.0.113.128 255.255.255.128 Null0
router bgp 65010
 address-family ipv4 unicast
  network 203.0.113.128 mask 255.255.255.128

In a real design, do not restore a fake route merely to make BGP look healthy. The source route must represent intentional forwarding behavior.


16. Post-fix verification

On R1:

show ip route 203.0.113.128 255.255.255.128
show ip bgp 203.0.113.128 255.255.255.128
show ip bgp 203.0.113.0 255.255.255.0

On R2:

show ip bgp 203.0.113.0 255.255.255.0

If summary-only remains configured, R2 is expected to validate the summary rather than the hidden component. Component health must be monitored inside the aggregating AS.


17. Rollback

To return to aggregate-plus-specific advertisement:

router bgp 65010
 address-family ipv4 unicast
  no aggregate-address 203.0.113.0 255.255.255.0 summary-only
  aggregate-address 203.0.113.0 255.255.255.0

Do not use an as-set rollback in new designs. Current RFC 9774 requirements prohibit originating AS_SET/AS_CONFED_SET path segments.


18. Production design considerations

Summaries create ownership

If you advertise a /24, your AS is telling neighbors it can handle traffic for the entire /24, not only whichever /25 happens to be healthy today.

Monitor components internally

External visibility of the summary cannot replace internal monitoring of component reachability.

Avoid legacy AS_SET habits

Old lab manuals and remembered CLI patterns may still teach as-set. Current standards supersede that guidance.

Validate RPKI implications

Aggregation changes origin and prefix relationships. When RPKI is introduced later in the series, ROA coverage and MaxLength design must align with the prefixes actually originated.


19. Production lessons

Standards lesson

RFC 9774 is a major post-RFC-4271 update: new AS_SET and AS_CONFED_SET origination is prohibited.

Design lesson

Aggregation reduces routing detail and transfers responsibility for hidden component health to the aggregating AS.

Troubleshooting lesson

A healthy aggregate does not prove every contributing prefix is healthy.

Security lesson

Ambiguous aggregate origins complicate route-origin security; this is one reason AS_SET was deprecated and then prohibited.

Change-management lesson

summary-only changes what downstream operators can observe. Treat that as an observability change as well as a routing change.


20. Knowledge check

Q1

Can a BGP aggregate remain advertised after one component route disappears?

Answer: Yes, if the implementation's aggregate-generation condition is still satisfied by another contributing more-specific route.

Q2

Should a new production design use aggregate-address ... as-set simply because the Cisco CLI accepts it?

Answer: No. RFC 9774 prohibits originating AS_SET and AS_CONFED_SET path segments. Vendor CLI availability does not override current standards requirements.

Q3

What does summary-only change operationally?

Answer: It suppresses advertisement of the covered more-specific routes while retaining the aggregate, reducing downstream detail and increasing the importance of internal component monitoring.


21. Sources

  1. RFC 4271 — *A Border Gateway Protocol 4 (BGP-4)* — aggregation, ATOMIC_AGGREGATE, AGGREGATOR and route aggregation behavior.
  2. RFC 9774 — *Deprecation of AS_SET and AS_CONFED_SET in BGP* — published May 2025; updates RFC 4271/RFC 5065 and prohibits origination of AS_SET/AS_CONFED_SET path segments.
  3. Cisco — *IP Routing Configuration Guide, Cisco IOS XE 17.x: BGP 4 / Configuring a Basic BGP Network* — aggregate-address, summary-only and legacy as-set CLI behavior.
  4. Cisco — *Understand Route Aggregation in BGP* — aggregation examples and attribute-loss considerations.

Accessed: 2026-08-11.


Featured Post

Day 41 — BGP Confederations: Sub-AS Design, External View and Migration

1. Opening Confederations are another way to scale BGP inside a large administrative domain. They divide the domain into member autonomous systems while presenting a single confederation identifier to external peers. They are powerful, but their operational model is more complex than simply 'using private ASNs inside.' The engineering goal is not to memorize another BGP command. It is to understand what information each speaker is allowed to propagate, what path information can be hidden, and what failure domain is created by the chosen control-plane architecture . 2. Concept and standards behavior RFC 5065 defines AS_CONFED_SEQUENCE and AS_CONFED_SET and how member-AS relationships are represented. Confederation external sessions have eBGP-like properties inside the confederation, while the confederation is presented externally as one AS. Modern guidance must also account for the fact that RFC 9774 prohibits new origination of AS_SET/AS_CONFED_SET in ordinary aggregation c...