Is it possible to point a route to a next hop that isn't directly attached to my router?

For instance:

Router A owns the subnet
Router A and Router B communicate on the subnet
Router B and Router C communicate on the subnet

Router C has learned the subnet from Router B with Router B as a next hop

Can I put a route for the subnet on Router C and point it straight to Router A?

Is Router C smart enough to figure out that it would need to send to Router B to get to Router A? I know the normal practice is to tell Router C that Router B is the next hop for Router A's subnet.

2 Answers 2


That's called recursive next-hop lookup (or something along those lines) by most vendors. Most equipment will handle that just fine, but its not a particularly good practice to get into for static routing.

FWIW, iBGP typically works this way. The "next-hop" carried in an iBGP session is the next-hop on the far side of the autonomous system and some sort of IGP (typically OSPF, less commonly, IS-IS, RIP, or even static routing) is used to recursively resolve that iBGP next-hop to an immediate next-hop.

If you do too much of this, the gear is having to do more and more layers of recursion to find the real next-hop. I've never really tested any gear to see how many times it would recurse to find a real next-hop, but I wouldn't be surprised if the limit were 3 or 4.


The router has to know what interface to forward packets out of. If you try and specify a route to a network it doesn't know about and don't include a valid next-hop interface it will not enter that route into it's forwarding table.

You would need to introduce a routing protocol to make the router "smart" enough to know what do with that packet.

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.