Recursive Next-Hop
Cheat sheet · https://pcornel.dk/topic.php?topic=2605
Answer
A recursive next hop is one that is not on a directly connected network — typical for BGP and some static routes. The router looks up the next hop itself in the routing table, repeatedly, until it reaches a connected interface.
Remember
If the next hop cannot be resolved, the route is not used (BGP marks it inaccessible). If it resolves through a default route, traffic may go the wrong way — ip route ... permanent or recursion limits can matter. Resolution can change when the IGP changes.
First checks
show ip route <prefix>— the next hop of the route.show ip route <next hop>— how the next hop itself is reached.show ip cef <prefix> detail— the fully resolved path.show bgp ipv4 unicast <prefix>—inaccessiblenext hop.show ip cef <next hop>— the adjacency at the end of the chain.
Commands
show ip route <next-hop>- Resolve the route used to reach an indirect next hop.
show ip bgp 203.0.113.0ip route P M 192.0.2.1ip route P M Gi0/0/1ip route P M Gi0/0/1 10.1.12.2
Verify in this order
route with a non-connected next hop → next hop looked up in the RIB → repeated until a connected route → adjacency resolved → CEF entry uses the final interface
Where it usually breaks
underlay/interface reachability → protocol adjacency/session → received/originated state → policy → best path/RIB → FIB/adjacency → traffic path
Recursive next-hop flow
| Step | Example evidence |
|---|---|
| Destination route | 203.0.113.0/24 via 192.0.2.2 |
| Next-hop route | 192.0.2.2/32 via 10.0.12.2 |
| Connected resolution | 10.0.12.0/30 is directly connected |
| CEF | destination resolves to Gi0/0 / 10.0.12.2 |
| Adjacency | rewrite/ARP for 10.0.12.2 is usable |
Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2605