If all other attributes are equal finally it boils down to the Router ID..
Let's see an example..
Basic BGP configuration is like the following..
R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 remote-as 2
R1(config-router)#neighbor 192.168.13.3 remote-as 2
R2(config)#router bgp 2
R2(config-router)#neighbor 192.168.12.1 remote-as 1
R2(config-router)#network 10.10.10.0 mask 255.255.255.0
R2(config-router)#network 20.20.20.0 mask 255.255.255.0
R3(config)#router bgp 2
R3(config-router)#neighbor 192.168.13.1 remote-as 1
R3(config-router)#network 10.10.10.0 mask 255.255.255.0
R3(config-router)#network 20.20.20.0 mask 255.255.255.0
For both 10.10.10.0/24 and 20.20.20.0/24 networks, best routes are learnt via 192.168.12.2 by default.. Because all other attributes are equal, the lowest router-id has become the most preferred.
Route with the lowest router ID is preferred..
Let's see an example..
Basic BGP configuration is like the following..
R1(config)#router bgp 1
R1(config-router)#neighbor 192.168.12.2 remote-as 2
R1(config-router)#neighbor 192.168.13.3 remote-as 2
R2(config)#router bgp 2
R2(config-router)#neighbor 192.168.12.1 remote-as 1
R2(config-router)#network 10.10.10.0 mask 255.255.255.0
R2(config-router)#network 20.20.20.0 mask 255.255.255.0
R3(config)#router bgp 2
R3(config-router)#neighbor 192.168.13.1 remote-as 1
R3(config-router)#network 10.10.10.0 mask 255.255.255.0
R3(config-router)#network 20.20.20.0 mask 255.255.255.0
For both 10.10.10.0/24 and 20.20.20.0/24 networks, best routes are learnt via 192.168.12.2 by default.. Because all other attributes are equal, the lowest router-id has become the most preferred.
Note:-
Don't misunderstand the next hop of the route with the neighbors router ID. You don't see the neighbor's router ID on the above output. Even if you look for a show ip bgp summary for neighbors, those are not the Router IDs of the neighbors you are seeing on the output..
Then what are the router ids of the neighbors??
Above are the real router IDs. We can manually change it too.
Let's change the R2's ID to a higher value..
R2(config)#router bgp 2
R2(config-router)#bgp router-id 40.40.40.40
Now you can see that the route from R3 is chosen because now the router id is lower in R3 than R2.
Note:-
Following is the BGP router ID selection preference of a router..
(1) Use the address configured by the bgp router-id command
(2) Use the Loopback interface address with the highest IP address
(3) Use the highest IP address of the interface
(4) If no interface exists, set the router-ID to 0.0.0.0
you're actually a good webmaster. The website loading velocity is incredible.
ReplyDeleteIt seems that you are doing any unique trick.
Also, The contents are masterpiece. you have performed a fantastic process in this matter!