1

I'm not sure how ip nexthop is used to affect the route taken by packets and its relationship with ip route and the nexthop parameter of ip route. Is there a standard way this is used within industry, and if so what is the associated reference?

2 Answers 2

2

It doesn't affect the route; its purpose is more akin to database normalization – instead of storing the nexthop (gateway) information for each and every route, it's deduplicated and stored only once in a separate object that all routes can reference.

  • The work on this feature appears to have been part of the effort to allow using IPv6 addresses as the gateway for an IPv4 route. Previously, an IPv4 route entry could only store and IPv4 gateway address.

  • A routing table can have thousands of entries, many of which share the same 'gateway' field – think a datacenter connected to 2-3 carriers – and having this information duplicated within each route can require significant time whenever a link goes down and the 200k routes have to be switched from one carrier to another. With nexthop objects, in theory, all those routes can have just a pointer to an entry in the nexthop table instead, so that the routing daemon only needs to update it once.

1

The nexthop list provides for graceful fail-over if a device in a network is unavailable. Geek for Geeks states, "The next-hop list provides redundancy for next-hop devices by redirecting traffic to a backup next-hop device in the event of a failure."

If Device A normally forwards packets to Device B, and Device B then to Device C, should Device B become unreachable, Device A then would try to connect to Device C.

There can be up to four devices in the list.

See also Aruba Networking and Linux man pages for more information.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .