Why is this selected as best path by BGP?

Hi all!!!
The network 1.2.3.4/32 is being advertised by SW3 and R6 through BGP and from R3's perspective the best path is SW3 instead of R1. All things being equal (weight, local preference, locally originated, AS path, origin code, MED, eBGP over iBGP, lowest IGP metric to the BGP next hop), we start looking at:

  • Lowest router ID: Skip this since it is only compared when both advertising routers are iBGP neighbors
  • Oldest route: This is my confusion. Is it oldest route in terms of who started advertising it first or is it oldest route in terms of who's been my eBGP neighbor the longest time?

Here is the BGP show output and yes, I did configure the "network" command on SW1 first so it seems like it is oldest route in terms of who started advertising it first but I just want to confirm my logic here since R1 has been R3's neighbor longer than SW1:

R3(config)#do sh bgp ipv4 u 1.2.3.4/32
BGP routing table entry for 1.2.3.4/32, version 44
Paths: (3 available, best #3, table default)
Advertised to update-groups:
1 2 3
Refresh Epoch 19
100
155.1.45.4 (metric 27309056) from 155.1.0.5 (150.1.5.5)
Origin IGP, metric 0, localpref 100, valid, internal
Refresh Epoch 17
100
155.1.13.1 from 155.1.13.1 (150.1.1.1)
Origin IGP, localpref 100, valid, external
Refresh Epoch 1
300
155.1.37.7 from 155.1.37.7 (150.1.7.7)
**** Origin IGP, localpref 100, valid, external, best****

R3(config)#do sh bgp ipv4 u su | i 155.1.13.1|155.1.37.7|Neighbor
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
155.1.13.1 4 100 217 240 44 0 ****0 01:38:14 **** 12
155.1.37.7 4 300 217 220 44 0 0 01:37:28 12

Best Answer

Answers

  • alexpfalexpf ✭✭

    This is what I found on the Cisco forum:
    https://supportforums.cisco.com/discussion/11227911/bgp-route-age

    it's the first route to be received and if that route is lost there is no logic of which is the next oldest route, it goes to the next decision step which is lowest router-id. So really, step #10 should just be described as there is no preemption when comparing router-id's, which ever neighbor sends the route first will win and if that route is lost we use the next lowest router-id, nothing to do with route age at that point.

    It is also not possible to see the age of the route in the BGP table.

    Thanks,

    Alex

Sign In or Register to comment.