Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

Recursive Next-Hop

Direct 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.

When to use this

Use it when a BGP or static route is in the table but traffic does not flow, or uses an unexpected exit.

First 30 seconds

1. show ip route <prefix> — which next hop?

2. show ip route <next hop> — resolved through which route? Connected eventually?

3. Resolved only via the default route → probably not intended.

4. BGP shows inaccessible → the IGP does not carry the next hop.

5. show ip cef <prefix> detail — the final interface and adjacency.

Operational verification

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

Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Cisco IOS / IOS XE
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformCisco IOS / IOS XE
Key commandshow ip route <next-hop>
Scope / prerequisiteUse it when a BGP or static route is in the table but traffic does not flow, or uses an unexpected exit.
Reference · 1
What next?3 suggested next steps
Catalog command links1
Evidence0
On this pageJump to a specific section
Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

How to read the output

show ip route <next-hop>

Look first: route source/code, prefix, next hop, outgoing interface

Healthy: Expected prefix is installed with intended next hop/source.

Warning: Route absent, unexpected protocol/AD/metric, recursive next hop or wrong exit.

Does not prove: RIB presence does not prove FIB programming or packet delivery.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

3 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 First 30 seconds Verify boundary

Immediate answer: Resolve the recursive next hop until an attached adjacency is reached, then compare CEF with the selected RIB route.

Verification chain: route candidate → RIB selection → recursive next-hop chain → attached prefix → adjacency → rewrite → egress packet

Stop condition: A valid recursive RIB chain does not show the final adjacency is complete or that policy/NAT later permits the packet.

Step 2 Commands Verify boundary
show ip route 203.0.113.0
show ip route 192.0.2.1          ! route to the next hop
show ip cef 203.0.113.0 detail   ! resolved via ...
Step 3 Common mistakes Narrow the fault
  • Recursive static routes to next hops reachable only via the default route.
  • Next hop learned via the route itself (recursive loop).
Command lookup Jump straight to Cisco syntax
Key points

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.

Key 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> — inaccessible next hop.
  • show ip cef <next hop> — the adjacency at the end of the chain.
ReferenceWhat it is1 section · depth on demand

What it is

Recursive next-hop resolution occurs when a selected route points to an IP next hop that is not itself directly connected. The router must resolve that next hop through another route until a usable egress interface/adjacency is reached.

ReferenceWhy it matters1 section · depth on demand

How it works

A recursive route points to a next hop that is not directly connected (typical for static routes to a remote address and BGP). The router looks up the next hop in the routing table again until it reaches a connected interface. CEF pre-resolves this chain, so a packet needs one FIB lookup.

ReferenceImportant terms & boundaries2 sections · depth on demand

Key points

  • The destination route can be present while its recursive dependency is broken
  • Recursion must terminate in a directly usable forwarding path
  • Static routes, BGP NEXT_HOP and tunnels commonly expose recursive dependencies
  • Recursion in the wrong VRF/context is a separate failure point.

In depth

Worked recursion

ip route 203.0.113.0 255.255.255.0 192.0.2.1
! 192.0.2.1 is learned via OSPF through 10.1.12.2
R1# show ip cef 203.0.113.0
203.0.113.0/24
  nexthop 10.1.12.2 GigabitEthernet0/0/1
R1# show ip route 203.0.113.0
  * 192.0.2.1
      Route metric is 0, traffic share count is 1
R1# show ip route 192.0.2.1
  Known via "ospf 1", distance 110, metric 3
  * 10.1.12.2, from 10.255.0.2, via GigabitEthernet0/0/1

The RIB keeps the recursive next hop (192.0.2.1); CEF resolves it once and stores the final adjacency, so forwarding does not repeat the lookup for each packet.

BGP resolvability

RFC 4271 requires a BGP route to be considered only when its NEXT_HOP is resolvable through the routing table. On IOS the BGP table shows such a path without >; show ip bgp 203.0.113.0 reports (inaccessible) next to the next hop. Two classic causes:

CauseSymptomFix
eBGP next hop not advertised into iBGPiBGP peers see paths as inaccessibleneighbor x next-hop-self or carry the link in the IGP
Next hop resolves only via the default routePath is valid but follows the default — can loop on failureAvoid; on IOS XE, bgp nexthop route-map can reject default-route resolution

Static route options

FormBehaviour
ip route P M 192.0.2.1Recursive; follows whatever route reaches 192.0.2.1
ip route P M Gi0/0/1Interface only; on Ethernet relies on proxy ARP for every destination — avoid
ip route P M Gi0/0/1 10.1.12.2Fully specified; no recursion, removed when the interface goes down

A route cannot resolve through itself: if 192.0.2.1 becomes reachable only via 203.0.113.0/24, IOS withdraws the route as recursive. For GRE the equivalent condition produces %TUN-5-RECURDOWN.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docCisco IOS / IOS XE Current documentation reviewed 2026-09-14

Authoritative/upstream documentation reviewed for bounded claims in Routing → RIB / FIB / CEF → Recursive Next-Hop. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.cisco.com/c/en/us/support/ios-nx-os-software/ios-xe-17/series.html · confidence 94%
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
recursive routerecursive next hop
Embedded reference data

Quick lookup tables

Recursive next-hop flow

Resolve dependencies until a directly usable egress exists

StepExample evidence
Destination route203.0.113.0/24 via 192.0.2.2
Next-hop route192.0.2.2/32 via 10.0.12.2
Connected resolution10.0.12.0/30 is directly connected
CEFdestination resolves to Gi0/0 / 10.0.12.2
Adjacencyrewrite/ARP for 10.0.12.2 is usable
Confirmation

Confirm action

Continue?