From point A to point B
Point A: you configure eBGP, iBGP, confederations and route-maps, but each tool lives on its own in your head. Point B: you get a ticket that doesn't tell you how to solve it, you pick the right tool and you close it with evidence: BGP table, routing table, Wireshark and traceroute.
This is the last chapter of the masterclass: five lab tickets that bring everything together.
- How to read a ticket as a business requirement.
- Ticket 8: the /21,
aggregate-address,summary-only, Null0 and the risk of static summarization. - Tickets 9 and 10: communities,
send-community,ip community-list, weight and next hop. - Ticket 11:
no-advertiseto filter without touching R1. - Ticket 12: BGP backdoor, at a glance.
Read the ticket as a requirement
A ticket doesn't bring the solution: it says what the business needs. "R3 must use the 172.16.7.0 segment with EIGRP to reach 60.60.60.60" doesn't say "configure backdoor". You know the BGP toolbox and you choose, as Jesús puts it, the 50-milligram aspirin that cures that headache. That's how tickets arrive in daily operations and in Cisco certification labs.
Before you touch a router, answer four questions:
- Which prefix? Ticket 9 mentions 11.11.11.11, but in the BGP table the prefix is 11.11.11.0/24.
- Which router and which direction? An outbound policy on R1 and an inbound policy on R4 do different things.
- What's the constraint? "Only for that prefix" or "don't use filters on R1" rule tools out.
- How will you test it? Pick the
show, ping or traceroute before you configure.
Read the topology too. Ticket 10 asks to change the next hop "to the physical interface of R4", but R6's direct neighbor is R5. That's why, in the class, the next hop becomes 172.16.6.5, R5's interface. A ticket can also contain a mistake.
Ticket 8: work out the /21
R1 must summarize 192.168.1.1, 192.168.2.1, 192.168.3.1 and 192.168.4.1. Aggregation shrinks the BGP table and the routing table of everyone who receives your routes.
R1 has those networks on loopbacks 200 to 203, with a /32 mask. The first attempt to advertise them with mask 255.255.255.0 doesn't work: network needs an exact match in the routing table.
R1(config)# interface loopback 200
R1(config-if)# ip address 192.168.1.1 255.255.255.255
R1(config)# interface loopback 201
R1(config-if)# ip address 192.168.2.1 255.255.255.255
R1(config)# interface loopback 202
R1(config-if)# ip address 192.168.3.1 255.255.255.255
R1(config)# interface loopback 203
R1(config-if)# ip address 192.168.4.1 255.255.255.255
R1(config)# router bgp 100
! network needs an exact match with the RIB: /32, not /24
R1(config-router)# network 192.168.1.1 mask 255.255.255.255
R1(config-router)# network 192.168.2.1 mask 255.255.255.255
R1(config-router)# network 192.168.3.1 mask 255.255.255.255
R1(config-router)# network 192.168.4.1 mask 255.255.255.255
R6# ping 192.168.1.1 source 60.60.60.60
Now the math. Only the third octet changes: 1, 2, 3 and 4. In binary they are 00000001, 00000010, 00000011 and 00000100. The first five bits are the same: 16 + 5 = /21, mask 255.255.248.0, network 192.168.0.0/21, which covers 192.168.0.0 to 192.168.7.255.
Watch the bit: 255.255.240.0 is a /20. Live, a no aggregate-address with 240 removed nothing, because the configured mask was 248. A wrong bit is the most common reason you lose reachability when you summarize.
aggregate-address, summary-only and Null0
aggregate-address is the native tool. It creates the /21 in the BGP table as long as at least one more-specific prefix exists in the range, and R1 sends an UPDATE with two new attributes:
- ATOMIC_AGGREGATE, well-known discretionary: the prefix is an aggregate and path information may be missing.
- AGGREGATOR, optional transitive: who aggregated, AS 100 and router 1.1.1.1.
R1(config)# router bgp 100
R1(config-router)# aggregate-address 192.168.0.0 255.255.248.0
R1# show ip bgp
R1# show ip bgp 192.168.0.0/21
! "aggregated by 100 1.1.1.1" and "atomic-aggregate"
R1# show ip route
! the /21 points to Null0
R6# show ip bgp 192.168.0.0/21
In R1's routing table the /21 points to Null0. Jesús calls it a wildcard: the summary network doesn't live on any interface, but every route needs an exit. Cisco adds the reason: the Null0 route prevents loops. A packet to 192.168.6.10, inside the /21 but nonexistent, is dropped on R1.
With the plain command, R6 gets the /21 and the four /32s: you added a prefix and removed none. To send only the summary you add summary-only. Wireshark shows an UPDATE with withdrawn routes for the /32s, and R1's show ip bgp marks them with s: suppressed from updates. R6 sees only the /21 and the ping to the four hosts still works.
R1(config)# router bgp 100
R1(config-router)# aggregate-address 192.168.0.0 255.255.248.0 summary-only
R1# show ip bgp
! the four /32 now show "s" (suppressed)
R6# show ip bgp
R6# ping 192.168.4.1 source 60.60.60.60
! remove it: one UPDATE withdraws the /21, another re-advertises the /32
R1(config-router)# no aggregate-address 192.168.0.0 255.255.248.0 summary-only
The five matching bits in the third octet give the /21; summary-only withdraws the /32s and the summary points to Null0. Diagram: The House of Routing.
Static summarization: the black hole
The other way is a static route for the /21 to Null0 plus a network with the same mask. It works, but without ATOMIC_AGGREGATE or AGGREGATOR: the /21 travels like any route advertised with network.
R1(config)# ip route 192.168.0.0 255.255.248.0 Null0
R1(config)# router bgp 100
R1(config-router)# network 192.168.0.0 mask 255.255.248.0
R1# show ip bgp 192.168.0.0/21
! no atomic-aggregate, no aggregator: a plain network route
R1(config)# no interface loopback 200
R1(config)# no interface loopback 201
! ...the /21 is still advertised
R6# ping 192.168.1.1 source 60.60.60.60
The risk shows up when you delete the loopbacks: R1 keeps advertising the /21, because the static route is always there. R6 sees it as valid, but the ping is unreachable. That's a black hole: you tell the world "send me this traffic" and you have nowhere to deliver it. Some do it on purpose to hijack traffic. aggregate-address, on the other hand, is dynamic: no more-specific prefixes, no aggregate.
Communities: tags that travel
A community is a tag you add to the routes you advertise so the receiver can apply policies or filter automatically. Jesús sees it as programmability: the provider designs its tags in advance and each one triggers a traffic rule.
- Well-known:
internet(to everyone),no-export(inside the AS, never over eBGP),no-advertise(to no neighbor) andlocal-AS(only inside the sub-AS of a confederation). - Custom aa:nn: by convention an ASN, a colon and a value you agree on with the other provider, such as 444:6000.
Four rules for every ticket:
- It's an optional transitive attribute (RFC 1997) and Cisco doesn't send it by default: you need
send-communityon every hop. Miss one and the prefix arrives untagged. bothsends standard and extended communities (64 bits, such as the MPLS route target).ip bgp-community new-formatshows communities as aa:nn instead of a 32-bit decimal, just like asdot versus asplain. Put it on every router.additiveadds your tags to the ones the prefix already carries; without it,set communityoverwrites them.
Ticket 9: weight 25000 with 444:6000
R4 must prefer the exit through R2 with weight 25000 for 11.11.11.0/24, only for that prefix, using community 444:6000. Today R4 exits through R3, because of the local preference 500 from ticket 6. In Cisco's best path, weight is checked first, so it wins.
1. Tag at the source. On R1, the prefix-list PL-W selects the prefix and the outbound route-map RM-OUT sets 444:6000. Sequence 20, with no match, lets everything else through. It's applied toward R2 (172.16.1.2) and R3 (172.16.2.3), with send-community both.
R1(config)# ip prefix-list PL-W seq 10 permit 11.11.11.0/24
R1(config)# route-map RM-OUT permit 10
R1(config-route-map)# match ip address prefix-list PL-W
R1(config-route-map)# set community 444:6000
R1(config)# route-map RM-OUT permit 20
R1(config)# ip bgp-community new-format
R1(config)# router bgp 100
R1(config-router)# neighbor 172.16.1.2 send-community both
R1(config-router)# neighbor 172.16.1.2 route-map RM-OUT out
R1(config-router)# neighbor 172.16.2.3 send-community both
R1(config-router)# neighbor 172.16.2.3 route-map RM-OUT out
R1# clear ip bgp * soft
R1# show route-map
2. Pass it on. R2 already gets the tag, but R4 sees 11.11.11.0 with no community. The next hop is missing: R2 and R3 toward R4.
R2(config)# ip bgp-community new-format
R2(config)# router bgp 200
R2(config-router)# neighbor 172.16.3.4 send-community both
R3(config)# ip bgp-community new-format
R3(config)# router bgp 1.1
R3(config-router)# neighbor 172.16.4.4 send-community both
R4(config)# ip bgp-community new-format
R4# show ip bgp 11.11.11.0/24
! Community: 444:6000
3. Recognize it and act. Just as a prefix-list selects prefixes and an ip as-path access-list selects ASes, an ip community-list selects communities. In the route-map, match community takes the list number, not the community.
R4(config)# ip community-list 100 permit 444:6000
R4(config)# route-map RM-WEIGHT-IN permit 10
R4(config-route-map)# match community 100
R4(config-route-map)# set weight 25000
R4(config)# route-map RM-WEIGHT-IN permit 20
R4(config)# router bgp 64100
R4(config-router)# neighbor 172.16.3.2 route-map RM-WEIGHT-IN in
R4# clear ip bgp * soft
R4# show ip bgp 11.11.11.0/24
R4# traceroute 11.11.11.11 source 40.40.40.40
Live, the weight first went into RM-IN, the local preference route-map toward R3, and it would have changed that path too. The fix was a separate route-map, RM-WEIGHT-IN, only toward 172.16.3.2. 11.11.11.0 is still valid through R3, but the best path is through R2, and the traceroute from 40.40.40.40 goes through R2.
Ticket 10: a tag changes the next hop
R6 must receive 33.33.33.0/24 with INTERNET and 444:5000, and that combination must change its next hop, which today is 40.40.40.40, R4's loopback.
1. Carry the tag to R6, inside the confederation: R4 toward R5 and R5 toward R6.
R4(config)# router bgp 64100
R4(config-router)# neighbor 50.50.50.50 send-community both
R5(config)# ip bgp-community new-format
R5(config)# router bgp 64200
R5(config-router)# neighbor 60.60.60.60 send-community both
2. Extend RM-OUT on R1. Sequence 20 was the "permit everything"; now it selects 33.33.33.0/24 with PL-IN and sets internet 444:5000 additive. The "permit everything" moves to 30. After a soft clear, R6 receives the prefix with both tags.
R1(config)# ip prefix-list PL-IN seq 10 permit 33.33.33.0/24
R1(config)# route-map RM-OUT permit 20
R1(config-route-map)# match ip address prefix-list PL-IN
R1(config-route-map)# set community internet 444:5000 additive
R1(config)# route-map RM-OUT permit 30
R1# clear ip bgp * soft
3. Change the next hop on R6. With internet 444:5000 on the same line, the community-list requires both tags: several values on one line are an AND. RM-INET applies set ip next-hop 172.16.6.5 inbound from neighbor 50.50.50.50, in sub-AS 64300.
R6(config)# ip bgp-community new-format
R6(config)# ip community-list 100 permit internet 444:5000
R6(config)# route-map RM-INET permit 10
R6(config-route-map)# match community 100
R6(config-route-map)# set ip next-hop 172.16.6.5
R6(config)# route-map RM-INET permit 20
R6(config)# router bgp 64300
R6(config-router)# neighbor 50.50.50.50 route-map RM-INET in
R6# clear ip bgp * soft
R6# show ip bgp 33.33.33.0/24
R6# show ip route 172.16.6.5
R6# ping 33.33.33.33 source 60.60.60.60
R1 tags, every hop forwards with send-community, and R4 and R6 turn the tag into weight and next hop. Diagram: The House of Routing.
33.33.33.0 now points to 172.16.6.5, R6's direct peer. It's a valid next hop because R6 reaches it directly, so the route passes best path and the ping works.
Ticket 11: no-advertise, filtering without filters
R1 must not advertise R3's prefixes to R2, and filters on R1 aren't allowed. The answer lies in the well-known communities: R3 sets the tag and R1 obeys it. Both no-export (R1–R2 is eBGP) and no-advertise work, the latter meaning "you got it, tell no one", not even your iBGP. Jesús picks the most restrictive one.
R3(config)# ip prefix-list PL30 seq 10 permit 30.30.30.0/24
R3(config)# route-map RM30 permit 10
R3(config-route-map)# match ip address prefix-list PL30
R3(config-route-map)# set community no-advertise additive
R3(config)# route-map RM30 permit 20
R3(config)# router bgp 1.1
R3(config-router)# neighbor 172.16.2.1 send-community both
R3(config-router)# neighbor 172.16.2.1 route-map RM30 out
R3# clear ip bgp * soft
R1# show ip bgp 30.30.30.0/24
! Community: no-advertise
R2# show ip bgp
! 30.30.30.0/24 is gone
standard would be enough, since there are no extended communities. Wireshark shows COMMUNITIES with NO_ADVERTISE, R1 installs 30.30.30.0 with that tag and, on the next update, the prefix disappears from R2.
R3 tags, R1 installs and stays quiet, and R2 loses 30.30.30.0/24. Diagram: The House of Routing.
The consequence: R2 only learned that network through R1, because R4 stopped being a transit AS in ticket 6, so it no longer knows how to reach R3. An outbound policy affects inbound traffic. That's why you should check received-routes on R2 and R4 before you apply it.
This is real on the Internet. At an IXP, the providers of a country exchange local traffic instead of sending it up to the NAP of the Americas in Miami, and save between 50 and 80 milliseconds. With communities agreed with the IXP, you decide which prefixes reach each provider.
Ticket 12: BGP backdoor at a glance
Ticket 12 is covered in full in chapter 7. The workshop repeats it: R3 and R6 form EIGRP 100 on 172.16.7.0/24, but R3 still reaches 60.60.60.0/24 over eBGP, through R4 and R5, because eBGP has distance 20 and EIGRP, 90.
! EIGRP 100 on the R3-R6 link (172.16.7.0/24) is already up
R3# show ip route
! 60.60.60.0/24 is B [20/0]: eBGP beats EIGRP (90)
R3(config)# router bgp 1.1
R3(config-router)# network 60.60.60.0 mask 255.255.255.0 backdoor
R3# show ip bgp
! r RIB-failure: the RIB now installs the EIGRP route (D, 90)
R3# traceroute 60.60.60.60 source 30.30.30.30 ttl 1 5
With backdoor, BGP treats the prefix as local, with distance 200, and doesn't advertise it. It shows as r (RIB-failure), the table installs the EIGRP route and the traceroute arrives in one hop. It only affects that prefix on that router: for the return path you'd need a backdoor for 30.30.30.0 on R6.
Repeat the tickets in your lab
This closes the masterclass: from BGP messages to iBGP, route reflector, confederations, best path, filters, aggregation, communities and backdoor. The next step is yours, and you can take it today:
- Build the six routers with IOSv in GNS3 and solve tickets 8 to 12 without looking at the configuration.
- Capture in Wireshark an UPDATE with ATOMIC_AGGREGATE, one with withdrawn routes and one with COMMUNITIES.
- Break it on purpose: remove a
send-community, use the 240 mask or delete the loopbacks with static summarization. - When it flows, write your own tickets for a teammate.
As Jesús says, repetition is the mother of specialization. Repeat, learn from the mistake and configure again until it feels natural. You already have everything you need.
Class videos
These are the four parts of the ticket workshop that closed the 2nd BGP Marathon. Jesús recorded them live in March 2021 with Cisco IOSv routers in GNS3. We list them in logical order, not by number: part 3 creates the route-map RM-OUT and part 2 extends it. The audio is in Spanish, with subtitles in Spanish, English, French and Portuguese.
- Day 3 · Part 1Ticket 8: route aggregation with aggregate-address and summary-onlyWatch video
- Day 3 · Part 3Tickets 9 and 10: tagging prefixes with communities and passing them onWatch video
- Day 3 · Part 2Tickets 9 and 10: weight with a community-list and next hop with a route-mapWatch video
- Day 3 · Part 4Ticket 12 BGP backdoor, ticket 11 no-advertise and the end of the marathonWatch video
Recorded live; Spanish audio with Spanish, English, French and Portuguese subtitles. When you play it, the video loads from YouTube. Day 3 playlist on YouTube
Test what you learned
1. You must aggregate 192.168.1.1, 192.168.2.1, 192.168.3.1 and 192.168.4.1. Which network and mask do you use?
Answer. 192.168.0.0 with 255.255.248.0, a /21: in the third octet, 1 to 4 share the first five bits and 16 + 5 = 21.
2. With aggregate-address, R6 gets the /21 plus the four /32s. What's missing, and how do the /32s look on R1 afterwards?
Answer. summary-only is missing. R1 withdraws the /32s with an UPDATE carrying withdrawn routes and marks them with s (suppressed).
3. You summarize with ip route to Null0 and network, and the four loopbacks go down. What happens?
Answer. R1 keeps advertising the /21 and drops the traffic it receives: a black hole. With aggregate-address, the aggregate disappears when no more-specific prefixes are left.
4. R2 sees 11.11.11.0/24 with 444:6000, but R4 receives it with no community. What do you check?
Answer. The send-community on R2 and R3 toward R4. It's an optional attribute and it's enabled hop by hop.
5. With no filters on R1, how do you stop R1 from advertising to R2 the 30.30.30.0/24 it learns from R3?
Answer. On R3, an outbound route-map toward R1 with set community no-advertise additive and send-community. R1 installs the route and advertises it to no one.
Key takeaways
- A ticket says what the business needs: identify prefix, router, direction, constraint and test.
- To aggregate, look for the matching bits: 1 to 4 in the third octet give a /21 (255.255.248.0).
aggregate-addressadds ATOMIC_AGGREGATE and AGGREGATOR, points to Null0 and is dynamic;summary-onlysuppresses the specifics.- Static summarization can advertise networks that no longer exist: a black hole.
- Communities:
send-communityon every hop,new-formatto read them andadditiveto keep existing tags. ip community-listandmatch communityturn a tag into weight or next hop.no-advertisefilters from the source without touching R1; backdoor hands one prefix to the IGP on one router.
Official resources
- RFC 1997: BGP Communities Attributerfc-editor.org
- RFC 4271: A Border Gateway Protocol 4 (BGP-4)rfc-editor.org
- Understand Route Aggregation in BGP (Cisco)cisco.com
- Configure an Upstream Provider Network with BGP Community Values (Cisco)cisco.com
- Examine Border Gateway Protocol Case Studies (Cisco)cisco.com
- Cisco IOS IP Routing: BGP Command Referencecisco.com
- Understand Administrative Distance (Cisco)cisco.com
Source and credits. Chapter written from the BGP Masterclass that Jesús Espinoza recorded live in 2021. Text drafted with AI assistance and reviewed; original diagrams by The House of Routing. Technical details and configuration were checked against official Cisco documentation and IETF RFCs.