07-06-2014 10:46 PM - edited 03-03-2019 07:30 AM
With reference to cisco's document on BGP Best Path Selection Algorithm (http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html).
Out of given 9 paths why 6th has been selected even though AS_PATH for 8th route is better.
Can anyone explains here, as this document has not considered the AS-PATH during path selection and used lowest ROUTER ID only.
Thanks in advance and expect technical explanation here.
07-07-2014 02:49 AM
Hey Buddy
The AS_PATH for both is only 1, don't get confused by (AS_SET) which only counts as 1 no matter how many AS are in the set. Refer to section "How the Best Path Algorithm Works"
4.Prefer the path with the shortest AS_PATH.
Note: Be aware of these items:
◦An AS_SET counts as 1, no matter how many ASs are in the set.
So bearing the above in mind
Example: BGP Best Path Selection
Path6
(64955 65003) 65089 --- this equals 1
172.16.254.226 (metric 20645) from 10.57.255.11 (10.57.255.11)
Origin IGP, metric 0, localpref 100, valid, confed-external, best
Extended Community: RT:1100:1001
mpls labels in/out nolabel/362
!--- BGP selects this as the Best Path on comparing
!--- with all the other routes and selected based on lower router ID.
Path8
(65003) 65089 --- this equals 1
172.16.254.226 (metric 20645) from 172.16.254.234 (172.16.254.234)
Origin IGP, metric 0, localpref 100, valid, confed-external
Extended Community: RT:1100:1001
mpls labels in/out nolabel/362
Comparing path 6 with path 8:
Both paths have reachable next hops
Both paths have a WEIGHT of 0
Both paths have a LOCAL_PREF of 100
Both paths are learned
Both paths have AS_PATH length 1 --- because the (AS_SET) always equals 1
Both paths are of origin IGP
Both paths have the same neighbor AS, 65089, so comparing MED.
Both paths have a MED of 0
Both paths are confed-external
Both paths have an IGP metric to the NEXT_HOP of 20645
Path 6 is better than path 8 because it has a lower Router-ID.
Hope it helps (:
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide