BGP: Route Reflector
R4-------iBGP-------R1------iBGP-------R2------eBGP-------R3
· AS 100: R4, R1 and R2
· AS200: R3
· eBGP between R2 & R3
· iBGP between R2 & R1
· iBGP between R1 & R4
· Advertised 3.3.3.3/32 in R3
Let me take a scenario without configuring Route Reflector and see what problems I get:
BGP Configuration:
R3#show run | begin router bgp
router bgp 200
no synchronization
bgp log-neighbor-changes
network 3.3.3.3 mask 255.255.255.255
neighbor 20.1.1.2 remote-as 100
no auto-summary
!
R2#show run | begin router bgp
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
neighbor 1.1.1.1 next-hop-self
neighbor 20.1.1.3 remote-as 200
no auto-summary
!
R1#show run | begin router bgp
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 2.2.2.2 remote-as 100
neighbor 2.2.2.2 update-source Loopback0
neighbor 4.4.4.4 remote-as 100
neighbor 4.4.4.4 update-source Loopback0
no auto-summary
!
R4#show run | begin router bgp
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 1.1.1.1 remote-as 100
neighbor 1.1.1.1 update-source Loopback0
no auto-summary
!
R3#show ip bgp sum
BGP router identifier 133.133.133.133, local AS number 200
BGP table version is 8, main routing table version 8
1 network entries using 117 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 417 total bytes of memory
BGP activity 4/3 prefixes, 4/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
20.1.1.2 4 100 321 314 8 0 0 05:10:58 0
R3#
R2#show ip bgp sum
BGP router identifier 22.22.22.22, local AS number 100
BGP table version is 12, main routing table version 12
1 network entries using 117 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 441 total bytes of memory
BGP activity 4/3 prefixes, 4/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 100 21 20 12 0 0 00:15:49 0
20.1.1.3 4 200 315 322 12 0 0 05:11:18 1
R2#
R1#show ip bgp sum
BGP router identifier 111.111.111.111, local AS number 100
BGP table version is 10, main routing table version 10
1 network entries using 117 bytes of memory
1 path entries using 52 bytes of memory
2/1 BGP path/bestpath attribute entries using 248 bytes of memory
1 BGP AS-PATH entries using 24 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP using 441 total bytes of memory
BGP activity 4/3 prefixes, 4/3 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.2.2.2 4 100 21 22 10 0 0 00:16:04 1
4.4.4.4 4 100 19 21 10 0 0 00:15:29 0
R1#
R4#show ip bgp sum
BGP router identifier 4.4.4.4, local AS number 100
BGP table version is 3, main routing table version 3
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 100 21 19 3 0 0 00:15:46 0
R4#
R3#show ip bgp
BGP table version is 8, local router ID is 133.133.133.133
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
*> 3.3.3.3/32 0.0.0.0 0 32768 i
R3#
R2#show ip bgp
BGP table version is 12, local router ID is 22.22.22.22
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
*> 3.3.3.3/32 20.1.1.3 0 0 200 i
R2#
R1#show ip bgp
BGP table version is 10, local router ID is 111.111.111.111
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
*>i3.3.3.3/32 2.2.2.2 0 100 0 200 i
R1#
R4#show ip bgp
R4#
Observation:
· R3 advertised 3.3.3.3/32 into BGP
· R2 got it as an eBGP update from R3 and has it in its BGP table
· R1 got it as an iBGP update from R2 and has it in its BGP table
· R4 doesn’t have the prefix???
Let’s see the routes each router advertising:
R3#show ip bgp neighbor 20.1.1.2 advertised-routes
BGP table version is 8, local router ID is 133.133.133.133
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
*> 3.3.3.3/32 0.0.0.0 0 32768 i
Total number of prefixes 1
R3#
R2#show ip bgp neighbor 1.1.1.1 advertised-routes
BGP table version is 12, local router ID is 22.22.22.22
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
*> 3.3.3.3/32 20.1.1.3 0 0 200 i
Total number of prefixes 1
R2#
R1#show ip bgp neighbor 4.4.4.4 advertised-routes
Total number of prefixes 0
R1#
Observation:
· R3 is sending an eBGP update to R2 about 3.3.3.3/32
· R2 is sending an iBGP update to R1 about 3.3.3.3/32
· But R1 is not advertising this route to R4???
· Actually this is expected-behaviour.
· As per the BGP RFC, any BGP Router cannot pass updates received from one iBGP neighbor to another iBGP neighbor.
· This is what is called BGP-Split-Horizon Rule.
· In our scenario, R1 can pass the update to R4 if it is acting as Route-Reflector for R4.
Route-Reflector:
Route-Reflector:
· Route Reflector is used to avoid the full-mesh requirement an iBGP.
· Route Reflector can have clients, non-clients or eBGP neighbors
· Route Reflector work on the following 3 rules:
1. Route from a non-client peer: reflect to all the client peers with in the cluster.
2. Route from a client peer: reflect to other clients and non-client peers.
3. Route from an external BGP peer: reflect the update to all clients and non-client peers.
Let’s configure R1 as the Route-Reflector for R4 and see what happens:
R1(config)#router bgp 100
R1(config-router)#neighbor 4.4.4.4 route-reflector-client
R1(config-router)#
*Jun 15 22:20:15.765: %BGP-5-ADJCHANGE: neighbor 4.4.4.4 Down RR client config change
R1(config-router)#
*Jun 15 22:20:17.897: %BGP-5-ADJCHANGE: neighbor 4.4.4.4 Up
R1(config-router)#
R1#show ip bgp neighbor 4.4.4.4 advertised-routes
BGP table version is 10, local router ID is 111.111.111.111
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
*>i3.3.3.3/32 2.2.2.2 0 100 0 200 i
Total number of prefixes 1
R1#
** R1 is sending the update to R4 now
R4#show ip bgp
BGP table version is 4, local router ID is 4.4.4.4
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
*>i3.3.3.3/32 2.2.2.2 0 100 0 200 i
R4#
** R4 got the update and its also the best route as Next-hop is reachable via IGP.
Lets see some more details on this newly learned route on R4:
R4#show ip bgp 3.3.3.3
BGP routing table entry for 3.3.3.3/32, version 4
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x820
Not advertised to any peer
200
2.2.2.2 (metric 129) from 1.1.1.1 (111.111.111.111)
Origin IGP, metric 0, localpref 100, valid, internal, best
Originator: 22.22.22.22, Cluster list: 111.111.111.111
R4#
Observations:
· Originator: The router who originated this route initially
· R2 is the one who originated this route into AS100
· 22.22.22.22 is the BGP router-ID of R2
· Cluster-list: list of the RRs this route has passed through
· 111.111.111.111 is the Route-ID of R1
· These attributes are used to avoid loops inside an AS
No comments:
Post a Comment