cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1730
Views
0
Helpful
3
Replies

BGP best path selection

verma-rohit
Level 1
Level 1

Hi,

I am trying to get my head around best route selection but I couldn't get my head around it.

BGP routing table entry for 99.94.160.21:100:99.99.99.0/24, version 193064
BGP Bestpath: deterministic-med
Multipath: eBGP iBGP
 763 4755 6453 2914 42 19281
    129.41.164.3 (via vrf blue) from 99.182.210.105 (115.114.90.234)
      Origin IGP, localpref 950, valid, external, multipath(oldest)
      Community: 163:6174 2002:35 2002:57 2002:1001
      Extended Community: RT:8:100
      mpls labels in/out IPv4 VRF Aggr:16/nolabel
      rx pathid: 0, tx pathid: 0
  Refresh Epoch 3
  763 4755 6453 2914 42 19281
    129.41.164.4 (via vrf blue) from 99.182.210.106 (115.114.90.235)
      Origin IGP, localpref 950, valid, external, multipath, best
      Community: 163:6174 2002:35 2002:57 2002:1001
      Extended Community: RT:8:100
      mpls labels in/out IPv4 VRF Aggr:16/nolabel
      rx pathid: 0, tx pathid: 0x0
router bgp 64655
 address-family ipv4 vrf blue
  import path selection bestpath
  import path limit 2
  bgp router-id 99.1099.140.5
  redistribute connected route-map rm_conn_to_bgp_blue
  redistribute static route-map rm_static_to_bgp_vrf

  neighbor 99.182.210.105 peer-group isp-bi
  neighbor 99.182.210.105 activate
  neighbor 99.182.210.106 peer-group isp-bi
  neighbor 99.182.210.106 activate
 
  maximum-paths 2
  maximum-paths ibgp 2
  default-information originate
 exit-address-family
 !

1. Weight : NA
2. LOC: Same as 950
3. Locally generated:NA
4. AS_PATH: Same
5. MED: NA
6. eBGP over iBGP: Both are eBGP
7. Lowest IGP metric yo next hop: They have same metric
8. If multipath:
yes
9. If both routes are learned by eBGP, prefer the oldest:
bgp best path compare-routerid is not enabled.

Now the tie breaker is on step 9
1 129.41.164.3 (via vrf blue) from 99.182.210.105 (115.114.90.234)
Origin IGP, localpref 950, valid, external, multipath(oldest)

2 129.41.164.4 (via vrf blue) from 99.182.210.106 (115.114.90.235)
Origin IGP, localpref 950, valid, external, multipath, best

Case 1:
a. It is the oldest route as well as it has the the router-id buit it isnt the best route.
b. Ins't the oldest route should be at the bottom of the show command. Route which is tahhed as oldest in 2'nd last.
c. If last route is sequence is the oldest route than its selection as best route makes sense.

Now, why the best route is from 129.41.164.4 ?

1 Accepted Solution

Accepted Solutions

Elvin Arias
Level 1
Level 1

Hi [verma-rohit],

 

In this case, the best path is path #2:

 

  763 4755 6453 2914 42 19281
    129.41.164.4 (via vrf blue) from 99.182.210.106 (115.114.90.235)
      Origin IGP, localpref 950, valid, external, multipath, best
      Community: 163:6174 2002:35 2002:57 2002:1001
      Extended Community: RT:8:100
      mpls labels in/out IPv4 VRF Aggr:16/nolabel
      rx pathid: 0, tx pathid: 0x0

 

Note that BGP will always list/sort the prefixes received from BGP peers in the BGP RIB from newest (first listed) to oldest (last listed), in this case it is clear that path #2 is the oldest and was selected as overall best (check selection criteria with 'show bgp vrf X <PREFIX/PREFIX-LENGTH>' best-path-reason), as it is the last listed in the BGP VPNv4 RIB and the criteria is based on 'most stable path' or oldest route in the BGP RIB.

 

2. For path #1:

 

 763 4755 6453 2914 42 19281
    129.41.164.3 (via vrf blue) from 99.182.210.105 (115.114.90.234)
      Origin IGP, localpref 950, valid, external, multipath(oldest)      Community: 163:6174 2002:35 2002:57 2002:1001
      Extended Community: RT:8:100
      mpls labels in/out IPv4 VRF Aggr:16/nolabel
      rx pathid: 0, tx pathid: 0

 

The 'multipath(oldest)' on path #1 is an indication that this prefix+path is the next oldest path that was learned and selected as multipath. If you had more paths available in the output, you might observe that the oldest will be listed, and others won't be flagged.

 

In summary, what you are seeing is the expected output, and BGP is doing multipath. Effectively it is 1. selecting the best route (oldest) as expected, and 2. Setting a local 'flag' showing the oldest multipath.

 

Regards,

 

Elvin

View solution in original post

3 Replies 3

Martin L
VIP
VIP

 

I agree, the oldest route is at the bottom always; that is why is the Best.

not sure why or what they refers to in following output for 1st one:

multipath(oldest)

 "oldest" routes are not identified with any wording like oldest or old.  it is just at the bottom.

we need to do some research i guess

 

Regards, ML
**Please Rate All Helpful Responses **

Elvin Arias
Level 1
Level 1

Hi [verma-rohit],

 

In this case, the best path is path #2:

 

  763 4755 6453 2914 42 19281
    129.41.164.4 (via vrf blue) from 99.182.210.106 (115.114.90.235)
      Origin IGP, localpref 950, valid, external, multipath, best
      Community: 163:6174 2002:35 2002:57 2002:1001
      Extended Community: RT:8:100
      mpls labels in/out IPv4 VRF Aggr:16/nolabel
      rx pathid: 0, tx pathid: 0x0

 

Note that BGP will always list/sort the prefixes received from BGP peers in the BGP RIB from newest (first listed) to oldest (last listed), in this case it is clear that path #2 is the oldest and was selected as overall best (check selection criteria with 'show bgp vrf X <PREFIX/PREFIX-LENGTH>' best-path-reason), as it is the last listed in the BGP VPNv4 RIB and the criteria is based on 'most stable path' or oldest route in the BGP RIB.

 

2. For path #1:

 

 763 4755 6453 2914 42 19281
    129.41.164.3 (via vrf blue) from 99.182.210.105 (115.114.90.234)
      Origin IGP, localpref 950, valid, external, multipath(oldest)      Community: 163:6174 2002:35 2002:57 2002:1001
      Extended Community: RT:8:100
      mpls labels in/out IPv4 VRF Aggr:16/nolabel
      rx pathid: 0, tx pathid: 0

 

The 'multipath(oldest)' on path #1 is an indication that this prefix+path is the next oldest path that was learned and selected as multipath. If you had more paths available in the output, you might observe that the oldest will be listed, and others won't be flagged.

 

In summary, what you are seeing is the expected output, and BGP is doing multipath. Effectively it is 1. selecting the best route (oldest) as expected, and 2. Setting a local 'flag' showing the oldest multipath.

 

Regards,

 

Elvin

Hi Elvin,

 

How BGP is identify oldest path , is it based upon Time stamp. Please clarify.

 

Thanks

Narasimha.

Review Cisco Networking for a $25 gift card