The goal
Start from the finished first lab, where R1 and R2 are company routers in AS 64500 with eBGP to ISP A and ISP B. R3 is a new internal router with no BGP at all. By the end, R3 learns the ISP routes through a route reflector named RR, and R1, R2 and R3 are all clients of it.
The loopbacks are already reachable through OSPF, as in the first lab. RR has the router ID 9.9.9.9 and the loopback 10.255.0.9. Every iBGP session in this lab runs between loopbacks, so each router needs a route to the others' loopbacks before any BGP command will work.
On small screens, swipe sideways or focus the diagram and use the arrow keys.
What the reflector saves, and what it does not
With three internal routers, the lab is the smallest case that shows the mechanism, and the reflector saves nothing yet: three routers need three sessions in a full mesh, and three clients of one reflector also need three. The saving appears as the network grows, because a full mesh grows with the square of the router count and a reflector grows in step with it.
| Internal routers | Full mesh | One reflector | Two reflectors |
|---|---|---|---|
| 3 | 3 | 3 | 7 |
| 4 | 6 | 4 | 9 |
| 10 | 45 | 10 | 21 |
| 20 | 190 | 20 | 41 |
| 50 | 1,225 | 50 | 101 |
A reflector also follows its own rule about which routes it passes on. The rule explains why the lab has to remove the direct R1 to R2 session and why R3 receives only one path.
| The route was learned from | The reflector sends it to |
|---|---|
| A client | All other clients and all non-client iBGP peers |
| A non-client iBGP peer | Clients only |
| An eBGP peer | All clients and all non-client iBGP peers |
Step 1: look at the starting point
Before you add anything, confirm what R3 knows. This is your baseline, and it shows exactly what the reflector is going to change.
R3#show ip bgp summary % BGP not active
Look, build the reflector, build the clients, verify, then break it.
- BaselineR3 has noBGP routes
- Reflectorpeer group,client flag
- Clientsone sessionto RR each
- Verifycluster list,one path
- Fail itshut RR,see the loss
Step 2: configure the reflector
RR has one iBGP session to each of R1, R2 and R3, all in the same peer group. R1 and R2 are border routers with an ISP each. R3 is internal only.
- R1 client10.255.0.1border, ISP A
- R2 client10.255.0.2border, ISP B
- R3 client10.255.0.3internal only
All three clients get the same treatment, so a peer group keeps the configuration short: the settings that are the same go on the group, and each client is added with one line. The flag that makes RR a reflector is route-reflector-client, and it is set on the group, so it applies to every member.
router bgp 64500
bgp router-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.2 peer-group CLIENTS
neighbor 10.255.0.3 peer-group CLIENTS
address-family ipv4 unicast
neighbor CLIENTS route-reflector-client
neighbor 10.255.0.1 activate
neighbor 10.255.0.2 activate
neighbor 10.255.0.3 activateRR. The three neighbours share remote-as 64500 and the Loopback0 source through the group. route-reflector-client on the group makes every member a client, and each neighbour is activated for IPv4.
Read the commands in order. remote-as 64500 makes the sessions iBGP, because it is the same AS. update-source Loopback0 makes RR send from its loopback, so the clients can peer with 10.255.0.9 even if one physical link fails. The last line is the whole point of the lab.
Step 3: configure the clients
On the clients, nothing says "reflector". Each one has an ordinary iBGP session to RR's loopback. R1 and R2 are the border routers, so they also set next-hop-self: a reflected route keeps its original next hop, and the ISP address would mean nothing to R3. Remove the old direct session between R1 and R2 as well, so the only iBGP path is through RR.
router bgp 64500
no neighbor 10.255.0.2
neighbor 10.255.0.9 remote-as 64500
neighbor 10.255.0.9 update-source Loopback0
address-family ipv4 unicast
neighbor 10.255.0.9 activate
neighbor 10.255.0.9 next-hop-selfR1. R2 is the same with no neighbor 10.255.0.1 in the first line. On R3, leave out the first line and next-hop-self, and configure neighbor 10.255.0.9 as shown.
R1 changes the next hop of ISP routes to its own loopback before sending them to RR.
- ISP A routenext hop192.0.2.1
- R1 to RRnext hop10.255.0.1
- RR to R3next hop kept:10.255.0.1
Step 4: verify the reflector
First check the sessions. Three neighbours should be Established, and each should have sent RR the routes it learned. Then check the flag, because a session that is up is not proof that RR treats the neighbour as a client.
RR#show ip bgp summary Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.255.0.1 4 64500 52 49 12 0 0 00:14:20 1 10.255.0.2 4 64500 51 49 12 0 0 00:14:18 1 10.255.0.3 4 64500 44 49 12 0 0 00:14:15 0
RR#show ip bgp neighbors 10.255.0.3 | include Reflector Route-Reflector Client
Now look at the same prefix on RR and on R3. They should disagree about how many paths exist, and that is correct.
RR#show ip bgp 203.0.113.0 BGP routing table entry for 203.0.113.0/24, version 8 Paths: (2 available, best #1, table default) 64501 10.255.0.1 (metric 20) from 10.255.0.1 (1.1.1.1) Origin IGP, metric 0, localpref 100, valid, internal, best 64502 10.255.0.2 (metric 20) from 10.255.0.2 (2.2.2.2) Origin IGP, metric 0, localpref 100, valid, internal
R3#show ip bgp 203.0.113.0 BGP routing table entry for 203.0.113.0/24, version 9 Paths: (1 available, best #1, table default) 64501 10.255.0.1 (metric 30) from 10.255.0.9 (9.9.9.9) Origin IGP, metric 0, localpref 100, valid, internal, best Originator: 1.1.1.1, Cluster list: 9.9.9.9
RR keeps two paths and reflects one.
The same prefix looks different on all four routers, because each one is handed a different set of paths. RR and R3 are shown above. R1 and R2 follow from the reflection rules.
| Router | Paths held | Best path | Why |
|---|---|---|---|
| RR | 2 | Via R1 | Both iBGP paths tie, and the lower router ID, 1.1.1.1, wins |
| R1 | 1 | Its own eBGP path to ISP A | RR does not send a route back to the client it came from |
| R2 | 2 | Its own eBGP path to ISP B | It also receives RR's best path, but an eBGP path beats an iBGP path when the earlier steps tie |
| R3 | 1 | Via R1, reflected by RR | Only RR's best path is reflected, so R3 cannot see the path through R2 |
Finally, prove it works for traffic. From R3, ping 203.0.113.1 should succeed, because the next hop 10.255.0.1 is reachable through OSPF and the packet follows the IGP path to R1 and then out to ISP A.
Step 5: fail the reflector
A single reflector is a single point of failure, and it is better to see that now than during an outage. On RR, shut the interface toward the core and wait for the sessions to time out. With default timers, the hold time is 180 seconds, so expect to wait up to three minutes.
R3#show ip bgp summary Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd 10.255.0.9 4 64500 61 60 10 0 0 00:00:12 Idle
The link to RR goes down and the sessions stop receiving keepalives. When the hold time ends the sessions drop. R3 then loses the routes it learned through RR, while R1 and R2 keep their eBGP routes.
- RR link goes downKeepalives stop arrivingThe hold timer keeps running
- Hold time endsUp to 180 s on default timersSessions to RR drop
- R3 loses its routesEverything learned via RR is withdrawnR3 has no exit
- R1 and R2 unaffectedeBGP routes stayTheir ISP sessions are separate
The count of what fails shows why one reflector is a weak design even though the session count looks small.
| Design, 10 internal routers | Clients left blind | Sessions down | What remains |
|---|---|---|---|
| Full mesh, one router fails | 0 | 9 | Every other router still hears the rest directly |
| One reflector, the reflector fails | 10 | 10 | No client has a route learned through a reflector |
| Two reflectors, one fails | 0 | 11 | Each client keeps its session to the other reflector |
Bring the interface back with no shutdown and wait for the sessions to return to Established before the next section.
Worked case: R3 holds the route but cannot use it
Suppose R1 was configured without next-hop-self. RR still reflects ISP A's route, and R3 still receives it, but ping to 203.0.113.1 fails. The sessions are Established, so the table is the place to look.
R3#show ip bgp 203.0.113.0 BGP routing table entry for 203.0.113.0/24, version 9 Paths: (1 available, no best path) 64501 192.0.2.1 (inaccessible) from 10.255.0.9 (9.9.9.9) Origin IGP, metric 0, localpref 100, internal Originator: 1.1.1.1, Cluster list: 9.9.9.9
| Router | Without next-hop-self on R1 | With next-hop-self on R1 |
|---|---|---|
| R1 | 192.0.2.1, reachable over the ISP link | 192.0.2.1, reachable over the ISP link |
| RR | 192.0.2.1, kept unchanged, not reachable | 10.255.0.1, reachable through OSPF |
| R3 | 192.0.2.1, inaccessible | 10.255.0.1, reachable, path chosen |
R3 has a session to the reflector and receives the route, but the ping fails. The route shows the ISP address as its next hop and the word inaccessible. R3 has no route to the ISP address because the border router did not set itself as the next hop. The fix is next-hop-self on R1 and a soft refresh.
- SymptomPing to 203.0.113.1 failssessions are Established
- TableR3 shows the routewith no best path
- Next hop192.0.2.1, marked inaccessibleR3 has no route to it
- CauseR1 passes the ISP next hopon to RR unchanged
- Fixnext-hop-self on R1then clear ip bgp 10.255.0.9 soft out
Troubleshooting prompts
Start with the loopback routes, then the session, then the client flag, then the next hop, and last the best-path choice.
- Loopbacksroute toeach one
- SessionEstablished
- Flagclient lineon RR
- Next hopreachable
- Best pathmarked best
R3 session is Established but R3 has no routes
Run show ip bgp neighbors 10.255.0.3 | include Reflector on RR. If the line is missing, the client flag did not apply. Check that neighbor CLIENTS route-reflector-client is under the IPv4 address family, not at the top of the BGP block, and that 10.255.0.3 is really a member of the group.
R3 has the route but it shows inaccessible and is not best
The next hop is not reachable. Run show ip bgp 203.0.113.0 on R3 and read the next hop. If it is 192.0.2.1 or 192.0.2.5, next-hop-self is missing on R1 or R2. Add it under the IPv4 address family and run clear ip bgp 10.255.0.9 soft out.
Every session to RR stays in Active
RR peers with loopbacks, so a missing update-source Loopback0 on either end can make the TCP connection come from an address the other end does not recognise. Check that OSPF carries all four loopbacks with show ip route 10.255.0.9 on a client. The ordering matters: routes to loopbacks first, then BGP.
Technical reference: RFC 4456, BGP Route Reflection. Output above is an example written for this lesson.
Check what you learned
RR has paths from R1 and R2 for the same prefix. How many paths does R3 receive from RR?
On which router do you configure route-reflector-client for R3?
A network has 20 internal routers in a full mesh. How many iBGP sessions does it need, and how many with one route reflector that has all 20 as clients?
RR learns a route from an eBGP peer. To whom does it send the route?
R3 shows a reflected route whose next hop is 192.0.2.1 marked inaccessible. What is missing?
RR fails and its sessions time out. Which statement is true?
After the reflector is in place, how many paths for 203.0.113.0/24 does R2 hold, and which is best?
RR is the only reflector and ten clients depend on it. RR fails and the hold timers expire. How many clients lose their reflected routes?
A network has 50 clients and two reflectors. Every client has a session to both reflectors, and the reflectors share one session. How many iBGP sessions is that?