The goal
You are extending the route reflector design from the first BGP course. The company AS 64500 now has two reflectors, RR1 with the loopback 10.255.0.9 and the router ID 9.9.9.1, and RR2 with the loopback 10.255.0.10 and the router ID 9.9.9.2. R1 is the border router, with eBGP to ISP A at 192.0.2.1. C1 (10.255.0.11) and C2 (10.255.0.12) are inside clients. All loopbacks are reachable through OSPF.
By the end, losing one reflector costs the clients nothing, a silent failure on the ISP link is noticed in under a second, and a provider that sends too many prefixes cannot fill the routing table.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
| Failure | What the clients see | What handles it | Where to check |
|---|---|---|---|
| One reflector down | One path left, route kept | A second reflector and a second session | show ip bgp summary on a client |
| Both reflectors down | Routes learned through them are removed | Nothing in this lab; a third reflector or a full mesh would | show ip bgp summary on a client |
| Silent failure of the ISP link | Session stays up until the hold time ends | BFD with fall-over | show bfd neighbors on R1 |
| Provider sends too many prefixes | Table grows, memory and CPU rise | maximum-prefix | show ip bgp summary on R1 |
Step 1: build both reflectors with one cluster ID
A cluster ID names the group of reflectors that serve the same clients. A reflector adds its cluster ID to each route it reflects and drops a route that already carries its own. With the same ID on both, a reflector ignores a copy that the other one reflected, which is correct here because both hear every route directly from the clients.
With one shared cluster ID, a reflector drops a route that carries its own ID, so the pair keeps less state but each client needs a session to both. With two IDs, each reflector accepts what the other reflects, so there are more copies and more protection against a broken client session.
router bgp 64500
bgp router-id 9.9.9.1
bgp cluster-id 9.9.9.9
neighbor CLIENTS peer-group
neighbor CLIENTS remote-as 64500
neighbor CLIENTS update-source Loopback0
neighbor 10.255.0.1 peer-group CLIENTS
neighbor 10.255.0.11 peer-group CLIENTS
neighbor 10.255.0.12 peer-group CLIENTS
address-family ipv4 unicast
neighbor CLIENTS route-reflector-client
neighbor 10.255.0.1 activate
neighbor 10.255.0.11 activate
neighbor 10.255.0.12 activateRR1. On RR2, use router-id 9.9.9.2 and the same cluster ID 9.9.9.9. Everything else is identical.
router bgp 64500
neighbor 10.255.0.9 remote-as 64500
neighbor 10.255.0.9 update-source Loopback0
neighbor 10.255.0.10 remote-as 64500
neighbor 10.255.0.10 update-source Loopback0
address-family ipv4 unicast
neighbor 10.255.0.9 activate
neighbor 10.255.0.10 activateC1 and C2. Two ordinary iBGP sessions, one to each reflector. On R1, add next-hop-self for both neighbours, because R1 learns the ISP routes over eBGP.
C1#show ip bgp summary Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.255.0.9 4 64500 45 44 12 0 0 00:12:31 1 10.255.0.10 4 64500 44 44 12 0 0 00:12:29 1
C1#show ip bgp 203.0.113.0 BGP routing table entry for 203.0.113.0/24, version 12 Paths: (2 available, best #1, table default) 64501 10.255.0.1 (metric 20) from 10.255.0.9 (9.9.9.1) Origin IGP, metric 0, localpref 100, valid, internal, best Originator: 1.1.1.1, Cluster list: 9.9.9.9 64501 10.255.0.1 (metric 20) from 10.255.0.10 (9.9.9.2) Origin IGP, metric 0, localpref 100, valid, internal Originator: 1.1.1.1, Cluster list: 9.9.9.9
Reflectors first, then clients, then verification.
- Reflectorssame cluster ID,client flag
- Clientstwo sessionseach
- Verifytwo paths,one cluster list
Step 2: fail one reflector
Take RR1 out of service by shutting its loopback. With default timers the clients notice when the hold time of 180 seconds expires, so give it three minutes. While you wait, keep a ping running from C1 to 203.0.113.1.
C1#show ip bgp summary Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.255.0.9 4 64500 60 59 12 0 0 00:00:20 Idle 10.255.0.10 4 64500 75 74 12 0 0 00:21:45 1
C1#show ip bgp 203.0.113.0 BGP routing table entry for 203.0.113.0/24, version 12 Paths: (1 available, best #1, table default) 64501 10.255.0.1 (metric 20) from 10.255.0.10 (9.9.9.2) Origin IGP, metric 0, localpref 100, valid, internal, best Originator: 1.1.1.1, Cluster list: 9.9.9.9
C1#show logging | include BGP %BGP-3-NOTIFICATION: sent to neighbor 10.255.0.9 4/0 (hold time expired) 0 bytes %BGP-5-ADJCHANGE: neighbor 10.255.0.9 Down BGP Notification sent
The loopback is shut, the session stays up until the hold time ends, then C1 removes the copy from RR1 and keeps the copy from RR2.
- RR1 loopback shutNo keepalives reach C1Session still shows Established
- Hold time endsDefault 180 secondsC1 closes the session to RR1
- C1 recalculatesThe copy from RR1 is removedThe copy from RR2 becomes best
- Traffic continuesSame next hop 10.255.0.1No change on the forwarding path
Run no shutdown on RR1's loopback and wait for both sessions to be Established again.
Step 3: add BFD to the ISP link
Three minutes is a long time for a provider link that fails without the interface going down. BFD sends small packets many times a second and tells BGP quickly when they stop. On R1, set the timers on the interface to ISP A and tell the BGP neighbour to follow BFD. ISP A must run BFD on its side too.
interface GigabitEthernet0/0
bfd interval 300 min_rx 300 multiplier 3
router bgp 64500
address-family ipv4 unicast
neighbor 192.0.2.1 fall-over bfdR1. 300 ms times a multiplier of 3 gives a detection time of 900 ms. fall-over bfd makes BGP close the session when BFD declares the neighbour down.
R1#show bfd neighbors NeighAddr LD/RD RH/RS State Int 192.0.2.1 1/1 Up Up Gi0/0
R1#show logging | include ADJCHANGE %BGP-5-ADJCHANGE: neighbor 192.0.2.1 Down BFD adjacency down
R1#show bfd neighbors details NeighAddr LD/RD RH/RS State Int 192.0.2.1 1/1 Up Up Gi0/0 Session state is UP and not using echo function. Local Diag: 0, Demand mode: 0, Poll bit: 0 MinTxInt: 300000, MinRxInt: 300000, Multiplier: 3 Received MinRxInt: 300000, Received Multiplier: 3 Holddown (hits): 900(0), Hello (hits): 300(4212) Registered protocols: BGP
fall-over bfd does.| Setting | Detection time | Fits | Risk |
|---|---|---|---|
| BGP default, keepalive 60 and hold 180 | 180 seconds | No BFD configured | A silent failure waits three minutes |
| BFD interval 1000, multiplier 3 | 3 seconds | Links with jitter or a busy CPU | Slow, few false alarms |
| BFD interval 300, multiplier 5 | 1.5 seconds | The same link with more tolerance | 600 ms slower than this lab |
| BFD interval 300, multiplier 3 (this lab) | 900 ms | Routed Ethernet to a provider | A short burst of loss can trigger it |
| BFD interval 100, multiplier 3 | 300 ms | Only where the platform supports it | Flaps if the link drops a few packets |
Without BFD a silent failure is found when the hold timer expires. With BFD it is found in under a second.
Step 4: cap what the provider can send
A provider leak or a mistake can send hundreds of thousands of prefixes into a router that expected a handful. maximum-prefix sets a ceiling. In this lab ISP A is expected to send fewer than 100 prefixes, so warn at 80 and close the session at 100.
router bgp 64500
address-family ipv4 unicast
neighbor 192.0.2.1 maximum-prefix 100 80R1. The first number is the limit and the second is the warning threshold as a percentage. After the limit is passed, the session is closed and stays closed until you clear it.
Now make ISP A leak 101 prefixes and watch what happens.
R1#show ip bgp summary Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 192.0.2.1 4 64501 210 190 0 0 0 00:00:08 Idle (PfxCt)
R1#show logging | include MAXPFX|ADJCHANGE %BGP-4-MAXPFX: Number of prefixes received from 192.0.2.1 (afi 0) reaches 80, max 100 %BGP-3-MAXPFXEXCEED: Number of prefixes received from 192.0.2.1 (afi 0): 101 exceeds limit 100 %BGP-5-ADJCHANGE: neighbor 192.0.2.1 Down BGP Notification sent
Normal, then the warning at 80 prefixes, then the session closes when the count passes 100.
- Below 80normal, nomessage
- At 80warning islogged
- Above 100session closed,routes removed
| Option | What happens at the limit | Recovery | When it fits |
|---|---|---|---|
| Default (this lab) | The session is closed | Stays down until clear ip bgp | A leak must be fixed before the link returns |
| restart 5 | The session is closed and retried after 5 minutes | Returns by itself | Unattended sites; a leak that continues closes it again |
| warning-only | Only a log message, the session stays up | Nothing to recover | Measuring first; the table can still fill |
Troubleshooting prompts
The other side has BFD off, the timers or addresses do not match, UDP port 3784 is blocked, or the interface itself is not passing traffic.
- Far side offno bfd on theISP interface
- Mismatchwrong neighbouror interface
- Port blockedUDP 3784 onthe path
- Link probleminterface dropsor errors
C1 shows one path instead of two when both reflectors are up
Check the sessions on C1 first. If both are Established, run show ip bgp neighbors 10.255.0.11 | include Reflector on RR2. A missing line means RR2 does not treat C1 as a client and will not reflect the route to it.
The two copies show different cluster lists
The cluster IDs differ. Without bgp cluster-id, each reflector uses its router ID, 9.9.9.1 and 9.9.9.2. Set 9.9.9.9 on both. The result is not wrong, since two IDs are a valid design, but it is not the one this lab builds.
BFD stays Down
Compare the timers on both ends: the slower of the two sides is used, but one side with BFD turned off keeps it Down. Confirm that UDP port 3784 is not blocked on the path to ISP A.
The ISP session flaps after BFD is turned on
Read the log for BFD adjacency down messages and note how long the session stays down. If the link is healthy but a short burst of loss closes the session, the timers are too tight for it. Raise the multiplier first, for example to 5, then the interval, and retest. A faster setting is only useful if the link and the router CPU can sustain it.
Idle (PfxCt) returns straight after clear ip bgp
The provider is still sending more than the limit. Read show ip bgp neighbors 192.0.2.1 | include prefixes for the count, ask the provider to fix the leak, and clear the session only then. Raising the limit to get the session up removes the protection you added it for.
Technical references: RFC 4456, BGP Route Reflection, RFC 5880, BFD and RFC 4486, Cease subcodes (maximum prefixes reached). Output above is an example written for this lesson.
Check what you learned
RR1 fails. Why does C1 keep the route to 203.0.113.0/24?
BFD runs with an interval of 300 ms and a multiplier of 3. How long until a silent failure is detected?
State/PfxRcd shows Idle (PfxCt). What happened?
A route reflected by RR1 reaches RR2 over a session between the two reflectors. Both use cluster ID 9.9.9.9. What does RR2 do with it?
BFD runs with an interval of 500 ms and a multiplier of 4. What is the detection time?
maximum-prefix 100 80 restart 5 is set and the provider keeps leaking. What do you see?