cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
421
Views
5
Helpful
2
Replies

BGP Path Selection

Hello,

Making some BGP labs, I found this BGP decision to select a best route to 10.10.10.10:

 

R8#sh ip bgp vpnv4 vrf call 10.10.10.10
BGP routing table entry for 1:100:10.10.10.10/32, version 33
Paths: (3 available, best #2, table call)
  Advertised to non peer-group peers:
  5.5.5.5 6.6.6.6
  65400
    3.3.3.3 (metric 3) from 5.5.5.5 (5.5.5.5)
      Origin IGP, metric 10, localpref 100, valid, internal
      Extended Community: RT:1:100 RT:2:100
      Originator: 3.3.3.3, Cluster list: 5.5.5.5
  65401
    10.0.89.9 from 10.0.89.9 (9.9.9.9)
      Origin IGP, metric 100, localpref 100, valid, external, best

      Extended Community: RT:1:100
  65400
    3.3.3.3 (metric 3) from 6.6.6.6 (6.6.6.6)
      Origin IGP, metric 10, localpref 100, valid, internal
      Extended Community: RT:1:100 RT:2:100
      Originator: 3.3.3.3, Cluster list: 6.6.6.6

 

 

 

I hoped that changing metric to 100 from 10.0.89.9, the router will prefer the other routes but not. I have to change local preference to do that. From the above output, I would like to know which atrubute is using BGP to select the route ( I think 3. locally originated, but this router is learning the prefix via eBGP). The weight has not been modified.

 

R8#sh ip bgp vpnv4 vrf call
BGP table version is 40, local router ID is 8.8.8.8
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete

   Network          Next Hop            Metric LocPrf Weight Path
Route Distinguisher: 1:100 (default for vrf call)
*>i1.1.1.1/32       2.2.2.2                  0    100      0 65400 i
* i                 2.2.2.2                  0    100      0 65400 i
* i4.4.4.4/32       3.3.3.3                  0    100      0 65400 i
*>i                 3.3.3.3                  0    100      0 65400 i
*> 9.9.9.9/32       10.0.89.9                0             0 65401 i
*>i10.0.14.0/24     3.3.3.3                  0    100      0 65400 i
* i                 3.3.3.3                  0    100      0 65400 i
* i10.10.10.10/32   3.3.3.3                  0    100      0 65400 i
*>                  10.0.89.9              100             0 65401 i
* i                 3.3.3.3                  0    100      0 65400 i

Thanks.

2 Replies 2

vanoordtm
Level 1
Level 1

It looks to me the route is selected based on  rule 7 of the bgp best path selection, which is external over internal.  Why? Because Med is only considered if the first AS matches or BGP always-compare-med is applied.

Hello.

Please refer http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html

You may configure an option to compare MED for different AS-es.

Review Cisco Networking for a $25 gift card