Assume 3 router R1, R2, R3 are in the common subnet. R1 is in AS1001 R2 in AS2002 and R3 in AS3003. R1 peers only with R2 and R3 only peers with R2. So any routes advertised by R1 or R3 will be learnt via R2 in AS2002. But R2 will set the next hop to the router advertising the prefix(because they are in the common subnet).
Lets check R2 bgp table
R2#sh ip bgp
BGP table version is 4, local router ID is 2.2.2.2
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
*> 1.1.1.0/24 192.168.0.1 0 0 1001 i
*> 2.2.2.0/24 0.0.0.0 0 32768 i
*> 3.3.3.0/24 192.168.0.3 0 0 3003 i
R2#
1.1.1.0/24 is advertised by R1 and 3.3.3.0/24 bu R3.
Lets check the bgp tables of R1 and R3 now;
R1#sh ip bgp
BGP table version is 4, local router ID is 1.1.1.1
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
*> 1.1.1.0/24 0.0.0.0 0 32768 i
*> 2.2.2.0/24 192.168.0.2 0 0 2002 i
*> 3.3.3.0/24 192.168.0.3 0 2002 3003 i
We see 3.3.3.0/24 next hop hbeing directly pointed to R3 instead R2.
R3#sh ip bgp
BGP table version is 4, local router ID is 3.3.3.3
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
*> 1.1.1.0/24 192.168.0.1 0 2002 1001 i
*> 2.2.2.0/24 192.168.0.2 0 0 2002 i
*> 3.3.3.0/24 0.0.0.0 0 32768 i
We see 1.1.1.0/24 next hop hbeing directly pointed to R1 instead R2.
To override this we need to issue neighbor next-hop-self command.
You can refer to this RFC for more information
No comments:
Post a Comment