BGP - Best Path Algorithm: G0/0 G1/0 G2/0 G3/0 Se2/0 Loopback0 R1 R2 R3 R4 R5 R6
BGP - Best Path Algorithm: G0/0 G1/0 G2/0 G3/0 Se2/0 Loopback0 R1 R2 R3 R4 R5 R6
Page 1 of 10
eBGP and iBGP sessions
Page 2 of 10
R6(config)# router bgp 456
R6(config-router)# neighbor 4.4.4.4 remote-as 456
R6(config-router)# neighbor 4.4.4.4 update-source Loopback0
R6(config-router)# neighbor 4.4.4.4 next-hop-self
R6(config-router)# neighbor 10.0.56.5 remote-as 456
R6(config-router)# neighbor 10.0.56.5 next-hop-self
R6(config-router)# neighbor 10.0.13.1 remote-as 12
R6(config-router)# neighbor 10.0.13.1 ttl-security hops 2
R6(config-router)# neighbor 10.0.23.2 remote-as 12
R6(config-router)# neighbor 10.0.23.2 ttl-security hops 2
R6(config-router)# neighbor 10.0.26.2 remote-as 12
R6(config-router)# neighbor 10.0.56.5 remote-as 456
R6(config-router)# neighbor 10.0.56.5 next-hop-self
1. Weight
Please force R4 to send BGP Route-Refresh request to all its external peers.
R4# clear ip bgp 12 soft
Please redo the configuration on R4 and force it to send BGP Route-Refresh request to all its external peers.
Page 3 of 10
Please configure R6 to associate different weights to each of its external peers.
R6(config)# route-map setWeights_100
R6(config-route-map)# set weight 100
R6(config)# route-map setWeights_101
R6(config-route-map)# set weight 101
R6(config)# route-map setWeights_102
R6(config-route-map)# set weight 102
Please force R6 to send BGP Route-Refresh request to all its external peers.
R6# clear ip bgp 12 soft
Please redo the configuration on R6 and force it to send BGP Route-Refresh request to all its external peers.
Local-Preference
Please configure R6 to assign Local-Preference 199 when advertises prefixes to each of its internal peers.
R6(config)# route-map LocalPref_199
R6(config-route-map)# set local-preference 199
Please force R6 to send BGP Route-Refresh request to all its external peers.
R6# clear ip bgp 456 soft
Q2: Which is the best path for networks 12.12.12.0 and 21.21.21.0 on R5 and R4?
A:
Page 4 of 10
6.6.6.6 for R4 and for R5 10.0.56.5
Q3: Why R4 prefers R6 (BGP router-id 6.6.6.6) for destination networks 12.12.12.0 and 21.21.21.0?
A: local pref 199
Please redo the configuration on R6 and force it to send BGP Route-Refresh request to all its external peers.
AS-Path
Please force R2 to send BGP Route-Refresh request to all its external peers.
R2# clear ip bgp 456 soft
R4 -10.0.14.1
R6 - 10.0.23.2
Redo the configuration on R2 and force R2 to send BGP Route-Refresh request to all its external peers.
R2# clear ip bgp 456 soft
Origin
Page 5 of 10
Please verify BGP table in R4 and R6.
Rx# show ip bgp
R6 10.0.23.2
R4- 10.0.23.2
Redo the configuration on R2 and force R2 to send BGP Route-Refresh request to all its peers.
R2# clear ip bgp * soft
MED
Please configure R2 to set MED (a.k.a. metric) 199 for its advertised networks.
R2(config)# route-map c2b permit 10
R2(config-route-map)# set metric 199
Please wait for 30-60 seconds and then verify BGP table in R4 and R6.
Rx# show ip bgp
Redo the configuration on R1 and R2 and force both to send BGP Route-Refresh request to all its peers.
Rx# clear ip bgp * soft
Page 6 of 10
eBGP vs iBGP
Please deactivate the BGP session with the current best next hop.
R4(config)#router bgp 456
R4(config-router)# neighbor <IP> shutdown
Please continue to deactivate the BGP session with the current best next hop.
R4(config)#router bgp 456
R4(config-router)# neighbor <IP> shutdown
IGP metric
Q1: Which is the best path to networks 12.12.12.0 and 21.21.21.0? How is learnt this next hop by R4?
A:
10.0.14.1
Please wait for 30-60 seconds and then verify BGP table in R4 and R6 for network 12.12.12.0 or 21.21.21.0.
Rx# show ip bgp <IP>
Q2: Which is the best path to networks 12.12.12.0 and 21.21.21.0? How is learnt this next hop by R4 and what is the
value of the metric?
A: 10.0.13.1 metric 20;
Please wait for 30-60 seconds and then verify BGP table in R4 and R6 for network 12.12.12.0 or 21.21.21.0.
Rx# show ip bgp <IP>
Q3: Which is the best path to networks 12.12.12.0 and 21.21.21.0? How is learnt this next hop by R4 and what is the
value of the metric?
A:
Please modify the BGP router-id of this BGP peer (in this case must be R1 or R2).
Rx(config)# router bgp 12
Rx(config-router)# bgp router-id <IP>
Page 8 of 10
A:
BGP router-id
This is the case when multiple paths exist and are all INTERNAL.
IP next-hop
Conclusions
Page 9 of 10
Please fill in the correct order of BGP attributes used by decision process to choose the best path.
1. weight
2. local pref
3. AS path
4. origin
5. med
6. eBGP iBGP
7. ibgp metric
8. static router for ebgp
9.
10.
11.
Page 10 of 10