Welcome Guest!
twitter facebook rss

,

How bgp selects the best path ?

Problem:

How bgp selects the best path ?



Solution:


In BGP running on a Cisco router, this is the process:

Use paths with the highest Weight
Use paths with the highest Local Preference
Use paths sourced with the network or redistribute command over paths sourced from the aggregate-address command.
Choose the route with the shortest AS-Path
Use paths origined from (in this order) IGP, EGP and Unknown. (IGP paths are prefered over EGP, EGP over unknown)
Choose the path with the lowest MED (‘MED is cost’, so the path with the lowest MED is prefered)
Choose eBGP paths over iBGP
If there are multiple prefered iBGP paths, use the one with the lowest IGP metric.
Now see if there are multiple paths , and if the router is running with the bgp-multipath command. (then they will be installed)
If there are multiple eBGP paths for the destination, choose the oldest one (the one first received).
If there are no current best path, or you run the bgp best path compare-routerid command.
Choose the route originating from the router with the lowest router-id.
(Route Reflectors) If paths originate from the same router, choose the path with the lowest cluster list length.
At last, choose the route that originates from the lowest neighbor address
Why isn’t the prefix received and installed to the routing table?
This happens from time to time, this is often because there are no IGP route to the NEXT_HOP in the BGP UPDATE.  It can also occur if the local-as is present in the AS_PATH attribute.

How can I see which prefixes are filtered, and which are received?
You can use the command neighbor 10.20.30.40 soft-reconfiguration inbound to make the router store rejected, filtered and other routing information in memory for you. You can then use the show ip bgp neighbor 10.20.30.40 received-routes and show ip bgp neighbor 10.20.30.40 advertised-routes to see you received and advertised routes.

0 comments

Readers Comments

Latest Posts

Sponsored By

Featured Video

Our Sponsors

Our Sponsors

Visit Nepal Info and Guide