Why BGP selecting highest IP as Best path

This is Lab 28

Please take a look on R3 -3 configuration
why it’s showing highest IP as a best path while didn’t apply any attribute yet

aapne local perfence 100 diya h
esliaa traffic 192.168.13.1 se ja rha h

Although I didn’t set any local preference, that’s by default. By the way local preference 100 for
192.168.12.1
and BGP choosing 192.168.13.1 as the best path

The only reason that this could be happening, would be due to next-hop (router with the closest IGP next-hop) would be preferred.
Local preference in this case has no real bearing due to the following:

  • Route 1 (192.168.13.1): Local Preference (default) = 100
  • Route 2 (192.168.12.1): Local Preference = 100
    Could you share a topology diagram and BGP configurations?

you can refer to LAB 28 where all configurations have been done by me as per CCNP ROUTE(LAB GUIDE)
except router 1’s loopback IP is 8.8.8.8 , rest all the things are same.

Please break that down for me if you get the the reason

if all attributes are equal, i believe it may chose the Router-ID for both the Routers and select the router accordingly.

BGP Path Selection

BGP could possibly receive multiple advertisements for the same route from multiple sources. BGP selects only one path as the best path. When the path is selected, BGP puts the selected path in the IP routing table and propagates the path to its neighbors. BGP uses the following criteria, in the order presented, to select a path for a destination:
If the path specifies a next hop that is inaccessible, drop the update.
Prefer the path with the largest weight.
If the weights are the same, prefer the path with the largest local preference.
If the local preferences are the same, prefer the path that was originated by BGP running on this router.
If no route was originated, prefer the route that has the shortest AS_path.
If all paths have the same AS_path length, prefer the path with the lowest origin type (where IGP is lower than EGP, and EGP is lower than incomplete).
If the origin codes are the same, prefer the path with the lowest MED attribute.
If the paths have the same MED, prefer the external path over the internal path.
If the paths are still the same, prefer the path through the closest IGP neighbor.
Prefer the path with the lowest IP address, as specified by the BGP router ID.

1 Like

Sometime it happens like if lower ip interface flapped so BGP will consider stable link.

Try to reset the BGP Neighbour and check what you are getting.

2 Likes

Yes, Sir Once I reset all routers neighborship completely It comes up with lowest IP as best path.
But sometime even whole resetting of neighborship of all routers doesn’t work. didn’t get why it causes.
Although initially I did same thing but still that didn’t work.