Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Like if host address is and next hop address is and destination ip address is also

Is this a valid use case? Any real life usage?

          <dest ip>                 <next hop>  
ip route weight 1 next-hop-vrf GlobalRouter

Above is the command on a router inside a VRF. is pingable from host. & are an ip address assigned to a VLAN on host & destination respectively.

On a linux box, Such configuration is valid.

[root]# netstat -r -n

Kernel IP routing table
Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface UGH       0 0          0 eth0

[root]# ip route show via dev eth0

As per my understanding, If a destination IP is reachable (i.e in the same subnet of host IP) we dont need a next hop.

I came across one application for using next hop for destination IP in same subnet (i.e for VPN) See this: Will packets send to the same subnet go through routers?

If next hop != destination IP but they are in same subnet as that of host, is a valid scenario for VPN, then i am wondering what are the applications of next_hop==dest_ip & subnet same as host?

This is my first post in Super User. Extremely happy with the quick and warm response.

share|improve this question

closed as off-topic by Dave, Ƭᴇcʜιᴇ007, Nifle, Tog, m4573r May 29 '14 at 10:03

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "This question is not about computer hardware or software, within the scope defined in the help center." – Dave, Ƭᴇcʜιᴇ007, Tog, m4573r
If this question can be reworded to fit the rules in the help center, please edit the question.

How on earth has this got 4 close votes? – barlop May 28 '14 at 12:43
I notice in my routing table, win7 on a comp with IP of there is a line that says- On-link 276 I am a bit rusty though. – barlop May 28 '14 at 12:44
Somebody asked about ARP and that was considered OK. Why not this question? – barlop May 28 '14 at 12:45
raj, in that last line, is that meant to be a command or is that meant to be output? i either way, better to provide a screenshot so we can see OS and column headings and what it looks like really – barlop May 28 '14 at 14:32
Thanks barlop for the response. Updated the question – Raj May 28 '14 at 17:57

I don't know what ip command you're using, but the next hop can of course be the destination. This is what always happens at the last hop.

If you want a closer example, you can often configure your router by going to its IP (like In this case the next hop is the destination and there is only a single hop.

share|improve this answer
I think what he is getting at, is that philosophically, when you're at the destination, there is no 'next hop' because it's not hopping on to another router. But, in networking, if there is a next hop at the destination that lists itself, then Why? I suppose perhaps the answer is that there it is listed as next hop and does indicate it reached the destination. But philosophically it could have sone code that just says Accept and don't route. That is essentially what it is doing. – barlop May 28 '14 at 12:47
The next hop is not at the destination itself. The device which has a next hop in his question is, which has a route to telling it to send the packet directly to, because is on the same link so reachable in a single hop. – user2313067 May 28 '14 at 12:50
At the end of his question he gives another example - the example of "ip route" So in that example he gave there, the next hop is to the same device(computery "router) that the packet just came "in" on. That packet is not going to go anywhere else other than that device. So the destination is the next hop, in that example. – barlop May 28 '14 at 13:02
When I try his command, it gives me Command "" is unknown, try "ip route help"., so I don't really know what his command means. I took it to mean route via (so on-link). Since the computer/router the command is run on is as far as I understand, the destination is not the sender itself but another machine on the same link, I do not see a problem. – user2313067 May 28 '14 at 13:22
well what would you make of this output That is done on a computer with IP and an entry in its routing table has IP in the far left part("incoming"? part), and on the on the far right (next hop part?) (dest=next hop=device its on) – barlop May 28 '14 at 13:47

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