BGP Route Reflector [Explained & Configuration]

BGP Route Reflector [Explained & Configuration]

Introduction:

According to the BGP Split Horizon rule, iBGP peers do not re-advertise routes that were learned from other iBGP peers. one of the workarounds is to design iBGP ASN in Full-mech topology, but the problem is that it doesn’t scale well.

you can check the Split horizon explanation from here:



Why do we need BGP Route Reflector

BGP requires that all iBGP peers have to be in a full-mesh topology. However, this requirement does not scale well when there are many iBGP peers. Instead of configuring a confederation, another way to reduce the iBGP mesh is to configure a route reflector.

With route reflectors, all iBGP peers don’t require a full mesh topology because there is a method to pass learned routes to neighbors. In this model, an iBGP peer is configured to be a route reflector responsible for passing iBGP learned routes to a set of iBGP neighbors.


BGP Route Reflector Configuration example:


The figure below illustrates a simple iBGP configuration with 4 iBGP speakers (Routers R1, R2, and R3 and R4) in the ASN 65001. With Route Reflector in place, when Router R2 receives a route from an external neighbor, it must advertise it to router R1 which is the Route Reflector.


The RR has formed an iBGP peer with all nodes in ASN 65001. So when a route comes to RR, it will be advertised to all Route Reflector Clients defined in the router R1 BGP configuration.




Routers Configurations:

R1 Configuration:

hostname R1

interface Ethernet0/0
 ip address 172.16.1.9 255.255.255.252
 half-duplex
!
interface Ethernet0/1
 ip address 172.16.1.1 255.255.255.252
 half-duplex
!
interface Ethernet0/2
 ip address 172.16.1.5 255.255.255.252
 half-duplex
!
router bgp 65001
 no synchronization
 bgp log-neighbor-changes
 network 172.16.1.0 mask 255.255.255.252
 network 172.16.1.4 mask 255.255.255.252
 network 172.16.1.8 mask 255.255.255.252
 neighbor 172.16.1.2 remote-as 65001
 neighbor 172.16.1.2 route-reflector-client
 
 neighbor 172.16.1.6 remote-as 65001
 neighbor 172.16.1.6 route-reflector-client
 neighbor 172.16.1.6 route-map CHANGE_NEXT_HOP1 out
 
 neighbor 172.16.1.10 remote-as 65001
 neighbor 172.16.1.10 route-reflector-client
 no auto-summary
!
route-map CHANGE_NEXT_HOP1 permit 10
 set ip next-hop 172.16.1.5



R2 Configuration:

hostname R2

interface Ethernet0/0
 ip address 172.16.1.2 255.255.255.252
 half-duplex
!
interface Ethernet0/1
 ip address 172.16.1.13 255.255.255.252
 half-duplex
!

router bgp 65001
 no synchronization
 bgp log-neighbor-changes
 neighbor 172.16.1.1 remote-as 65001
 neighbor 172.16.1.14 remote-as 65002
 no auto-summary
!



R3 Configuration:

hostname R3
!
interface Ethernet0/0
 ip address 172.16.1.6 255.255.255.252
 half-duplex
!
router bgp 65001
 no synchronization
 bgp log-neighbor-changes
 neighbor 172.16.1.5 remote-as 65001
 no auto-summary



R4 Configuration:

hostname R4

interface Ethernet0/0
 ip address 172.16.1.10 255.255.255.252
 half-duplex
!
router bgp 65001
 no synchronization
 bgp log-neighbor-changes
 neighbor 172.16.1.9 remote-as 65001
 no auto-summary




R5 Configuration:

hostname R5
!
interface Loopback0
 ip address 5.5.5.5 255.255.255.255
!
interface Ethernet0/0
 ip address 172.16.1.14 255.255.255.252
 half-duplex
!
router bgp 65002
 no synchronization
 bgp log-neighbor-changes
 network 5.5.5.5 mask 255.255.255.255
 neighbor 172.16.1.13 remote-as 65001
 no auto-summary



Verifications:

R1:

R1#show ip bgp
BGP table version is 18, local router ID is 172.16.1.9
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i5.5.5.5/32       172.16.1.2               0    100      0 65002 i
*> 172.16.1.0/30    0.0.0.0                  0         32768 i
*> 172.16.1.4/30    0.0.0.0                  0         32768 i
*> 172.16.1.8/30    0.0.0.0                  0         32768 i
R1#show ip route
Codes: 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

Gateway of last resort is not set

     5.0.0.0/32 is subnetted, 1 subnets
B       5.5.5.5 [200/0] via 172.16.1.2, 01:52:02
     172.16.0.0/30 is subnetted, 3 subnets
C       172.16.1.8 is directly connected, Ethernet0/0
C       172.16.1.4 is directly connected, Ethernet0/2
C       172.16.1.0 is directly connected, Ethernet0/1
R1#



R3:

R3#show ip bgp
BGP table version is 10, local router ID is 172.16.1.6
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*>i5.5.5.5/32       172.16.1.5               0    100      0 65002 i
*>i172.16.1.0/30    172.16.1.5               0    100      0 i
r>i172.16.1.4/30    172.16.1.5               0    100      0 i
*>i172.16.1.8/30    172.16.1.5               0    100      0 i
R3#show ip ro
R3#show ip route
Codes: 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

Gateway of last resort is not set

     5.0.0.0/32 is subnetted, 1 subnets
B       5.5.5.5 [200/0] via 172.16.1.5, 00:22:54
     172.16.0.0/30 is subnetted, 3 subnets
B       172.16.1.8 [200/0] via 172.16.1.5, 00:47:08
C       172.16.1.4 is directly connected, Ethernet0/0
B       172.16.1.0 [200/0] via 172.16.1.5, 00:47:02
R3#ping 5.5.5.5

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 88/130/172 ms
R3#



R5:

R5#show ip bgp
BGP table version is 5, local router ID is 172.16.1.14
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
*> 5.5.5.5/32       0.0.0.0                  0         32768 i
*> 172.16.1.0/30    172.16.1.13                            0 65001 i
*> 172.16.1.4/30    172.16.1.13                            0 65001 i
*> 172.16.1.8/30    172.16.1.13                            0 65001 i

R5#show ip route
Codes: 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

Gateway of last resort is not set

     5.0.0.0/32 is subnetted, 1 subnets
C       5.5.5.5 is directly connected, Loopback0
     172.16.0.0/30 is subnetted, 4 subnets
C       172.16.1.12 is directly connected, Ethernet0/0
B       172.16.1.8 [20/0] via 172.16.1.13, 00:45:52
B       172.16.1.4 [20/0] via 172.16.1.13, 00:46:22
B       172.16.1.0 [20/0] via 172.16.1.13, 00:45:52
R5#


BGP Route Reflector Rules

  1. A route learned from a non-RR client is advertised to RR clients but not to non-RR clients.
  2. A route learned from an RR client is advertised to both RR clients and non-RR clients. Even the RR client that advertised the route will receive a copy and discard it because it sees itself as the originator.
  3. A route learned from an EBGP neighbor is advertised to both RR clients and non-RR clients.


Loop Prevention in Route Reflectors

ORIGINATOR_ID, an optional nontransitive BGP attribute is created by the first route reflector and sets the value to the RID of the router that injected/advertised the route into the AS.

RP/0/0/CPU0:R1-XR# show bgp ipv4 unicast 10.4.4.0/24
! Output omitted for brevity                                                    
Paths: (1 available, best #1)
  Local
    10.1.34.4 from 10.1.12.2 (192.168.4.4)
      Origin IGP, metric 0, localpref 100, valid, internal, best, group-best
      Received Path ID 0, Local Path ID 1, version 7
      Originator: 192.168.4.4, Cluster list: 192.168.2.2, 192.168.3.3Code language: PHP (php)

And loop prevention occurs a below:

  • If the ORIGINATOR_ID is already populated on an NLRI, it should not be overwritten.
  • If a router receives a NLRI with its RID in the Originator attribute, the NLRI is discarded (indicating that this route was originated by this route and somehow advertised back to him, so it’s discarded).


CLUSTER_LIST: This attribute is appended (not overwritten) by the route reflector with its cluster-id.

If a route reflector receives a NLRI with its cluster-id in the Cluster List attribute, the NLRI is discarded.


Route Reflector and Next-hop self considerations:

Out-of-band route reflectors should not use the next-hop-self, or it will place the route reflector into the data path.

Reference:

Ciscopress

Cisco.com

networklessons.com

Bilel Ameur

Enthusiastic Network Engineer specializing in Cisco ACI, passionate about solving challenges. A lifelong learner who loves gaining and sharing knowledge. Profile: https://www.linkedin.com/in/bilel-ameur-71116b2b5
0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x