VRF ROUTES IMPORT

Hi All

 

I came across this scenario while doing some test labs ,I am try to import the same route from two RD. I am import a route from a CE with same RD as mine and the same route from a different RD from mine.

 

show ip bgp vpnv4 vrf CustA 192.126.3.2

BGP routing table entry for 65000:1008:192.126.3.0/24, version 110

BGP Bestpath: deterministic-med: med

Paths: (2 available, best #1, table CustA)

  Not advertised to any peer

  Refresh Epoch 1

  Local, imported path from 65000:2505:192.126.3.0/24 (global)

    10.10.10.1 (metric 10) from 10.10.10.23 (10.10.10.23)

      Origin incomplete, metric 0, localpref 100, valid, internal

      Extended Community: RT:65000:1008 RT:65000:2505

      Originator: 10.10.10.1, Cluster list: 10.10.10.23, 10.10.10.33

      mpls labels in/out nolabel/500

      rx pathid: 0, tx pathid: 0

  Refresh Epoch 1

  Local

    10.10.10.1 (metric 10) from 10.10.10.23 (10.10.10.23)

      Origin incomplete, metric 0, localpref 100, valid, internal

      Extended Community: RT:65000:1008 RT:65000:5045

      Originator: 10.10.10.1, Cluster list: 10.10.10.23, 10.10.10.33

      mpls labels in/out nolabel/389

      rx pathid: 0, tx pathid: 0x0

  Refresh Epoch 1


The first route imported is imported from a different RD and the second route has the same RD as my VRF. When all the values are same how does the BGP select the best path of the two.?

Comments

  • "I am import a route from a CE with same RD as mine and the same route from a different RD from mine."

    I don't understand what you are trying to do, can you be more specific or give some config?

    Thnx

  • This is just a test scenario where I am trying to understand how BGP path selection happens in Cisco's BGP implementation in 15.2 .

    I have a overlapping subnet both in customerA(1:1) and CustomerB(2:2). I am trying to import the subnet into a CustomerA's (1:1)site on a different PE. While importing I import both 1:1 and 2:2 into this new PE's CustomerA's vrf (1:1), and now I have subnet having two paths one imported from 1:1 with same RD and another which is imported from 2:2. 

     

    Seeing the below exhibit all the values are same on both the paths, so how is the best of the two is elected

     

    show ip bgp vpnv4 vrf CustA 192.126.3.2

    BGP routing table entry for 65000:1008:192.126.3.0/24, version 110

    BGP Bestpath: deterministic-med: med

    Paths: (2 available, best #1, table CustA)

      Not advertised to any peer

      Refresh Epoch 1

      Local, imported path from 65000:2505:192.126.3.0/24 (global)

        10.10.10.1 (metric 10) from 10.10.10.23 (10.10.10.23)

          Origin incomplete, metric 0, localpref 100, valid, internal

          Extended Community: RT:65000:1008 RT:65000:2505

          Originator: 10.10.10.1, Cluster list: 10.10.10.23, 10.10.10.33

          mpls labels in/out nolabel/500

          rx pathid: 0, tx pathid: 0

      Refresh Epoch 1

      Local

        10.10.10.1 (metric 10) from 10.10.10.23 (10.10.10.23)

          Origin incomplete, metric 0, localpref 100, valid, internal

          Extended Community: RT:65000:1008 RT:65000:5045

          Originator: 10.10.10.1, Cluster list: 10.10.10.23, 10.10.10.33

          mpls labels in/out nolabel/389

          rx pathid: 0, tx pathid: 0x0

      Refresh Epoch 1

     

    Hope this clarifies.

    Thanks

     

  • In this document detailing the best path selection (http://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13753-25.html) there is a section on BGP multipath which seems to suggest that the most recent route received will be installed when all the details of the route match.

    "BGP inserts up to n most recently received paths from multipath candidates in the IP routing table. The maximum value of n is currently 6. The default value, when multipath is disabled, is 1.". 

    So is path 1 the most recently received?

  • JoeMJoeM ✭✭✭

    Yes, this wording is confusing, as it does sound like the newest route(s), but I think that it is the opposite.  Oldest route wins.

    I have not had any luck finding information to support this.  I just remember this from another conversation about a similar situation.

     

    My answer?   Oldest route wins.  I hope there is someone that can confirm this.  Thanks.

  • hey joe oldest ones win always , i remeber this from somewhere, it prefers the ones which have been on for a long time, i concur with joe

  • Hi,

     

    Here is the confirmation of your statement about the oldest route:

     

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

     

    It aslo seems reasonable because the oldest route is with more probability also more stable than the newer one.

  • Agree in the eBGP case;

    "When both paths are external, prefer the path that was received first (the oldest one)."

    I think it's probably also the case with the internals as that would certainly make sense in terms of route stability, I think it was just the wording of this statement that got me confused;

    "BGP inserts up to n most recently received paths from multipath candidates in the IP routing table."

    Only way to know for sure, I will have a go at labbing it on Monday.

  • can u imagine tht but oldest route will win, thts why its always best to reset peers and let bgp decide with wat it has

  • JoeMJoeM ✭✭✭

    ......I think it was just the wording of this statement that got me confused;

    "BGP inserts up to n most recently received paths from multipath candidates in the IP routing table."

    Only way to know for sure, I will have a go at labbing it on Monday.

    When you test this, be sure that you are doing it for both setups -- with and without multipath.   I am wondering if there may be a difference when the multipath option is set -- if we take the wording literally.

    Please let us know what you see happen.

  • ......I think it was just the wording of this statement that got me confused;

    "BGP inserts up to n most recently received paths from multipath candidates in the IP routing table."

    Only way to know for sure, I will have a go at labbing it on Monday.

    When you test this, be sure that you are doing it for both setups -- with and without multipath.   I am wondering if there may be a difference when the multipath option is set -- if we take the wording literally.

    Please let us know what you see happen.

    Same rules apply for  please check belowhope its relevent , 

    https://drift.uninett.no/nett/ip-nett/bgp-route-selection.html

     

  • I managed to test this with routes advertised from different VRFs with the same route-target.  By shutting/ no shutting the interfaces being advertised it certainly appeared that the first/oldest route received is the preferred route.  I was only able to test this in a non multipath environment, if I get a chance I will have a look at a multipath environment.

Sign In or Register to comment.