Avoiding network loops in a network is of utmost importance. iBGP uses the split horizon rule to avoid loops. However, due to the Split horizon rule, all the iBGP neighbours must be in a full mesh topology.
But why should the iBGP neighbours be in a full mesh topology?
Split Horizon states that routers that learn BGP Routes from iBGP peers should not advertise that to another iBGP peer.
Let’s understand this with the help of an example: –
Imagine a topology given in the figure.
R2 and R3 are iBGP peers, R3 and R4 are iBGP peers, R2 and R1 are into eBGP.
R2 advertises a route received from R1 to R3, but R3 shall not advertise the routes to R4 because R4 and R3 are also iBGP peers, and the SPLIT HORIZON rule applies to them.
If R4 wants to learn that particular route, R4 and R2 must also be an iBGP peer.
Every router has to be an iBGP peer with the router that learns about the routes from the eBGP peer.
So, the updated topology would look like this-
Hence, in the case of iBGP, we need to make full mesh neighborship so that each router learns routes received from eBGP.
Creating a full mesh neighborship in case of a small network looks fine. However, as the network grows, the full mesh becomes impractical due to the sheer number of connections required, leading to scalability and management issues.
How to avoid full Mesh Neighborship?
Route Reflector is the method that helps to avoid the full mesh neighborship and reduce the number of BGP peering within an AS.
In the case of route reflector, routers get configured as Client and Server. The server is responsible for advertising the traffic to all the clients in a topology.
Topology with and without route reflector configured would look like this:-
Now each router needs to have an iBGP peering with just a server.
What is the role of routers in BGP Route Reflector Configuration?
The role of routers in BGP Route Reflector Configuration is as follows-
Route Reflector (RR)
The Route Reflector, also known as the Server, is responsible for reflecting BGP routes. The server receives BGP updates, stores them, and then reflects those updates to other routers accordingly. It also communicates with non-client routers directly or through client routers. Â
Client Routers
These are BGP routers that form a peering relationship with a Route Reflector. They advertise their routes to the Route Reflector, which then reflects these routes to other clients. Client routers do not peer directly with each other; instead, they peer with the Route Reflector. We need to configure the router as a client.Â
Non-Client Routers
These are BGP routers that do not peer directly with other non-client routers. They receive BGP routes from Route Reflectors, either directly or through client routers.Â
Based on the types of routers, we can have the following cases: -
Case – 1
If a route comes from a Client, the Route Reflector reflects it to all other clients and non-clients.Â
Case – 2
If a route comes from a non-client, the Route reflector reflects it to all the clients but not the non-clients.Â
Case – 3
If a route comes from an eBGP peer, the Route reflector reflects it to all the clients and non-clients.Â
Configuration
Let us first configure BGP-
R1(config)#router bgp 100Â
R1(config-router)#neighbor 192.168.23.2 remote-as 100Â Â
R1(config-router)#neighbor 192.168.24.2 remote-as 100Â
Â
Â
R2(config)#router bgp 100Â
R2(config-router)#neighbor 192.168.23.1 remote-as 100Â
R2(config-router)#neighbor 192.168.35.2 remote-as 100Â
Â
Â
Â
R3(config)#router bgp 100Â
R3(config-router)#neighbor 192.168.35.1 remote-as 100Â
R3(config-router)#neighbor 192.168.45.2 remote-as 100Â
Â
Â
Â
R4(config)#router bgp 100Â
R4(config-router)#neighbor 192.168.45.1 remote-as 100Â
Â
R4(config-router)#neighbor 192.168.24.2 remote-as 100
Let’s add a loopback 200.1.1.1 at R1, add it to BGP, and see if R3 can get this network in its BGP table.
R1(config)#interface loopback 1Â
R1(config-if)#ip address 200.1.1.1 255.255.255.0Â
R1(config-if)#exitÂ
R1(config)#router bgp 100Â
R1(config-router)#network 200.1.1.0Â
Let’s verify BGP for R2, R3 and R4
R2#show ip bgp Â
BGP table version is 2, local router ID is 192.168.35.1Â
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, Â
                    r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, Â
                         x best-external, a additional-path, c RIB-compressed, Â
Origin codes: i – IGP, e – EGP, ? – incompleteÂ
RPKI validation codes: V valid, I invalid, N Not foundÂ
Â
    Network        Next Hop          Metric LocPrf Weight PathÂ
 *>i 200.1.1.0       192.168.23.1                 0                 100                      0                         iÂ
Â
Â
R2#show ip route Â
Codes:Â L – local, C – connected, S – static, R – RIP, M – mobile, B – BGPÂ
                  D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area Â
                N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2Â
      E1 – OSPF external type 1, E2 – OSPF external type 2Â
     i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2Â
      ia – IS-IS inter area, * – candidate default, U – per-user static routeÂ
      o – ODR, P – periodic downloaded static route, H – NHRP, l – LISPÂ
       + – replicated route, % – next hop overrideÂ
Â
Gateway of last resort is not setÂ
Â
   192.168.23.0/24 is variably subnetted, 2 subnets, 2 masksÂ
CÂ Â Â Â Â Â 192.168.23.0/24 is directly connected, FastEthernet0/0Â
LÂ Â Â Â Â Â 192.168.23.2/32 is directly connected, FastEthernet0/0Â
    192.168.35.0/24 is variably subnetted, 2 subnets, 2 masksÂ
CÂ Â Â Â 192.168.35.0/24 is directly connected, FastEthernet1/0Â
LÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 192.168.35.1/32 is directly connected, FastEthernet1/0Â
BÂ Â Â Â 200.1.1.0/24 [200/0] via 192.168.23.1, 00:02:50Â
Â
Â
R3#show ip bgp Â
R3#Â
R3#show ip route Â
Codes: Â Â Â Â L – local, C – connected, S – static, R – RIP, M – mobile, B – BGPÂ
       D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area Â
       N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2Â
     E1 – OSPF external type 1, E2 – OSPF external type 2Â
     i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2Â
     ia – IS-IS inter area, * – candidate default, U – per-user static routeÂ
     o – ODR, P – periodic downloaded static route, H – NHRP, l – LISPÂ
     + – replicated route, % – next hop overrideÂ
Â
Gateway of last resort is not setÂ
Â
       192.168.35.0/24 is variably subnetted, 2 subnets, 2 masksÂ
CÂ Â Â Â Â Â 192.168.35.0/24 is directly connected, FastEthernet1/0Â
LÂ Â Â Â Â Â 192.168.35.2/32 is directly connected, FastEthernet1/0Â
    192.168.45.0/24 is variably subnetted, 2 subnets, 2 masksÂ
CÂ Â Â Â Â Â 192.168.45.0/24 is directly connected, FastEthernet0/0Â
LÂ Â Â Â Â Â Â 192.168.45.1/32 is directly connected, FastEthernet0/0Â
Loopback route of R1 i.e., 200.1.1.0/24 is not present in R3 since it is not a peer with R1.
R4#show ip bgp Â
BGP table version is 2, local router ID is 192.168.45.2Â
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, Â
             r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, Â
             x best-external, a additional-path, c RIB-compressed, Â
Origin codes: i – IGP, e – EGP, ? – incompleteÂ
RPKI validation codes: V valid, I invalid, N Not foundÂ
Â
    Network        Next Hop          Metric LocPrf Weight PathÂ
 *>i 200.1.1.0            192.168.24.1                   0   100                     0     iÂ
Â
R4#show ip route Â
Codes: Â Â Â Â Â Â L – local, C – connected, S – static, R – RIP, M – mobile, B – BGPÂ
                      D – EIGRP, EX – EIGRP external, O – OSPF, IA – OSPF inter area Â
      N1 – OSPF NSSA external type 1, N2 – OSPF NSSA external type 2Â
       E1 – OSPF external type 1, E2 – OSPF external type 2Â
       i – IS-IS, su – IS-IS summary, L1 – IS-IS level-1, L2 – IS-IS level-2Â
       ia – IS-IS inter area, * – candidate default, U – per-user static routeÂ
       o – ODR, P – periodic downloaded static route, H – NHRP, l – LISPÂ
      + – replicated route, % – next hop overrideÂ
Â
Gateway of last resort is not setÂ
Â
     192.168.24.0/24 is variably subnetted, 2 subnets, 2 masksÂ
CÂ Â Â Â Â Â Â Â 192.168.24.0/24 is directly connected, FastEthernet1/0Â
LÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 192.168.24.2/32 is directly connected, FastEthernet1/0Â
        192.168.45.0/24 is variably subnetted, 2 subnets, 2 masksÂ
CÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 192.168.45.0/24 is directly connected, FastEthernet0/0Â
LÂ Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â 192.168.45.2/32 is directly connected, FastEthernet0/0Â
BÂ Â Â Â Â Â Â Â 200.1.1.0/24 [200/0] via 192.168.24.1, 00:05:55Â
Route Reflector Configuration: -
Let us configure Route Reflector in a way that R1 and R3 become the clients.
R2(config)#router bgp 100Â
R2(config-router)#neighbor 192.168.23.1 route-reflector-clientÂ
R2(config-router)#neighbor 192.168.35.2 route-reflector-clientÂ
Â
Â
Â
Â
R4(config)#router bgp 100Â
R4(config-router)#neighbor 192.168.24.1 route-reflector-clientÂ
R4(config-router)#neighbor 192.168.45.1 route-reflector-clientÂ
Â
Verification: -
R3#show ip bgp Â
BGP table version is 1, local router ID is 192.168.45.1Â
Status codes: s suppressed, d damped, h history, * valid, > best, i – internal, Â
             r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter, Â
             x best-external, a additional-path, c RIB-compressed, Â
Origin codes: i – IGP, e – EGP, ? – incompleteÂ
RPKI validation codes: V valid, I invalid, N Not foundÂ
Â
    Network         Next Hop       Metric LocPrf Weight PathÂ
 * i 200.1.1.0                  192.168.24.1            0                      100       0   iÂ
Â
Â
R3#show ip bgp 200.1.1.1Â
BGP routing table entry for 200.1.1.0/24, version 0Â
Paths: (2 available, no best path)Â
 Not advertised to any peerÂ
 Refresh Epoch 2Â
 LocalÂ
192.168.24.1 (inaccessible) from 192.168.45.2 (192.168.45.2)Â
Â
Origin IGP, metric 0, localpref 100, valid, internalÂ
Originator: 192.168.24.1, Cluster list: 192.168.45.2Â
rx pathid: 0, tx pathid: 0Â
 Refresh Epoch 2Â
 LocalÂ
192.168.23.1 (inaccessible) from 192.168.35.1 (192.168.35.1)Â
Origin IGP, metric 0, localpref 100, valid, internalÂ
Originator: 192.168.24.1, Cluster list: 192.168.35.1Â
rx pathid: 0, tx pathid: 0Â
See the magic of Route Reflector. We can now see 200.1.1.0 in the BGP and routing table of R3.
In this way, we can get rid of full mesh neighborship using the concept of route reflector.
I have 2 different AS (AS100 & AS200). R1 & R2 are part of AS100 connected through iBGP and R3 & R4 are part of AS200 connected with each other through iBGP. And both AS (100 & 200) are connected through eBGP between R3 & R4!
Now interviewer asked me that R4 does not have routing table or information of R1? What is the issue!!??
Please help me!
u need to update next hop too when you receive updates from eBGP and advertise them into iBGP, so with your iBGP peer use the command:Neighbor x.x.x.x next-hop-self (or loopback address if you are forming neighborship with loopbacks).