Like if host address is 18.104.22.168 and next hop address is 22.214.171.124 and destination ip address is also 126.96.36.199
Is this a valid use case? Any real life usage?
<dest ip> <next hop> ip route 188.8.131.52 255.255.255.255 184.108.40.206 weight 1 next-hop-vrf GlobalRouter
Above is the command on a router inside a VRF. 220.127.116.11 is pingable from host. 18.104.22.168 & 22.214.171.124 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 126.96.36.199 188.8.131.52 255.255.255.255 UGH 0 0 0 eth0 [root]# ip route show 184.108.40.206 via 220.127.116.11 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.