Day 37 — Why iBGP Full Mesh Does Not Scale

1. Opening

iBGP does not automatically relay every route learned from another iBGP peer. That behavior prevents simple internal loops but creates a scaling consequence: without another mechanism, every iBGP speaker that must share routes with every other speaker needs direct iBGP adjacency.

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.


Why iBGP Full Mesh Does Not Scale
Why iBGP Full Mesh Does Not Scale


2. Concept and standards behavior

In a plain iBGP design, routes learned from one iBGP peer are not advertised to another iBGP peer. RFC 4456 was created specifically because the resulting full mesh becomes operationally expensive as the number of speakers grows. With n routers, a full mesh requires n(n-1)/2 sessions. Ten speakers require 45 sessions; 50 require 1,225. Session count is not the only cost: every new router also increases configuration, policy and troubleshooting surfaces.

A recurring rule in this module is that configuration scale and routing-information scale are different problems. A design can be easy to configure but still create poor path visibility, slow convergence, or an oversized blast radius. Conversely, a topology can carry complete information but be operationally expensive to maintain.

3. Scenario

Build six routers inside AS65010. R1 originates 203.0.113.0/24. Initially configure only a chain of iBGP sessions R1-R2-R3-R4-R5-R6. The expected failure is that the route does not simply propagate across the chain. Then compare that with a true full mesh.

Documentation-safe addressing is used. The common lab AS is 65010. Internal loopbacks use 192.0.2.0/24 host routes; external test prefixes use 203.0.113.0/24 and 198.51.100.0/24 where needed. All fictional failures are lab-only.

Success criteria

  1. Every speaker learns the routes it is supposed to learn.
  2. The propagation rule can be explained before commands are applied.
  3. Loop-prevention attributes are visible where the feature uses them.
  4. A negative test proves that an invalid or unintended propagation does not occur.
  5. Rollback returns the topology to a known-good control-plane state.

4. Topology diagram

Why iBGP Full Mesh Does Not Scale
Why iBGP Full Mesh Does Not Scale

5. Prerequisites

  • IOS XE 17.18.x documentation baseline.
  • Stable IGP reachability among BGP loopbacks.
  • Explicit update-source and appropriate neighbor reachability for loopback-based sessions.
  • Authentication only if the lab image and design have been validated for it.
  • Independent management access before changing route-reflection/confederation policy.
  • Pre-change capture of BGP summary, selected paths and relevant neighbor state.

6. Baseline configuration

Topic-specific configuration excerpt — not a complete device configuration.

router bgp 65010
 bgp log-neighbor-changes
 neighbor 192.0.2.2 remote-as 65010
 neighbor 192.0.2.2 update-source Loopback0
 !
 address-family ipv4
  neighbor 192.0.2.2 activate
 exit-address-family

Do not silently transfer this syntax to IOS XR or NX-OS. Those platforms must use their own policy/configuration model.

7. Verification before modification

Use a combination of topology, session and route evidence:

show bgp ipv4 unicast summary
show bgp ipv4 unicast
show bgp ipv4 unicast 203.0.113.0/24
show bgp ipv4 unicast neighbors
show ip route

For route-reflection topics also inspect the path detail for ORIGINATOR_ID and CLUSTER_LIST where present. The absence or presence of a route must be explained by the propagation rule, not guessed from neighbor state alone.

8. Controlled modification

Add the missing direct iBGP adjacencies until the six-node topology forms a full mesh. Predict the required session count before configuring it and verify that R6 now learns R1's prefix.

Predict the exact peers whose Adj-RIB-In/Loc-RIB should change. Then apply one control-plane change, re-check path detail, and verify that no unrelated peer loses reachability.

9. Fault injection

Illustrative lab — not a real incident.

Remove one direct session that is the only way a particular speaker receives R1's path while keeping IGP reachability intact. The session topology, not IP reachability, becomes the fault.

Capture the state before and after the fault. A useful fault must change one causal variable only.

10. Step-by-step troubleshooting

  1. Confirm IGP reachability among BGP endpoints.
  2. Confirm TCP/BGP sessions are Established.
  3. Identify where the route originated.
  4. Trace the route one BGP hop at a time.
  5. Determine whether the receiving neighbor is eBGP, ordinary iBGP, RR client, RR non-client, or confederation peer.
  6. Inspect best-path state before assuming propagation is broken.
  7. Inspect ORIGINATOR_ID/CLUSTER_LIST for reflected routes.
  8. Inspect policy and next-hop reachability.
  9. Verify whether an alternative path was never learned, learned but not selected, or selected but not advertised.
  10. Apply the smallest proven correction.
  11. Re-run the same positive and negative tests.
  12. Observe stability before closing the change.

11. Root cause and correction

The proven cause is incomplete iBGP topology combined with the rule that iBGP-learned routes are not normally re-advertised to other iBGP peers. Correct by building the intended full mesh or introducing an explicit scaling architecture such as route reflection/confederations.

The correction must address the architectural cause rather than adding random neighbor statements until the route appears.

12. Post-fix verification

Verify:

  • all intended sessions remain Established;
  • the expected prefix is learned by the intended speakers;
  • reflected attributes are correct where applicable;
  • next hop remains reachable;
  • no routing loop is created;
  • the negative propagation test still passes.

13. Rollback

Restore the previous neighbor relationship or policy, not an ad-hoc alternative. If the change affects route reflection, preserve enough connectivity that clients do not become isolated during rollback. Roll back for unexpected loss of route visibility, oscillation, unintended path change, or evidence that the design created a larger failure domain than approved.

14. Production lessons

Use the full mesh as a conceptual baseline, not as an automatic production recommendation. Count sessions, policy attachment points, change burden and failure domains before deciding how to scale.

Deep-dive engineering notes

Why the session formula matters operationally

The mathematical growth of a full mesh is easy to state but the operational consequence is more important. Every new iBGP speaker can require another neighbor relationship on every existing speaker. That means another authentication relationship if authentication is used, another set of address-family activation decisions, another point where inbound/outbound policy can diverge, another state machine to monitor, and another adjacency to account for during maintenance. The design burden therefore grows faster than the router count.

A full mesh can still be reasonable in a small, stable control-plane core. The lesson is not “full mesh is bad”; the lesson is that it is a scaling baseline whose costs must be consciously accepted. A five-router control plane and a fifty-router control plane are different engineering problems even if both fit in memory.

Why an iBGP chain fails even when every IP hop works

An engineer can ping R1 from R6 and still have missing BGP routes. That distinction is important: IGP reachability proves the TCP endpoints can potentially communicate; it does not override the iBGP advertisement rule. In the chain lab, R2 learning R1's prefix over iBGP does not grant R2 permission to advertise that same path onward to R3 as ordinary iBGP. This is why adding static routes, changing interface costs, or repeatedly clearing sessions does not solve the architectural fault.

A strong troubleshooting workflow therefore records the route at each speaker. If R2 has the prefix and R3 does not, the next question is not “is R3 reachable?” but “what relationship allows R2 to propagate this path to R3?” That question leads naturally to route reflection or confederations.

Scaling metrics worth recording

For a production design review, record at least: number of BGP speakers, expected sessions, number of address families, number of policy variants, number of route sources, route churn, expected convergence objective, and operational ownership. Session count alone can underestimate complexity if each session carries several AFI/SAFI families and unique policy.

Failure-domain implication

A full mesh distributes dependency: there is no single route reflector whose loss removes every reflected path. But it also distributes change surface across every speaker. Route reflection centralizes some control-plane functions and therefore trades adjacency scale for new architectural dependencies. That trade-off is the bridge to Day 38.

15. Knowledge check

  1. Which problem in this post is a control-plane topology problem rather than a command-syntax problem?
  2. What evidence distinguishes “route was never learned” from “route was learned but not selected”?
  3. What negative test proves the scaling feature has not introduced unintended propagation?

Answers

  1. The relationship among BGP speakers and the rules governing propagation.
  2. Per-prefix BGP path detail and neighbor route evidence.
  3. Verify a route that should remain hidden/unadvertised is absent from the relevant neighbor's learned/advertised state.

16. Sources

  • RFC 4271 — BGP-4 base specification and iBGP behavior
  • RFC 4456 — Route Reflection, motivation for avoiding iBGP full mesh
  • Cisco IOS XE 17.18.x BGP configuration guide

RETICUX BGP Mastery — Day 36 --- Dual-Provider Traffic-Engineering Capstone

1. Opening

A production multihoming design must work as a system. Outbound and inbound engineering are different problems, and a design that optimizes both during steady state can fail badly when one provider, one prefix or one policy condition disappears.

The operational objective is not simply to make BGP choose a route. It is to make the intended behavior predictable during the normal state, degraded state, and rollback state.


Dual-Provider Traffic-Engineering Capstone
Dual-Provider Traffic-Engineering Capstone


2. Concept and standards behavior

The capstone combines previously isolated mechanisms. LOCAL_PREF controls enterprise outbound choice. Export policy controls what each provider can learn. A provider community is treated as a provider-specific signal. Conditional advertisement supplies a backup route only when a defined BGP condition changes. RFC 8212's explicit-policy principle is used as the safety mindset at every external boundary.

BGP remains a policy protocol. RFC 4271 provides the protocol framework, while several practical traffic-engineering controls are Cisco or operator-policy mechanisms. Evaluate each design at three layers: protocol behavior, IOS XE implementation, and neighboring-AS policy.

Separate route eligibility, route selection, and route export. Eligibility asks whether a path is usable. Selection determines the local best path. Export policy determines what a neighbor is permitted to learn.

3. Scenario

AS 65010 is dual-homed to ISP-A AS 65020 and ISP-B AS 65030. The enterprise service prefix is 203.0.113.0/24. Transit links use 192.0.2.0/30 and 198.51.100.0/30.

Success criteria 1. Primary and backup behavior is explicit. 2. No route is exported merely because it exists locally. 3. Failure behavior is observable in BGP and advertised-route evidence. 4. Rollback is independent of session redesign. 5. A negative test proves unintended advertisement is absent.

4. Topology

Dual-Provider Traffic-Engineering Capstone
Dual-Provider Traffic-Engineering Capstone

ISP-A AS65020 --- 192.0.2.0/30 --- EDGE1/AS65010
                                      |
                               203.0.113.0/24
                                      |
ISP-B AS65030 --- 198.51.100.0/30 --- EDGE2/AS65010

5. Prerequisites

  • IOS XE 17.18.x documentation baseline.
  • IPv4 unicast activated for both eBGP peers.
  • Service prefix valid for origination.
  • Independent management access.
  • Pre-change capture of BGP state and advertised routes.

6. Baseline configuration

Topic-specific configuration excerpt --- not a complete device configuration.

ip prefix-list PL-SERVICE permit 203.0.113.0/24

route-map FROM-ISP-A permit 10
 set local-preference 200
route-map FROM-ISP-B permit 10
 set local-preference 150

route-map EXPORT-SERVICE permit 10
 match ip address prefix-list PL-SERVICE

router bgp 65010
 address-family ipv4
  neighbor 192.0.2.1 route-map FROM-ISP-A in
  neighbor 198.51.100.1 route-map FROM-ISP-B in
  neighbor 192.0.2.1 route-map EXPORT-SERVICE out
  ! Add provider-specific community and conditional backup policy
  ! only after validating the provider contract and exact lab syntax.
 exit-address-family

7. Verification before modification

show bgp ipv4 unicast
show bgp ipv4 unicast 203.0.113.0/24
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast neighbors 192.0.2.1 advertised-routes
show bgp ipv4 unicast neighbors 198.51.100.1 advertised-routes
show route-map
show ip prefix-list

The question is not whether the policy object exists; it is whether the intended route is selected, matched and actually exported to the intended neighbor.

8. Controlled modification

Stage the change: first explicit import/export filters, then outbound LOCAL_PREF, then inbound TE signal, then conditional backup behavior. Validate each stage before adding the next.

Predict Adj-RIB-Out behavior before applying the change. Re-evaluate policy using the least disruptive supported mechanism.

9. Fault injection

Illustrative lab — not a real incident.

Inject three faults separately: ISP-A session loss, loss of only the primary condition route while the session stays up, and removal of community transmission. Each should produce a different observable symptom.

Change one variable only, capture the changed state, and compare it with the baseline.

10. Troubleshooting

  1. Confirm affected prefix and traffic direction.
  2. Confirm eBGP sessions are Established.
  3. Confirm local route eligibility/origination.
  4. Inspect selected BGP route.
  5. Inspect match objects.
  6. Inspect route-map sequence and implicit deny.
  7. Inspect advertised routes per provider.
  8. Confirm policy direction.
  9. Determine whether route refresh is required.
  10. Run positive traffic test.
  11. Run negative/containment test.
  12. Correct the smallest proven cause and repeat the same evidence set.

11. Root cause and correction

A capstone failure is usually caused by interacting controls being changed together. Restore the last known-good stage, prove baseline behavior, then reintroduce one control at a time.

12. Post-fix verification

Verify session state, route acceptance, selected path, exported attributes, advertised routes, forwarding and the negative test. Local advertisement does not prove remote selection.

13. Rollback

Revert only the new policy action, re-evaluate policy with the least disruptive supported method, and confirm both providers return to baseline. Roll back immediately for loss of all reachability, unintended transit, unapproved deaggregation or export outside the approved prefix set.

14. Production lessons

The strongest multihoming design is not the one with the most attributes. It is the one whose normal, partial-failure, total-failure and rollback states are all explicit and testable.

15. Knowledge check

map?

policy?

leaking?

  1. Why is advertised-routes stronger evidence than displaying a route
  2. Which parts are controlled locally and which depend on upstream
  3. What negative test proves the restricted/backup advertisement is not

Answers

inbound selection are remote policy.

routes in the healthy state.

  1. It validates resulting per-neighbor export state.
  2. Local selection/export are local; remote LOCAL_PREF, propagation and
  3. Verify the protected prefix is absent from the neighbor's advertised

16. Sources

  • RFC 4271
  • RFC 1997
  • RFC 8212
  • Cisco IOS XE 17.x --- BGP policy and conditional advertisement

Day 35 --- Hot-Potato vs Cold-Potato Routing

1. Opening

Hot-potato routing hands traffic to another AS at the nearest acceptable exit. Cold-potato routing intentionally carries traffic farther inside the local network before handoff. Neither is a BGP message type; both emerge from policy, topology and the interaction between BGP and the IGP.

The operational objective is not simply to make BGP choose a route. It is to make the intended behavior predictable during the normal state, degraded state, and rollback state.

#ccna #ccnp #cisco #network #engineer #BGP

Hot-Potato vs Cold-Potato Routing
Hot-Potato vs Cold-Potato Routing


2. Concept and standards behavior

When earlier BGP attributes tie, IGP cost to the BGP NEXT_HOP can influence which exit is selected. Operators can override that outcome using LOCAL_PREF or other policy. The key design question is whether the AS wants to minimize its own transport cost or control the egress location for performance, economics or service reasons.

BGP remains a policy protocol. RFC 4271 provides the protocol framework, while several practical traffic-engineering controls are Cisco or operator-policy mechanisms. Evaluate each design at three layers: protocol behavior, IOS XE implementation, and neighboring-AS policy.

Separate route eligibility, route selection, and route export. Eligibility asks whether a path is usable. Selection determines the local best path. Export policy determines what a neighbor is permitted to learn.

3. Scenario

AS 65010 is dual-homed to ISP-A AS 65020 and ISP-B AS 65030. The enterprise service prefix is 203.0.113.0/24. Transit links use 192.0.2.0/30 and 198.51.100.0/30.

Success criteria 1. Primary and backup behavior is explicit. 2. No route is exported merely because it exists locally. 3. Failure behavior is observable in BGP and advertised-route evidence. 4. Rollback is independent of session redesign. 5. A negative test proves unintended advertisement is absent.

4. Topology

Hot-Potato vs Cold-Potato Routing
Hot-Potato vs Cold-Potato Routing

ISP-A AS65020 --- 192.0.2.0/30 --- EDGE1/AS65010
                                      |
                               203.0.113.0/24
                                      |
ISP-B AS65030 --- 198.51.100.0/30 --- EDGE2/AS65010

5. Prerequisites

  • IOS XE 17.18.x documentation baseline.
  • IPv4 unicast activated for both eBGP peers.
  • Service prefix valid for origination.
  • Independent management access.
  • Pre-change capture of BGP state and advertised routes.

6. Baseline configuration

Topic-specific configuration excerpt --- not a complete device configuration.

router bgp 65010
 address-family ipv4
  neighbor 192.0.2.1 remote-as 65020
  neighbor 198.51.100.1 remote-as 65030
 exit-address-family

! IGP configuration is topology-specific.
! Verify recursive cost to each BGP NEXT_HOP before changing BGP policy.

7. Verification before modification

show bgp ipv4 unicast
show bgp ipv4 unicast 203.0.113.0/24
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast neighbors 192.0.2.1 advertised-routes
show bgp ipv4 unicast neighbors 198.51.100.1 advertised-routes
show route-map
show ip prefix-list

The question is not whether the policy object exists; it is whether the intended route is selected, matched and actually exported to the intended neighbor.

8. Controlled modification

First allow equal higher-priority BGP attributes so the lower IGP cost wins. Then set a higher LOCAL_PREF on the farther exit and verify that policy overrides hot-potato behavior.

Predict Adj-RIB-Out behavior before applying the change. Re-evaluate policy using the least disruptive supported mechanism.

9. Fault injection

Illustrative lab — not a real incident.

Increase the IGP cost to the currently selected next hop without changing LOCAL_PREF. If higher BGP policy already fixes the exit, the traffic should not move merely because the IGP cost changed.

Change one variable only, capture the changed state, and compare it with the baseline.

10. Troubleshooting

  1. Confirm affected prefix and traffic direction.
  2. Confirm eBGP sessions are Established.
  3. Confirm local route eligibility/origination.
  4. Inspect selected BGP route.
  5. Inspect match objects.
  6. Inspect route-map sequence and implicit deny.
  7. Inspect advertised routes per provider.
  8. Confirm policy direction.
  9. Determine whether route refresh is required.
  10. Run positive traffic test.
  11. Run negative/containment test.
  12. Correct the smallest proven cause and repeat the same evidence set.

11. Root cause and correction

The failure is troubleshooting only the IGP when a higher-priority BGP attribute already determines the exit. Correct by walking the best-path decision in order.

12. Post-fix verification

Verify session state, route acceptance, selected path, exported attributes, advertised routes, forwarding and the negative test. Local advertisement does not prove remote selection.

13. Rollback

Revert only the new policy action, re-evaluate policy with the least disruptive supported method, and confirm both providers return to baseline. Roll back immediately for loss of all reachability, unintended transit, unapproved deaggregation or export outside the approved prefix set.

14. Production lessons

Hot versus cold potato is an architecture decision with cost, latency and failure-domain consequences. Document which layer is intended to own the exit choice.

15. Knowledge check

map?

policy?

leaking?

  1. Why is advertised-routes stronger evidence than displaying a route
  2. Which parts are controlled locally and which depend on upstream
  3. What negative test proves the restricted/backup advertisement is not

Answers

inbound selection are remote policy.

routes in the healthy state.

  1. It validates resulting per-neighbor export state.
  2. Local selection/export are local; remote LOCAL_PREF, propagation and
  3. Verify the protected prefix is absent from the neighbor's advertised

16. Sources

  • RFC 4271 --- BGP decision process
  • Cisco IOS XE 17.x --- BGP best-path/next-hop behavior

Day 34 --- Provider Communities for Inbound Traffic Engineering



1. Opening

Many providers publish communities that customers can attach to routes to request specific upstream actions. These can be more precise than blind prepending because the provider maps the community to its own policy. The critical rule is that the meaning is provider-specific unless a community is standardized.

The operational objective is not simply to make BGP choose a route. It is to make the intended behavior predictable during the normal state, degraded state, and rollback state.



Provider Communities for Inbound Traffic Engineering
Provider Communities for Inbound Traffic Engineering

2. Concept and standards behavior

Standard communities such as NO_EXPORT have defined semantics, but a provider's traffic-engineering communities are contractual/operator policy. Never invent a community value. A production post must cite the provider's current documentation before showing an actual value.

BGP remains a policy protocol. RFC 4271 provides the protocol framework, while several practical traffic-engineering controls are Cisco or operator-policy mechanisms. Evaluate each design at three layers: protocol behavior, IOS XE implementation, and neighboring-AS policy.

Separate route eligibility, route selection, and route export. Eligibility asks whether a path is usable. Selection determines the local best path. Export policy determines what a neighbor is permitted to learn.

3. Scenario

AS 65010 is dual-homed to ISP-A AS 65020 and ISP-B AS 65030. The enterprise service prefix is 203.0.113.0/24. Transit links use 192.0.2.0/30 and 198.51.100.0/30.

Success criteria 1. Primary and backup behavior is explicit. 2. No route is exported merely because it exists locally. 3. Failure behavior is observable in BGP and advertised-route evidence. 4. Rollback is independent of session redesign. 5. A negative test proves unintended advertisement is absent.

4. Topology


Hot-Potato vs Cold-Potato Routing
Hot-Potato vs Cold-Potato Routing

ISP-A AS65020 --- 192.0.2.0/30 --- EDGE1/AS65010
                                      |
                               203.0.113.0/24
                                      |
ISP-B AS65030 --- 198.51.100.0/30 --- EDGE2/AS65010

5. Prerequisites

  • IOS XE 17.18.x documentation baseline.
  • IPv4 unicast activated for both eBGP peers.
  • Service prefix valid for origination.
  • Independent management access.
  • Pre-change capture of BGP state and advertised routes.

6. Baseline configuration

Topic-specific configuration excerpt --- not a complete device configuration.

ip prefix-list PL-SERVICE permit 203.0.113.0/24
route-map TO-ISP-B permit 10
 match ip address prefix-list PL-SERVICE
 ! Set only a community value documented by ISP-B.
 ! Example intentionally omitted from canonical config.

router bgp 65010
 address-family ipv4
  neighbor 198.51.100.1 send-community
  neighbor 198.51.100.1 route-map TO-ISP-B out
 exit-address-family

7. Verification before modification

show bgp ipv4 unicast
show bgp ipv4 unicast 203.0.113.0/24
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast neighbors 192.0.2.1 advertised-routes
show bgp ipv4 unicast neighbors 198.51.100.1 advertised-routes
show route-map
show ip prefix-list

The question is not whether the policy object exists; it is whether the intended route is selected, matched and actually exported to the intended neighbor.

8. Controlled modification

In the lab, emulate ISP-B policy with a documentation-only private community such as 65030:90 and map it to lower LOCAL_PREF inside the simulated provider. Clearly label that value as lab-only, not a real provider convention.

Predict Adj-RIB-Out behavior before applying the change. Re-evaluate policy using the least disruptive supported mechanism.

9. Fault injection

Illustrative lab — not a real incident.

Remove send-community while leaving the route map in place. The route remains advertised but the provider no longer receives the policy signal.

Change one variable only, capture the changed state, and compare it with the baseline.

10. Troubleshooting

  1. Confirm affected prefix and traffic direction.
  2. Confirm eBGP sessions are Established.
  3. Confirm local route eligibility/origination.
  4. Inspect selected BGP route.
  5. Inspect match objects.
  6. Inspect route-map sequence and implicit deny.
  7. Inspect advertised routes per provider.
  8. Confirm policy direction.
  9. Determine whether route refresh is required.
  10. Run positive traffic test.
  11. Run negative/containment test.
  12. Correct the smallest proven cause and repeat the same evidence set.

11. Root cause and correction

The failure is assuming that setting a community locally proves it was transmitted or honored. Correct by enabling the required community exchange, verifying the outgoing attribute, and validating the provider-side policy.

12. Post-fix verification

Verify session state, route acceptance, selected path, exported attributes, advertised routes, forwarding and the negative test. Local advertisement does not prove remote selection.

13. Rollback

Revert only the new policy action, re-evaluate policy with the least disruptive supported method, and confirm both providers return to baseline. Roll back immediately for loss of all reachability, unintended transit, unapproved deaggregation or export outside the approved prefix set.

14. Production lessons

Provider communities can create precise inbound TE, blackholing or propagation controls, but only documented meanings are safe. Maintain a provider-community registry with owner, source URL, date checked and rollback behavior.

15. Knowledge check


  1. Why is advertised-routes stronger evidence than displaying a route
  2. Which parts are controlled locally and which depend on upstream
  3. What negative test proves the restricted/backup advertisement is not

Answers

inbound selection are remote policy.

routes in the healthy state.

  1. It validates resulting per-neighbor export state.
  2. Local selection/export are local; remote LOCAL_PREF, propagation and
  3. Verify the protected prefix is absent from the neighbor's advertised

16. Sources

real deployments

  • RFC 1997 --- Communities
  • RFC 8092 --- Large Communities
  • Provider-specific community documentation must be authoritative for

Day 33 --- AS-Path Prepending as Inbound Traffic Engineering

1. Opening

AS-path prepending makes one advertisement appear longer by repeating the local ASN. It can influence remote path selection, but only after higher-priority policy such as remote LOCAL_PREF. It is therefore a signal, not a guarantee.

The operational objective is not simply to make BGP choose a route. It is to make the intended behavior predictable during the normal state, degraded state, and rollback state.


AS-Path Prepending as Inbound Traffic Engineering
AS-Path Prepending as Inbound Traffic Engineering


2. Concept and standards behavior

RFC 4271 uses AS_PATH both for loop detection and as an input to path selection. Cisco route policy can prepend the local AS on selected exports. Remote networks may ignore the intended preference because of LOCAL_PREF, peering relationships, more-specific routes or their own policy.

BGP remains a policy protocol. RFC 4271 provides the protocol framework, while several practical traffic-engineering controls are Cisco or operator-policy mechanisms. Evaluate each design at three layers: protocol behavior, IOS XE implementation, and neighboring-AS policy.

Separate route eligibility, route selection, and route export. Eligibility asks whether a path is usable. Selection determines the local best path. Export policy determines what a neighbor is permitted to learn.

3. Scenario

AS 65010 is dual-homed to ISP-A AS 65020 and ISP-B AS 65030. The enterprise service prefix is 203.0.113.0/24. Transit links use 192.0.2.0/30 and 198.51.100.0/30.

Success criteria 1. Primary and backup behavior is explicit. 2. No route is exported merely because it exists locally. 3. Failure behavior is observable in BGP and advertised-route evidence. 4. Rollback is independent of session redesign. 5. A negative test proves unintended advertisement is absent.

4. Topology

ISP-A AS65020 --- 192.0.2.0/30 --- EDGE1/AS65010
                                      |
                               203.0.113.0/24
                                      |
ISP-B AS65030 --- 198.51.100.0/30 --- EDGE2/AS65010

5. Prerequisites

  • IOS XE 17.18.x documentation baseline.
  • IPv4 unicast activated for both eBGP peers.
  • Service prefix valid for origination.
  • Independent management access.
  • Pre-change capture of BGP state and advertised routes.

6. Baseline configuration

Topic-specific configuration excerpt --- not a complete device configuration.

ip prefix-list PL-SERVICE permit 203.0.113.0/24
route-map PREPEND-ISP-B permit 10
 match ip address prefix-list PL-SERVICE
 set as-path prepend 65010 65010 65010

router bgp 65010
 address-family ipv4
  neighbor 198.51.100.1 route-map PREPEND-ISP-B out
 exit-address-family

7. Verification before modification

show bgp ipv4 unicast
show bgp ipv4 unicast 203.0.113.0/24
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast neighbors 192.0.2.1 advertised-routes
show bgp ipv4 unicast neighbors 198.51.100.1 advertised-routes
show route-map
show ip prefix-list

The question is not whether the policy object exists; it is whether the intended route is selected, matched and actually exported to the intended neighbor.

8. Controlled modification

Apply three additional copies of AS65010 only toward ISP-B. Verify the local advertised path. Use an authorized external looking glass or lab remote AS to test whether ISP-A becomes preferred.

Predict Adj-RIB-Out behavior before applying the change. Re-evaluate policy using the least disruptive supported mechanism.

9. Fault injection

Illustrative lab — not a real incident.

Set a high LOCAL_PREF inside a simulated remote AS for the ISP-B path. The remote AS should still prefer that path despite the longer AS_PATH, demonstrating why prepending is not deterministic.

Change one variable only, capture the changed state, and compare it with the baseline.

10. Troubleshooting

  1. Confirm affected prefix and traffic direction.
  2. Confirm eBGP sessions are Established.
  3. Confirm local route eligibility/origination.
  4. Inspect selected BGP route.
  5. Inspect match objects.
  6. Inspect route-map sequence and implicit deny.
  7. Inspect advertised routes per provider.
  8. Confirm policy direction.
  9. Determine whether route refresh is required.
  10. Run positive traffic test.
  11. Run negative/containment test.
  12. Correct the smallest proven cause and repeat the same evidence set.

11. Root cause and correction

The mistaken assumption is that shortest AS_PATH is globally the first decision. Correct the design expectation: remote business policy may precede AS-path length.

12. Post-fix verification

Verify session state, route acceptance, selected path, exported attributes, advertised routes, forwarding and the negative test. Local advertisement does not prove remote selection.

13. Rollback

Revert only the new policy action, re-evaluate policy with the least disruptive supported method, and confirm both providers return to baseline. Roll back immediately for loss of all reachability, unintended transit, unapproved deaggregation or export outside the approved prefix set.

14. Production lessons

Prepending is most defensible when measured, limited to specific prefixes, and paired with failure testing. Excessive prepends add path noise without creating contractual control.

15. Knowledge check

map?

policy?

leaking?

  1. Why is advertised-routes stronger evidence than displaying a route
  2. Which parts are controlled locally and which depend on upstream
  3. What negative test proves the restricted/backup advertisement is not

Answers

inbound selection are remote policy.

routes in the healthy state.

  1. It validates resulting per-neighbor export state.
  2. Local selection/export are local; remote LOCAL_PREF, propagation and
  3. Verify the protected prefix is absent from the neighbor's advertised

16. Sources

  • RFC 4271 --- AS_PATH selection/loop prevention
  • Cisco IOS XE 17.x --- BGP path manipulation guidance

Day 32 --- Selective Advertisement and More-Specific Traffic Engineering

1. Opening

Selective advertisement controls which prefixes each provider receives. Advertising a more-specific route can attract traffic because forwarding follows longest-prefix match before BGP attributes are compared. That power makes deaggregation effective---and potentially harmful if used casually.

The operational objective is not simply to make BGP choose a route. It is to make the intended behavior predictable during the normal state, degraded state, and rollback state.


Selective Advertisement and More-Specific Traffic Engineering
Selective Advertisement and More-Specific Traffic Engineering


2. Concept and standards behavior

An aggregate and a more-specific are different NLRI. If both are globally visible, routers normally forward destinations covered by the more-specific toward that route regardless of the aggregate's AS-path. The design must therefore distinguish intentional TE from unnecessary contribution to global routing-table growth.

BGP remains a policy protocol. RFC 4271 provides the protocol framework, while several practical traffic-engineering controls are Cisco or operator-policy mechanisms. Evaluate each design at three layers: protocol behavior, IOS XE implementation, and neighboring-AS policy.

Separate route eligibility, route selection, and route export. Eligibility asks whether a path is usable. Selection determines the local best path. Export policy determines what a neighbor is permitted to learn.

3. Scenario

AS 65010 is dual-homed to ISP-A AS 65020 and ISP-B AS 65030. The enterprise service prefix is 203.0.113.0/24. Transit links use 192.0.2.0/30 and 198.51.100.0/30.

Success criteria 1. Primary and backup behavior is explicit. 2. No route is exported merely because it exists locally. 3. Failure behavior is observable in BGP and advertised-route evidence. 4. Rollback is independent of session redesign. 5. A negative test proves unintended advertisement is absent.

4. Topology


Selective Advertisement and More-Specific Traffic Engineering
Selective Advertisement and More-Specific Traffic Engineering

ISP-A AS65020 --- 192.0.2.0/30 --- EDGE1/AS65010
                                      |
                               203.0.113.0/24
                                      |
ISP-B AS65030 --- 198.51.100.0/30 --- EDGE2/AS65010

5. Prerequisites

  • IOS XE 17.18.x documentation baseline.
  • IPv4 unicast activated for both eBGP peers.
  • Service prefix valid for origination.
  • Independent management access.
  • Pre-change capture of BGP state and advertised routes.

6. Baseline configuration

Topic-specific configuration excerpt --- not a complete device configuration.

ip prefix-list PL-AGG permit 203.0.113.0/24
ip prefix-list PL-MORE-SPEC permit 203.0.113.0/25

route-map TO-ISP-A permit 10
 match ip address prefix-list PL-AGG
route-map TO-ISP-A permit 20
 match ip address prefix-list PL-MORE-SPEC

route-map TO-ISP-B permit 10
 match ip address prefix-list PL-AGG

router bgp 65010
 address-family ipv4
  neighbor 192.0.2.1 route-map TO-ISP-A out
  neighbor 198.51.100.1 route-map TO-ISP-B out
 exit-address-family

7. Verification before modification

show bgp ipv4 unicast
show bgp ipv4 unicast 203.0.113.0/24
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast neighbors 192.0.2.1 advertised-routes
show bgp ipv4 unicast neighbors 198.51.100.1 advertised-routes
show route-map
show ip prefix-list

The question is not whether the policy object exists; it is whether the intended route is selected, matched and actually exported to the intended neighbor.

8. Controlled modification

Advertise the /25 only to ISP-A while retaining the /24 to both providers. Predict that destinations in the /25 can prefer ISP-A because of longest-prefix match, assuming upstream acceptance.

Predict Adj-RIB-Out behavior before applying the change. Re-evaluate policy using the least disruptive supported mechanism.

9. Fault injection

Illustrative lab — not a real incident.

Accidentally permit the /25 toward both providers. Observe that the intended directional signal disappears because both upstreams now receive the same more-specific.

Change one variable only, capture the changed state, and compare it with the baseline.

10. Troubleshooting

  1. Confirm affected prefix and traffic direction.
  2. Confirm eBGP sessions are Established.
  3. Confirm local route eligibility/origination.
  4. Inspect selected BGP route.
  5. Inspect match objects.
  6. Inspect route-map sequence and implicit deny.
  7. Inspect advertised routes per provider.
  8. Confirm policy direction.
  9. Determine whether route refresh is required.
  10. Run positive traffic test.
  11. Run negative/containment test.
  12. Correct the smallest proven cause and repeat the same evidence set.

11. Root cause and correction

The root cause is export-policy scope, not best-path selection. Correct the ISP-B prefix list so only the approved aggregate is exported.

12. Post-fix verification

Verify session state, route acceptance, selected path, exported attributes, advertised routes, forwarding and the negative test. Local advertisement does not prove remote selection.

13. Rollback

Revert only the new policy action, re-evaluate policy with the least disruptive supported method, and confirm both providers return to baseline. Roll back immediately for loss of all reachability, unintended transit, unapproved deaggregation or export outside the approved prefix set.

14. Production lessons

Deaggregation is a routing-table and operational cost, not a free TE knob. Use it only with prefix-ownership, RPKI/IRR, provider prefix-length acceptance and rollback implications understood.

15. Knowledge check


  1. Why is advertised-routes stronger evidence than displaying a route
  2. Which parts are controlled locally and which depend on upstream
  3. What negative test proves the restricted/backup advertisement is not

Answers

inbound selection are remote policy.

routes in the healthy state.

  1. It validates resulting per-neighbor export state.
  2. Local selection/export are local; remote LOCAL_PREF, propagation and
  3. Verify the protected prefix is absent from the neighbor's advertised

16. Sources

  • RFC 4271 --- export policy and NLRI
  • Cisco IOS XE 17.x --- BGP configuration and policy guidance

Day 31 --- Conditional Advertisement with advertise-map, exist-map and non-exist-map

1. Opening

Conditional advertisement is useful when a route should be announced only while another BGP condition exists---or only while it does not. It is particularly valuable for backup advertisements in multihomed networks, but it is also easy to misuse because the condition is evaluated from BGP table state, not from an arbitrary business notion of 'the primary circuit is healthy.'

The operational objective is not simply to make BGP choose a route. It is to make the intended behavior predictable during the normal state, degraded state, and rollback state.


Conditional Advertisement with advertise-map, exist-map and non-exist-map
Conditional Advertisement with advertise-map, exist-map and non-exist-map


2. Concept and standards behavior

Cisco conditional advertisement uses an advertise-map to identify what may be announced and an exist-map or non-exist-map to define the BGP-table condition. With non-exist-map, the advertised route becomes eligible when the condition route is absent. With exist-map, it becomes eligible when the condition route is present. This is Cisco implementation behavior; it is not a generic RFC 4271 primitive.

BGP remains a policy protocol. RFC 4271 provides the protocol framework, while several practical traffic-engineering controls are Cisco or operator-policy mechanisms. Evaluate each design at three layers: protocol behavior, IOS XE implementation, and neighboring-AS policy.

Separate route eligibility, route selection, and route export. Eligibility asks whether a path is usable. Selection determines the local best path. Export policy determines what a neighbor is permitted to learn.

3. Scenario

AS 65010 is dual-homed to ISP-A AS 65020 and ISP-B AS 65030. The enterprise service prefix is 203.0.113.0/24. Transit links use 192.0.2.0/30 and 198.51.100.0/30.

Success criteria 1. Primary and backup behavior is explicit. 2. No route is exported merely because it exists locally. 3. Failure behavior is observable in BGP and advertised-route evidence. 4. Rollback is independent of session redesign. 5. A negative test proves unintended advertisement is absent.

4. Topology


Conditional Advertisement with advertise-map, exist-map and non-exist-map
Conditional Advertisement with advertise-map, exist-map and non-exist-map

ISP-A AS65020 --- 192.0.2.0/30 --- EDGE1/AS65010
                                      |
                               203.0.113.0/24
                                      |
ISP-B AS65030 --- 198.51.100.0/30 --- EDGE2/AS65010

5. Prerequisites

  • IOS XE 17.18.x documentation baseline.
  • IPv4 unicast activated for both eBGP peers.
  • Service prefix valid for origination.
  • Independent management access.
  • Pre-change capture of BGP state and advertised routes.

6. Baseline configuration

Topic-specific configuration excerpt --- not a complete device configuration.

router bgp 65010
 address-family ipv4
  network 203.0.113.0 mask 255.255.255.0
  neighbor 192.0.2.1 remote-as 65020
  neighbor 198.51.100.1 remote-as 65030
  neighbor 198.51.100.1 advertise-map ADV-BACKUP non-exist-map PRIMARY-HEALTH
 exit-address-family

ip prefix-list PL-SERVICE permit 203.0.113.0/24
route-map ADV-BACKUP permit 10
 match ip address prefix-list PL-SERVICE

ip prefix-list PL-PRIMARY-HEALTH permit 192.0.2.0/30
route-map PRIMARY-HEALTH permit 10
 match ip address prefix-list PL-PRIMARY-HEALTH

7. Verification before modification

show bgp ipv4 unicast
show bgp ipv4 unicast 203.0.113.0/24
show bgp ipv4 unicast neighbors
show bgp ipv4 unicast neighbors 192.0.2.1 advertised-routes
show bgp ipv4 unicast neighbors 198.51.100.1 advertised-routes
show route-map
show ip prefix-list

The question is not whether the policy object exists; it is whether the intended route is selected, matched and actually exported to the intended neighbor.

8. Controlled modification

Withdraw the route used by PRIMARY-HEALTH and predict that the backup service advertisement becomes eligible toward ISP-B. Then restore it and verify withdrawal of the conditional advertisement.

Predict Adj-RIB-Out behavior before applying the change. Re-evaluate policy using the least disruptive supported mechanism.

9. Fault injection

Illustrative lab — not a real incident.

Remove the condition route while leaving both BGP sessions up. The symptom should be a change in advertisement state rather than a session reset.

Change one variable only, capture the changed state, and compare it with the baseline.

10. Troubleshooting

  1. Confirm affected prefix and traffic direction.
  2. Confirm eBGP sessions are Established.
  3. Confirm local route eligibility/origination.
  4. Inspect selected BGP route.
  5. Inspect match objects.
  6. Inspect route-map sequence and implicit deny.
  7. Inspect advertised routes per provider.
  8. Confirm policy direction.
  9. Determine whether route refresh is required.
  10. Run positive traffic test.
  11. Run negative/containment test.
  12. Correct the smallest proven cause and repeat the same evidence set.

11. Root cause and correction

The usual failure is matching the wrong route in the condition map or assuming interface state is directly tracked. Correct the condition so it represents the BGP reachability signal the design actually intends to use.

12. Post-fix verification

Verify session state, route acceptance, selected path, exported attributes, advertised routes, forwarding and the negative test. Local advertisement does not prove remote selection.

13. Rollback

Revert only the new policy action, re-evaluate policy with the least disruptive supported method, and confirm both providers return to baseline. Roll back immediately for loss of all reachability, unintended transit, unapproved deaggregation or export outside the approved prefix set.

14. Production lessons

Conditional advertisement is a policy-state machine. Document exactly what route constitutes the condition, how quickly it changes, and what false positives could trigger the backup advertisement.

15. Knowledge check

map?

policy?

leaking?

  1. Why is advertised-routes stronger evidence than displaying a route
  2. Which parts are controlled locally and which depend on upstream
  3. What negative test proves the restricted/backup advertisement is not

Answers

inbound selection are remote policy.

routes in the healthy state.

  1. It validates resulting per-neighbor export state.
  2. Local selection/export are local; remote LOCAL_PREF, propagation and
  3. Verify the protected prefix is absent from the neighbor's advertised

16. Sources

  • RFC 4271 --- BGP-4 base behavior
  • Cisco IOS XE 17.x --- BGP VRF-Aware Conditional Advertisement

RETICUX BGP Mastery — Day 30 BGP Policy Changes Without Flapping: Route Refresh, Soft Reset and Safe Rollback



BGP Policy Changes Without Flapping: Route Refresh, Soft Reset and Safe Rollback

Opening

A policy change should not automatically become a routing outage. Modern BGP provides mechanisms for re-evaluating routes without tearing down an established session, but each mechanism has different state, memory and interoperability implications.

Learning objectives

  • Explain the protocol mechanism precisely.
  • Distinguish standards behavior from Cisco implementation behavior.
  • Build a deterministic policy with explicit match and action logic.
  • Verify both received and advertised routing information.
  • Diagnose the failure mode and roll back safely.


BGP Policy Changes Without Flapping: Route Refresh, Soft Reset and Safe Rollback
BGP Policy Changes Without Flapping: Route Refresh, Soft Reset and Safe Rollback


Concept and standards behavior

Policy changes should not require unnecessary session resets. Route Refresh allows a speaker to request re-advertisement from a peer, while Cisco soft-reset mechanisms provide operational alternatives with different memory and interoperability implications. The lab changes a community policy, refreshes inbound routes, verifies the result and rolls back safely.

Implementation boundary: the standard defines the wire attribute and semantics; Cisco IOS XE syntax, defaults and verification commands must be checked against the selected 17.18.x platform documentation before claiming exact execution behavior.

Engineering scenario

The lab uses three documentation-safe routers: EDGE-A (AS 65001), TRANSIT-A (AS 65002) and EDGE-B (AS 65003). EDGE-A originates 192.0.2.0/24 and 198.51.100.0/24; EDGE-B provides a second policy domain. Loopbacks and point-to-point links use TEST-NET values. No production prefixes, credentials or real ASNs are used.

The engineering requirement is to express policy using reusable metadata and precise filters, then prove that the resulting Adj-RIB-In, best path and Adj-RIB-Out behavior match the intended policy.

Topology


Conditional Advertisement with advertise-map, exist-map and non-exist-map
Conditional Advertisement with advertise-map, exist-map and non-exist-map

        AS 65002 TRANSIT-A
       /                   \
  AS 65001 EDGE-A ---- AS 65003 EDGE-B
  192.0.2.0/24
  198.51.100.0/24

Prerequisites

  • Cisco IOS XE 17.18.x or a release with equivalent documented commands.
  • Working eBGP sessions.
  • Reachability between BGP next hops.
  • Address family ipv4 unicast enabled.
  • Console/out-of-band access for rollback.

Baseline configuration

The lab uses a minimal BGP baseline and then introduces only the policy feature under study. Representative configuration is shown below; exact interface names may differ by image.

router bgp 65001
 bgp router-id 10.255.1.1
 neighbor 192.0.2.2 remote-as 65002
 address-family ipv4
  neighbor 192.0.2.2 activate
  network 192.0.2.0 mask 255.255.255.0
 exit-address-family

Verification before modification

Use evidence rather than assumptions:

show ip bgp summary
show ip bgp
show ip bgp neighbors 192.0.2.2 advertised-routes
show ip bgp neighbors 192.0.2.2 received-routes
show ip bgp 192.0.2.0/24

Record the session state, prefix counts, selected path, relevant attributes and advertisement state before changing policy.

Controlled modification

Change an inbound community policy, request a route refresh from the peer, and compare the result with a disruptive session reset. Document when route refresh is available, what information is re-requested, and why stored soft-reconfiguration state can have memory implications.

Fault injection

Illustrative lab — not a real incident. Inject one deliberate policy error: either omit the required send-community capability, invert a permit/deny condition, or apply the policy in the wrong direction. The fault must be introduced independently from the baseline so the learner can prove causality.

Expected symptoms include a route missing a tag, a prefix unexpectedly accepted or rejected, an attribute not being propagated, or an advertisement disappearing from Adj-RIB-Out.

Troubleshooting

  1. Define the affected prefix and peer.
  2. Confirm the BGP session is Established.
  3. Inspect the route in Adj-RIB-In.
  4. Inspect the relevant attribute/community state.
  5. Verify the policy match condition.
  6. Verify the policy direction.
  7. Inspect the selected best path.
  8. Inspect Adj-RIB-Out toward the affected neighbor.
  9. Check whether the capability required for attribute exchange is enabled.
  10. Apply the smallest correction and re-check both control-plane and forwarding results.

Root cause

The smallest proven root cause should be stated only after the evidence chain identifies where the expected policy state diverged from the observed state. Do not blame “BGP” when the evidence points to a policy predicate, attribute propagation rule, address-family activation or missing capability.

Post-fix verification

Verify the peer, prefix, attribute state, selected path, advertised path and traffic behavior. For policy-only changes, also verify that the session did not flap unnecessarily.

Rollback

Remove the new policy or restore the previous sequence, then re-verify the same evidence points used before the change. If the change affects an Internet edge, use out-of-band access and a predefined rollback trigger.

Production lessons

  • Treat BGP policy as code: explicit inputs, deterministic predicates and observable outputs.
  • Prefer reusable metadata over repeated prefix-specific rules where the architecture supports it.
  • Keep import and export intent separate.
  • Verify both sides of a policy boundary.
  • Never assume an attribute is being exchanged merely because it exists locally.

Knowledge check

  1. What is the difference between a route tag and a route decision attribute?
  2. What evidence proves that an outbound policy actually changed Adj-RIB-Out?
  3. Why is a policy change safer when it can be refreshed without tearing down the BGP session?

Answers

  1. A tag such as a community carries policy metadata; a decision attribute such as LOCAL_PREF directly influences selection.
  2. The neighbor’s advertised-route view, combined with the route’s attribute state, proves the outbound result.
  3. Avoiding an unnecessary session reset reduces convergence disruption and preserves established control-plane state.

Sources

  • Cisco command reference: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/command/irg-cr-book/bgp-c1.html
  • Cisco route refresh: https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9600/software/release/17-18/command_reference/b_1718_9600_cr/ip_routing_commands.html

Publishing assets

  • Excerpt: A policy change should not automatically become a routing outage. Modern BGP provides mechanisms for re-evaluating routes without tearing down an established se
  • Social caption: BGP policy becomes safer when intent is explicit, metadata is reusable and every change is observable.
  • Hashtags: #BGP #Networking #Routing #Cisco #NetworkEngineering #NetOps
  • Diagram alt text: Day 30: BGP Policy Changes Without Flapping: Route Refresh, Soft Reset and Safe Rollback shown across a three-router BGP policy topology.

RETICUX BGP Mastery Day 29- BGP Import and Export Policy: The RFC 8212 Safety Boundary

BGP Import and Export Policy: The RFC 8212 Safety Boundary

Opening

An EBGP session is a routing boundary between administrative domains. Treating that boundary as an implicit “send everything, accept everything” relationship is a preventable operational risk. RFC 8212 formalizes explicit import and export policy as the safer model.


BGP Import and Export Policy: The RFC 8212 Safety Boundary
BGP Import and Export Policy: The RFC 8212 Safety Boundary


Learning objectives

  • Explain the protocol mechanism precisely.
  • Distinguish standards behavior from Cisco implementation behavior.
  • Build a deterministic policy with explicit match and action logic.
  • Verify both received and advertised routing information.
  • Diagnose the failure mode and roll back safely.

Concept and standards behavior

A production BGP session needs an explicit statement of what may be accepted and what may be advertised. RFC 8212 updates RFC 4271 so routes on an EBGP session without explicit import/export policy are not eligible for decision or advertisement. The lab builds a default-deny edge and then adds narrowly scoped policy.

Implementation boundary: the standard defines the wire attribute and semantics; Cisco IOS XE syntax, defaults and verification commands must be checked against the selected 17.18.x platform documentation before claiming exact execution behavior.

Engineering scenario

The lab uses three documentation-safe routers: EDGE-A (AS 65001), TRANSIT-A (AS 65002) and EDGE-B (AS 65003). EDGE-A originates 192.0.2.0/24 and 198.51.100.0/24; EDGE-B provides a second policy domain. Loopbacks and point-to-point links use TEST-NET values. No production prefixes, credentials or real ASNs are used.

The engineering requirement is to express policy using reusable metadata and precise filters, then prove that the resulting Adj-RIB-In, best path and Adj-RIB-Out behavior match the intended policy.

Topology


BGP Import and Export Policy: The RFC 8212 Safety Boundary
BGP Import and Export Policy: The RFC 8212 Safety Boundary

        AS 65002 TRANSIT-A
       /                   \
  AS 65001 EDGE-A ---- AS 65003 EDGE-B
  192.0.2.0/24
  198.51.100.0/24

Prerequisites

  • Cisco IOS XE 17.18.x or a release with equivalent documented commands.
  • Working eBGP sessions.
  • Reachability between BGP next hops.
  • Address family ipv4 unicast enabled.
  • Console/out-of-band access for rollback.

Baseline configuration

The lab uses a minimal BGP baseline and then introduces only the policy feature under study. Representative configuration is shown below; exact interface names may differ by image.

router bgp 65001
 bgp router-id 10.255.1.1
 neighbor 192.0.2.2 remote-as 65002
 address-family ipv4
  neighbor 192.0.2.2 activate
  network 192.0.2.0 mask 255.255.255.0
 exit-address-family

Verification before modification

Use evidence rather than assumptions:

show ip bgp summary
show ip bgp
show ip bgp neighbors 192.0.2.2 advertised-routes
show ip bgp neighbors 192.0.2.2 received-routes
show ip bgp 192.0.2.0/24

Record the session state, prefix counts, selected path, relevant attributes and advertisement state before changing policy.

Controlled modification

Start with no EBGP import/export policy, then explicitly permit only 192.0.2.0/24 inbound and only 198.51.100.0/24 outbound. Show how the explicit policy changes the eligible routes and advertisements, and explain the RFC 8212 model separately from platform-specific defaults.

Fault injection

Illustrative lab — not a real incident. Inject one deliberate policy error: either omit the required send-community capability, invert a permit/deny condition, or apply the policy in the wrong direction. The fault must be introduced independently from the baseline so the learner can prove causality.

Expected symptoms include a route missing a tag, a prefix unexpectedly accepted or rejected, an attribute not being propagated, or an advertisement disappearing from Adj-RIB-Out.

Troubleshooting

  1. Define the affected prefix and peer.
  2. Confirm the BGP session is Established.
  3. Inspect the route in Adj-RIB-In.
  4. Inspect the relevant attribute/community state.
  5. Verify the policy match condition.
  6. Verify the policy direction.
  7. Inspect the selected best path.
  8. Inspect Adj-RIB-Out toward the affected neighbor.
  9. Check whether the capability required for attribute exchange is enabled.
  10. Apply the smallest correction and re-check both control-plane and forwarding results.

Root cause

The smallest proven root cause should be stated only after the evidence chain identifies where the expected policy state diverged from the observed state. Do not blame “BGP” when the evidence points to a policy predicate, attribute propagation rule, address-family activation or missing capability.

Post-fix verification

Verify the peer, prefix, attribute state, selected path, advertised path and traffic behavior. For policy-only changes, also verify that the session did not flap unnecessarily.

Rollback

Remove the new policy or restore the previous sequence, then re-verify the same evidence points used before the change. If the change affects an Internet edge, use out-of-band access and a predefined rollback trigger.

Production lessons

  • Treat BGP policy as code: explicit inputs, deterministic predicates and observable outputs.
  • Prefer reusable metadata over repeated prefix-specific rules where the architecture supports it.
  • Keep import and export intent separate.
  • Verify both sides of a policy boundary.
  • Never assume an attribute is being exchanged merely because it exists locally.

Knowledge check

  1. What is the difference between a route tag and a route decision attribute?
  2. What evidence proves that an outbound policy actually changed Adj-RIB-Out?
  3. Why is a policy change safer when it can be refreshed without tearing down the BGP session?

Answers

  1. A tag such as a community carries policy metadata; a decision attribute such as LOCAL_PREF directly influences selection.
  2. The neighbor’s advertised-route view, combined with the route’s attribute state, proves the outbound result.
  3. Avoiding an unnecessary session reset reduces convergence disruption and preserves established control-plane state.

Sources

  • RFC 8212: https://www.rfc-editor.org/rfc/rfc8212
  • Cisco communities: https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/ip-routing/b-ip-routing/m_irg-external-sp-0.html

Publishing assets

  • Excerpt: An EBGP session is a routing boundary between administrative domains. Treating that boundary as an implicit “send everything, accept everything” relationship is
  • Social caption: BGP policy becomes safer when intent is explicit, metadata is reusable and every change is observable.
  • Hashtags: #BGP #Networking #Routing #Cisco #NetworkEngineering #NetOps
  • Diagram alt text: Day 29: BGP Import and Export Policy: The RFC 8212 Safety Boundary shown across a three-router BGP policy topology.

RETICUX BGP Mastery Day 28- BGP Policy Match Tools: Prefix Lists, AS-Path ACLs and Community Lists —

BGP Policy Match Tools: Prefix Lists, AS-Path ACLs and Community Lists


BGP Policy Match Tools: Prefix Lists, AS-Path ACLs and Community Lists
BGP Policy Match Tools: Prefix Lists, AS-Path ACLs and Community Lists


Opening

BGP policy becomes dangerous when every decision is encoded as a long list of unrelated exceptions. The safer approach is to separate matching primitives from policy actions and make every permit and deny explainable.

Learning objectives

  • Explain the protocol mechanism precisely.
  • Distinguish standards behavior from Cisco implementation behavior.
  • Build a deterministic policy with explicit match and action logic.
  • Verify both received and advertised routing information.
  • Diagnose the failure mode and roll back safely.

Concept and standards behavior

Reliable BGP policy begins with precise match conditions. Prefix lists answer “which prefixes?”, AS-path filters answer “which path identities?”, and community lists answer “which policy tags?”. Route maps combine these predicates with attribute-setting and permit/deny behavior. This post teaches the tools as composable policy primitives.

Implementation boundary: the standard defines the wire attribute and semantics; Cisco IOS XE syntax, defaults and verification commands must be checked against the selected 17.18.x platform documentation before claiming exact execution behavior.

Engineering scenario

The lab uses three documentation-safe routers: EDGE-A (AS 65001), TRANSIT-A (AS 65002) and EDGE-B (AS 65003). EDGE-A originates 192.0.2.0/24 and 198.51.100.0/24; EDGE-B provides a second policy domain. Loopbacks and point-to-point links use TEST-NET values. No production prefixes, credentials or real ASNs are used.

The engineering requirement is to express policy using reusable metadata and precise filters, then prove that the resulting Adj-RIB-In, best path and Adj-RIB-Out behavior match the intended policy.

Topology


BGP Policy Match Tools: Prefix Lists, AS-Path ACLs and Community Lists
BGP Policy Match Tools: Prefix Lists, AS-Path ACLs and Community Lists

        AS 65002 TRANSIT-A
       /                   \
  AS 65001 EDGE-A ---- AS 65003 EDGE-B
  192.0.2.0/24
  198.51.100.0/24

Prerequisites

  • Cisco IOS XE 17.18.x or a release with equivalent documented commands.
  • Working eBGP sessions.
  • Reachability between BGP next hops.
  • Address family ipv4 unicast enabled.
  • Console/out-of-band access for rollback.

Baseline configuration

The lab uses a minimal BGP baseline and then introduces only the policy feature under study. Representative configuration is shown below; exact interface names may differ by image.

router bgp 65001
 bgp router-id 10.255.1.1
 neighbor 192.0.2.2 remote-as 65002
 address-family ipv4
  neighbor 192.0.2.2 activate
  network 192.0.2.0 mask 255.255.255.0
 exit-address-family

Verification before modification

Use evidence rather than assumptions:

show ip bgp summary
show ip bgp
show ip bgp neighbors 192.0.2.2 advertised-routes
show ip bgp neighbors 192.0.2.2 received-routes
show ip bgp 192.0.2.0/24

Record the session state, prefix counts, selected path, relevant attributes and advertisement state before changing policy.

Controlled modification

Build a policy with three predicates: prefix-list selects 192.0.2.0/24, AS-path access-list rejects an unwanted transit path, and community-list selects tagged routes. Combine them in route-map sequences and demonstrate implicit deny behavior.

Fault injection

Illustrative lab — not a real incident. Inject one deliberate policy error: either omit the required send-community capability, invert a permit/deny condition, or apply the policy in the wrong direction. The fault must be introduced independently from the baseline so the learner can prove causality.

Expected symptoms include a route missing a tag, a prefix unexpectedly accepted or rejected, an attribute not being propagated, or an advertisement disappearing from Adj-RIB-Out.

Troubleshooting

  1. Define the affected prefix and peer.
  2. Confirm the BGP session is Established.
  3. Inspect the route in Adj-RIB-In.
  4. Inspect the relevant attribute/community state.
  5. Verify the policy match condition.
  6. Verify the policy direction.
  7. Inspect the selected best path.
  8. Inspect Adj-RIB-Out toward the affected neighbor.
  9. Check whether the capability required for attribute exchange is enabled.
  10. Apply the smallest correction and re-check both control-plane and forwarding results.

Root cause

The smallest proven root cause should be stated only after the evidence chain identifies where the expected policy state diverged from the observed state. Do not blame “BGP” when the evidence points to a policy predicate, attribute propagation rule, address-family activation or missing capability.

Post-fix verification

Verify the peer, prefix, attribute state, selected path, advertised path and traffic behavior. For policy-only changes, also verify that the session did not flap unnecessarily.

Rollback

Remove the new policy or restore the previous sequence, then re-verify the same evidence points used before the change. If the change affects an Internet edge, use out-of-band access and a predefined rollback trigger.

Production lessons

  • Treat BGP policy as code: explicit inputs, deterministic predicates and observable outputs.
  • Prefer reusable metadata over repeated prefix-specific rules where the architecture supports it.
  • Keep import and export intent separate.
  • Verify both sides of a policy boundary.
  • Never assume an attribute is being exchanged merely because it exists locally.

Knowledge check

  1. What is the difference between a route tag and a route decision attribute?
  2. What evidence proves that an outbound policy actually changed Adj-RIB-Out?
  3. Why is a policy change safer when it can be refreshed without tearing down the BGP session?

Answers

  1. A tag such as a community carries policy metadata; a decision attribute such as LOCAL_PREF directly influences selection.
  2. The neighbor’s advertised-route view, combined with the route’s attribute state, proves the outbound result.
  3. Avoiding an unnecessary session reset reduces convergence disruption and preserves established control-plane state.

Sources

  • Cisco command reference: https://www.cisco.com/c/en/us/td/docs/ios-xml/ios/iproute_bgp/command/irg-cr-book/bgp-c1.html
  • Cisco route-map continue: https://www.cisco.com/c/en/us/td/docs/routers/ios/config/17-x/ip-routing/b-ip-routing/m_irg-route-map-continue.html

Publishing assets

  • Excerpt: BGP policy becomes dangerous when every decision is encoded as a long list of unrelated exceptions. The safer approach is to separate matching primitives from p
  • Social caption: BGP policy becomes safer when intent is explicit, metadata is reusable and every change is observable.
  • Hashtags: #BGP #Networking #Routing #Cisco #NetworkEngineering #NetOps
  • Diagram alt text: Day 28: BGP Policy Match Tools: Prefix Lists, AS-Path ACLs and Community Lists shown across a three-router BGP policy topology.

RETICUX BGP Mastery -Day 27 - BGP Large Communities: Policy That Survives Four-Byte ASNs —

BGP Large Communities: Policy That Survives Four-Byte ASNs

Opening

The original community format was designed around two-octet ASNs. Modern routing uses four-octet ASNs, and operators still need compact, transitive policy metadata. Large Communities were designed for that exact operational gap.


BGP Large Communities: Policy That Survives Four-Byte ASNs
BGP Large Communities: Policy That Survives Four-Byte ASNs 


Learning objectives

  • Explain the protocol mechanism precisely.
  • Distinguish standards behavior from Cisco implementation behavior.
  • Build a deterministic policy with explicit match and action logic.
  • Verify both received and advertised routing information.
  • Diagnose the failure mode and roll back safely.

Concept and standards behavior

Large Communities solve a key scaling problem in the original two-octet-ASN community convention. RFC 8092 defines a 12-octet value made from a four-octet Global Administrator and two four-octet operator-defined fields. Cisco IOS XE 17.18.x provides large-community lists, matching, setting and verification.

Implementation boundary: the standard defines the wire attribute and semantics; Cisco IOS XE syntax, defaults and verification commands must be checked against the selected 17.18.x platform documentation before claiming exact execution behavior.

Engineering scenario

The lab uses three documentation-safe routers: EDGE-A (AS 65001), TRANSIT-A (AS 65002) and EDGE-B (AS 65003). EDGE-A originates 192.0.2.0/24 and 198.51.100.0/24; EDGE-B provides a second policy domain. Loopbacks and point-to-point links use TEST-NET values. No production prefixes, credentials or real ASNs are used.

The engineering requirement is to express policy using reusable metadata and precise filters, then prove that the resulting Adj-RIB-In, best path and Adj-RIB-Out behavior match the intended policy.

Topology


BGP Large Communities: Policy That Survives Four-Byte ASNs
BGP Large Communities: Policy That Survives Four-Byte ASNs 

        AS 65002 TRANSIT-A
       /                   \
  AS 65001 EDGE-A ---- AS 65003 EDGE-B
  192.0.2.0/24
  198.51.100.0/24

Prerequisites

  • Cisco IOS XE 17.18.x or a release with equivalent documented commands.
  • Working eBGP sessions.
  • Reachability between BGP next hops.
  • Address family ipv4 unicast enabled.
  • Console/out-of-band access for rollback.

Baseline configuration

The lab uses a minimal BGP baseline and then introduces only the policy feature under study. Representative configuration is shown below; exact interface names may differ by image.

router bgp 65001
 bgp router-id 10.255.1.1
 neighbor 192.0.2.2 remote-as 65002
 address-family ipv4
  neighbor 192.0.2.2 activate
  network 192.0.2.0 mask 255.255.255.0
 exit-address-family

Verification before modification

Use evidence rather than assumptions:

show ip bgp summary
show ip bgp
show ip bgp neighbors 192.0.2.2 advertised-routes
show ip bgp neighbors 192.0.2.2 received-routes
show ip bgp 192.0.2.0/24

Record the session state, prefix counts, selected path, relevant attributes and advertisement state before changing policy.

Controlled modification

Define a large-community convention such as 65001:100:1 for customer-originated routes. Match the large community in a route map, set it on export and verify the value on the peer. Compare the semantics with a legacy 65001:100 standard community.

Fault injection

Illustrative lab — not a real incident. Inject one deliberate policy error: either omit the required send-community capability, invert a permit/deny condition, or apply the policy in the wrong direction. The fault must be introduced independently from the baseline so the learner can prove causality.

Expected symptoms include a route missing a tag, a prefix unexpectedly accepted or rejected, an attribute not being propagated, or an advertisement disappearing from Adj-RIB-Out.

Troubleshooting

  1. Define the affected prefix and peer.
  2. Confirm the BGP session is Established.
  3. Inspect the route in Adj-RIB-In.
  4. Inspect the relevant attribute/community state.
  5. Verify the policy match condition.
  6. Verify the policy direction.
  7. Inspect the selected best path.
  8. Inspect Adj-RIB-Out toward the affected neighbor.
  9. Check whether the capability required for attribute exchange is enabled.
  10. Apply the smallest correction and re-check both control-plane and forwarding results.

Root cause

The smallest proven root cause should be stated only after the evidence chain identifies where the expected policy state diverged from the observed state. Do not blame “BGP” when the evidence points to a policy predicate, attribute propagation rule, address-family activation or missing capability.

Post-fix verification

Verify the peer, prefix, attribute state, selected path, advertised path and traffic behavior. For policy-only changes, also verify that the session did not flap unnecessarily.

Rollback

Remove the new policy or restore the previous sequence, then re-verify the same evidence points used before the change. If the change affects an Internet edge, use out-of-band access and a predefined rollback trigger.

Production lessons

  • Treat BGP policy as code: explicit inputs, deterministic predicates and observable outputs.
  • Prefer reusable metadata over repeated prefix-specific rules where the architecture supports it.
  • Keep import and export intent separate.
  • Verify both sides of a policy boundary.
  • Never assume an attribute is being exchanged merely because it exists locally.

Knowledge check

  1. What is the difference between a route tag and a route decision attribute?
  2. What evidence proves that an outbound policy actually changed Adj-RIB-Out?
  3. Why is a policy change safer when it can be refreshed without tearing down the BGP session?

Answers

  1. A tag such as a community carries policy metadata; a decision attribute such as LOCAL_PREF directly influences selection.
  2. The neighbor’s advertised-route view, combined with the route’s attribute state, proves the outbound result.
  3. Avoiding an unnecessary session reset reduces convergence disruption and preserves established control-plane state.

Sources

  • RFC 8092: https://www.rfc-editor.org/rfc/rfc8092
  • Cisco large community: https://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst9600/software/release/17-18/configuration_guide/rtng/b_1718_rtng_9600_cg/configuring_bgp_large_community.html

Publishing assets

  • Excerpt: The original community format was designed around two-octet ASNs. Modern routing uses four-octet ASNs, and operators still need compact, transitive policy metad
  • Social caption: BGP policy becomes safer when intent is explicit, metadata is reusable and every change is observable.
  • Hashtags: #BGP #Networking #Routing #Cisco #NetworkEngineering #NetOps
  • Diagram alt text: Day 27: BGP Large Communities: Policy That Survives Four-Byte ASNs shown across a three-router BGP policy topology.

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...