-
BGP Route Reflectors
[LEFT][CODE]http://evilrouters.net/2010/03/08/bgp-route-reflectors/[/CODE][B][SIZE=3][B]BGP Route Reflectors[/B][/SIZE][/B]
Hopefully you recall that when running iBGP, a full mesh is required between all iBGP speaking peers within an autonomous system (AS). This can quickly lead to a huge number of peerings — and the associated management overhead — as we add more iBGP speakers. The total number of peerings needed to satisfy the full mesh requirement is illustrated by the following formula, where “n” is the number of iBGP speakers
[CODE] n(n-1)/2
[/CODE]Thus:
[LIST][*]5 routers = 10 peerings[*]10 routers = 45 peerings[*]25 routers = 600 peerings[/LIST]
Would you want to manage all that? Me either. Enter route reflectors.
Route reflectors are one solution for keeping all of this under control. Route reflectors ease the full-mesh limitation and allows one router to advertise, or reflect, iBGP learned routes to other iBGP speakers. This has the end result of reducing the number of iBGP peers within our AS.
Here’s the topology we’ll be working with
[IMG]http://evilrouters.net/wp-content/uploads/2010/03/bgp-route-reflectors.png[/IMG]
In this scenario, we’ll be running OSPF as our IGP and all routers will run iBGP and are members of AS 65000. R3 will serve as our route reflector, and all other routers only need to establish a BGP peering with R3. On R1 and R2 we’ll advertised the networks represented by the loopback0 interfaces as well.
Let’s get basic connectivity established
[CODE]R1# [B]configure terminal[/B]
R1(config)# [B]interface serial 0/1[/B]
R1(config-if)# [B]ip address 198.18.13.1 255.255.255.0[/B]
R1(config-if)# [B]no shutdown[/B]
[/CODE][CODE]R2# [B]configure terminal[/B]
R2(config)# [B]interface serial 0/1[/B]
R2(config-if)# [B]ip address 198.18.23.2 255.255.255.0[/B]
R2(config-if)# [B]no shutdown[/B]
[/CODE][CODE]R3# [B]configure terminal[/B]
R3(config)# [B]interface serial 1/2[/B]
R3(config-if)# [B]clock rate 128000[/B]
R3(config-if)# [B]ip address 198.18.13.3 255.255.255.0[/B]
R3(config-if)# [B]no shutdown[/B]
R3(config-if)# [B]interface serial 1/3[/B]
R3(config-if)# [B]clock rate 128000[/B]
R3(config-if)# [B]ip address 198.18.23.3 255.255.255.0[/B]
R3(config-if)# [B]no shutdown[/B]
R3(config-if)# [B]interface serial 1/0[/B]
R3(config-if)# [B]encapsulation frame-relay[/B]
R3(config-if)# [B]no shutdown[/B]
R3(config-if)# [B]interface serial 1/0.34 point-to-point[/B]
R3(config-subif)# [B]frame-relay interface-dlci 304[/B]
R3(config-fr-dlci)# [B]ip address 198.18.34.3 255.255.255.0[/B]
R3(config-subif)# [B]interface serial 1/0.35 point-to-point[/B]
R3(config-subif)# [B]frame-relay interface-dlci 305[/B]
R3(config-fr-dlci)# [B]ip address 198.18.35.3 255.255.255.0[/B]
[/CODE][CODE]R4# [B]configure terminal[/B]
R4(config)# [B]interface serial 0/0[/B]
R4(config-if)# [B]encapsulation frame-relay[/B]
R4(config-if)# [B]no shutdown[/B]
R4(config-if)# [B]interface serial 0/0.34 point-to-point[/B]
R4(config-subif)# [B]frame-relay interface-dlci 403[/B]
R4(config-fr-dlci)# [B]ip address 198.18.34.4 255.255.255.0[/B]
[/CODE][CODE]R5# [B]configure terminal[/B]
R5(config)# [B]interface serial 0/0[/B]
R5(config-if)# [B]encapsulation frame-relay[/B]
R5(config-if)# [B]no shutdown[/B]
R5(config-if)# [B]interface serial 0/0.35 point-to-point[/B]
R5(config-subif)# [B]frame-relay interface-dlci 503[/B]
R5(config-fr-dlci)# [B]ip address 198.18.35.5 255.255.255.0[/B]
[/CODE]At this point, make sure you can ping all routers from R3 and vice versa.
Go ahead and configure the loopback interfaces on R1 and R2
[CODE]R1(config-if)# [B]interface loopback 0[/B]
R1(config-if)# [B]ip address 198.18.111.1 255.255.255.255[/B]
[/CODE][CODE]R2(config-if)# [B]interface loopback 0[/B]
R2(config-if)# [B]ip address 198.18.222.2 255.255.255.255[/B]
[/CODE]Let’s configure our IGP, OSPF. We’ll keep it simple since our focus is on BGP. On R3, R4, and R5 configure OSPF process ID 1 and advertise all networks, e.g
[CODE]! on R3, R4, and R5
[B]router ospf 1[/B]
[B]network 0.0.0.0 255.255.255.255 area 0[/B]
[/CODE]On R1 and R2, we’ll just run OSPF on the links to R3 (we’re “saving” our loopbacks for BGP)
[CODE]R1(config-if)# [B]router ospf 1[/B]
R1(config-router)# [B]network 198.18.13.1 0.0.0.0 area 0[/B]
[/CODE][CODE]R2(config-if)# [B]router ospf 1[/B]
R2(config-router)# [B]network 198.18.23.2 0.0.0.0 area 0[/B]
[/CODE]Make sure you’re seeing all advertised routes on all routers.
When it comes to configuring BGP, the only place we have to do anything different is on the route reflector itself. Let’s go ahead and configure R1, R2, R4, and R5 for a BGP peering to R3. On R1 and R2, we’ll advertise the IP addresses of the loopback 0 interfaces into BGP as well
[CODE]R1(config-router)# [B]router bgp 65000[/B]
R1(config-router)# [B]neighbor 198.18.13.3 remote-as 65000[/B]
R1(config-router)# [B]network 198.18.111.1 mask 255.255.255.255[/B]
[/CODE][CODE]R2(config-router)# [B]router bgp 65000[/B]
R2(config-router)# [B]neighbor 198.18.23.3 remote-as 65000[/B]
R2(config-router)# [B]network 198.18.222.2 mask 255.255.255.255[/B]
[/CODE][CODE]R4(config-router)# [B]router bgp 65000[/B]
R4(config-router)# [B]neighbor 198.18.34.3 remote-as 65000[/B]
[/CODE][CODE]R5(config-router)# [B]router bgp 65000[/B]
R5(config-router)# [B]neighbor 198.18.35.3 remote-as 65000[/B]
[/CODE]Next, we simply have to configure BGP on R3. We’ll use the “route-reflector-client” option to the “neighbor” command to let R3 know that the other routers should be considered as route reflector clients (intuitive, huh!?). In this case, R3 will “reflect” advertisements from one client to the others. Hence, the advertisements from R1 and R2 (for their loopback 0 interfaces) will be reflected to the other routers. We’ll be able to verify this by looking at the BGP tables on R4 and R5
[CODE]R3(config-router)# [B]router bgp 65000[/B]
R3(config-router)# [B]neighbor 198.18.13.1 remote-as 65000[/B]
R3(config-router)# [B]neighbor 198.18.13.1 route-reflector-client[/B]
R3(config-router)# [B]neighbor 198.18.23.2 remote-as 65000[/B]
R3(config-router)# [B]neighbor 198.18.23.2 route-reflector-client[/B]
R3(config-router)# [B]neighbor 198.18.34.4 remote-as 65000[/B]
R3(config-router)# [B]neighbor 198.18.34.4 route-reflector-client[/B]
R3(config-router)# [B]neighbor 198.18.35.5 remote-as 65000[/B]
R3(config-router)# [B]neighbor 198.18.35.5 route-reflector-client[/B]
[/CODE]Wait a moment for all the BGP sessions to come up (remember, BGP is sloooooow) then take a look at the BGP tables on R4 and R5
[CODE]R4(config-router)# [B]do show ip bgp | begin Network[/B]
Network Next Hop Metric LocPrf Weight Path
*>i198.18.111.1/32 198.18.13.1 0 100 0 i
*>i198.18.222.2/32 198.18.23.2 0 100 0 i
[/CODE][CODE]R5(config-router)# [B]do show ip bgp | begin Network[/B]
Network Next Hop Metric LocPrf Weight Path
*>i198.18.111.1/32 198.18.13.1 0 100 0 i
*>i198.18.222.2/32 198.18.23.2 0 100 0 i
[/CODE]That’s all there is to it! We’ve taken what normally would take a total of 10 BGP sessions and accomplished the same thing with just four. Later, we’ll talk about BGP confederations, another technique for reducing the iBGP mesh (mess)
[/LEFT]