Router# show ip bgp 10.3.3.3 255.255.255.255
BGP routing table entry for 10.3.3.3/32, version 35
Paths: (3 available, best #2, table default)
Multipath: eBGP
Flag: 0x860
Advertised to update-groups:
1
200
10.71.8.165 from 10.71.8.165 (192.168.0.102)
Origin incomplete, localpref 100, valid, external, backup/repair
Only allowed to recurse through connected route
200
10.71.11.165 from 10.71.11.165 (192.168.0.102)
Origin incomplete, localpref 100, weight 100, valid, external, best
Only allowed to recurse through connected route
200
10.71.10.165 from 10.71.10.165 (192.168.0.104)
Origin incomplete, localpref 100, valid, external,
Only allowed to recurse through connected route
Above is sample output of "show ip bgp x.x.x.x". This particular BGP router has learned multiple paths to get to the 10.3.3.3/32 host, and is listing each entry. Of the three that were learned, the 2nd one is the best — and therefor the entry that makes it to the actual Route table (RIB).
My question is, does the order in which the three paths to the target appear in the output of this command indicate something? If so, what does it mean?
Best Answer
The order of received prefixes listed by the
show ip bgp
orshow ip bgp x.x.x.x
command varies depending on your BGP configuration.Consider the following topology. The BGP speaker
R6
is aggregating eBGP neighborships for BGP ASN 888.ASN 123, 1581 and 1771 are all originating the same network prefixes in order to demonstrate the behavior of the
show ip bgp
output.Below is the initial view of Router 6's BGP table.
These routes can be re-ordered in the
show ip bgp x.x.x.x
output by controlling the order that they're learned. Below, all eBGP neighbors advertising the 10.101.1.1/32 prefix are administratively shutdown and brought up one at a time.If deterministic MED is not enabled, then prefixes are listed in chronological order, regardless of originating AS, from youngest to oldest (top to bottom).
If deterministic MED is enabled, the prefixes are grouped by ASN. The prefixes are still listed in chronological order from youngest to oldest within their respective ASN group and the ASN group order is displayed from youngest to oldest with the eldest prefix of each group being compared.
The BGP neighbors that belong to AS 1581 and 1771 can be forced to flap and reorder the ASN groups.
The eldest route below is from ASN 123 causing the ASN group to be listed at the bottom of the
show ip bgp x.x.x.x
output.After your BGP table has sorted with deterministic MED enabled, removing deterministic MED will not return your BGP table to standard formatting until routes are removed/cleared and relearned.