Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. If you'd prefer to explore, try our test area to get started. And see here for current known issues.

New Member

BGP route selection troubleshooting

Routers; CE1 (1.2.3.4), PE1 and PE2 (5.6.7.8), imagine a triangle set up.

CE1 has a link to PE1 and they are peering via BGP to exchange routes, into a VRF (CE1 AS 65002, Provider AS 12345). CE1 also has a backup link to PE2, PE2 has a static route pointing to CE1's subnets, which is redistributed into iBGP between PE1 and PE2.

The favoured path to CE1 subnet 10.46.63.0/24 from within the provider network is via PE2, down the backup link, and I can't work out with this is. This is the output from PE1;

pe1>show ip route vrf CustXYZ

B        10.46.63.0/24 [200/0] via 5.6.7.8, 7w0d

Here above, we see the iBGP route to PE2 is being preferred. Below, we can see the two routes comming in, so why isn't my eBGP route from 1.2.3.4 being preferred (which would have an administrative distance of 20 not 200). How can I trouleshoot this?

pe1>show bgp vpnv4 unicast vrf CustXYZ 10.46.63.0

BGP routing table entry for 12345:60002:10.46.63.0/24, version 55720

Paths: (2 available, best #2, table CustXYZ)

  Advertised to update-groups:

     5          1       

  65002

    10.10.0.10 from 10.10.0.10 (1.2.3.4)

      Origin incomplete, metric 0, localpref 1000, valid, external

      Extended Community: RT:12345:60002

  Local

    5.6.7.8 (metric 15) from 5.6.7.8 (5.6.7.9)

      Origin incomplete, metric 0, localpref 1000, valid, internal, best

      Extended Community: RT:12345:60002

      mpls labels in/out nolabel/63

Everyone's tags (2)
1 ACCEPTED SOLUTION

Accepted Solutions

BGP route selection troubleshooting

Hi jwbensley,

The answer can be found to the next output in bold

Paths: (2 available, best #2, table CustXYZ)

  Advertised to update-groups:

     5          1      

  65002

    10.10.0.10 from 10.10.0.10 (1.2.3.4)

      Origin incomplete, metric 0, localpref 1000, valid, external

      Extended Community: RT:12345:60002

  Local

    5.6.7.8 (metric 15) from 5.6.7.8 (5.6.7.9)

      Origin incomplete, metric 0, localpref 1000, valid, internal, best

      Extended Community: RT:12345:60002

      mpls labels in/out nolabel/63

So, the route 10.46.63.0 is preferred via the next hop   5.6.7.8 which has AS-PATH none/LOCAL (local originated via redistribution (origin=?) or learned via iBGP). The same route via 10.10.0.10 has AS-PATH=65002 which it is not preferred (the lower AS PATH is preffered).

The eBGP>iBGP criteria is later on the BGP algorithm and could be used if AS-PATH via both next hop were equal. The AD is not in the BGP algorithm

Hope that helps and it is clear now.

Vasilis


6 REPLIES

BGP route selection troubleshooting

Hi,

The BGP algorith selects the best route to install the BGP either the route is iBGP or eBGP.

The AD is not a parameter to select the best route between an iBGP and eBGP route. So AD is not a criteria for BGP best paht selection.

You can modify a BGP attribute, e.g.the BGP local preference to a value higer than the 1000 which is configured to the one PE. Higher  local preference defines the best route.

Hope that helps

Vasilis

New Member

BGP route selection troubleshooting

Hi Vasileios,

Sorry I wasn't clear enough; what I want to know is why has BGP chosen the route it has, to go into the routing table?

BGP route selection troubleshooting

It would be great if you could add some config details on PE1 and  PE2. Also " show bgp vpnv4 unicast vrf CustXYZ 10.46.63.0 "  on PE2.

But still from what has been given I could infer the following..

1] PE2 has a static route to 10.46.63.0/24 which is redistributed into BGP.

2] PE1 learns about the 10.46.63.0/24 from CE1 through redistribution [AS 65002] as well as from IBGP peer PE2 [SOURCED LOCAL on PE2/ NO AS INCLUDED]

3] As per the route seclection criteria since first three weight (doesnt apply) , localpref (same) & Locally originated (ON PE1 route is not sourced locally] dont break the tie, we have fourth i.e AS-PATH that breaks the tie  .

BGP route selection troubleshooting

Hi jwbensley,

The answer can be found to the next output in bold

Paths: (2 available, best #2, table CustXYZ)

  Advertised to update-groups:

     5          1      

  65002

    10.10.0.10 from 10.10.0.10 (1.2.3.4)

      Origin incomplete, metric 0, localpref 1000, valid, external

      Extended Community: RT:12345:60002

  Local

    5.6.7.8 (metric 15) from 5.6.7.8 (5.6.7.9)

      Origin incomplete, metric 0, localpref 1000, valid, internal, best

      Extended Community: RT:12345:60002

      mpls labels in/out nolabel/63

So, the route 10.46.63.0 is preferred via the next hop   5.6.7.8 which has AS-PATH none/LOCAL (local originated via redistribution (origin=?) or learned via iBGP). The same route via 10.10.0.10 has AS-PATH=65002 which it is not preferred (the lower AS PATH is preffered).

The eBGP>iBGP criteria is later on the BGP algorithm and could be used if AS-PATH via both next hop were equal. The AD is not in the BGP algorithm

Hope that helps and it is clear now.

Vasilis


New Member

BGP route selection troubleshooting

Thanks to the both of you, this is very clear now

BGP route selection troubleshooting

as mentioned above see point three in the below link:

Prefer the path that was locally originated via a network or aggregate BGP subcommand or through redistribution from an IGP

http://www.cisco.com/en/US/tech/tk365/technologies_tech_note09186a0080094431.shtml

however administrative distance AD comes into effect after the router select best path from BGP this BGP route will be compared to the local routing table if there is any route with lower AD then it will be installed if not then the BGP route will be installed in the routing table

hope this help

790
Views
10
Helpful
6
Replies