In BGP recursive scenario, the recursive route is taking an unexpected next-hop. Here is the routing table:

S* [10/0] via, wan

B [20/0] via, MPLS, 2d18h20m

B [20/0] via (recursive via, 1d1h10m

The next-hop of the recursive route should be the second route in the table which is another BGP route. However, it's taking the default route on top.

When adding a static route which is exactly the same as the second BGP route, next-hop is determined correctly:

S* [10/0] via, wan

S [20/0] via, MPLS

B [20/0] via (recursive via, 1d1h10m

Is this an expected behavior?

1 Answer 1


IOS will not use another BGP route for recursive lookup for a BGP route. This is somewhat hinted at in the "Why Routers Ignore Paths" section of the "BGP Best Path Selection Algorithm" documentation:

[Routers ignore] paths for which the NEXT_HOP is inaccessible.

Be sure that there is an Interior Gateway Protocol (IGP) route to the NEXT_HOP that is associated with the path.

So yes, this is expected behavior on IOS. Other routing platforms may behave differently. There is also an article describing further how the lookup works.

  • Thanks. This was useful. I wonder if this is a standard BGP behavior or vendor specific. Mar 21, 2019 at 8:18
  • @onlyforthis: I suspect it's mostly standard. For example, RouterOS requires the nexthop scope to be lower than the route's own. Mar 21, 2019 at 14:01
  • @onlyforthis It depends on the vendor, Juniper can use BGP routes for recursive lookup. If this answers you question please accept it as answer. Mar 21, 2019 at 15:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.