The meaning of “On-link” in the IPv4 result of the “route print” command (Windows 7, 2008, Vista; via: Super User)
Posted by jpluimers on 2012/05/11
The “route print” command in Windows will show you some “On-link” entries in the gateway column. This is from Windows Vista and up. Before that, you would see “127.0.0.1”.
While creating Windows Vista and Windows Server 2008, Microsoft built a “Next Generation TCP/IP Stack” (Wikipedia link) that – apart from adding IPv6 – added many new features and performance improvements.
Since traffic routable through the local machine can have multiple IPv4 and IPv6 addresses, it is not called ” 127.0.0.1″ any more, but “On-link” as the answers to the windows 7 – What does “On-link” mean on the result of “rout print” command? on SuperUser nicely point out:
They are addresses that can be resolved locally. They don’t need a gateway because they dont need to be routed.
Yep, the other three answers are correct: it’s just a route thats directly reachable the NIC is in direct contact with it; on the same subnet. To explain a little further though: by contrast, the routes that have a gateway IP listed must be contacted through that gateway.
Note that sometimes the new TCP/IP stack needs some arm wrestling in order to have it do what you want (for instance to have it honour TCP metrics).
Note that the “default gateway” line is also missing, as it is in the 0.0.0.0 network destination.
A few examples of what route print shows:
Windows 7 IPv4 route table with some VMware networks:
IPv4 Route Table =========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.171.1 192.168.171.102 20 127.0.0.0 255.0.0.0 On-link 127.0.0.1 306 127.0.0.1 255.255.255.255 On-link 127.0.0.1 306 127.255.255.255 255.255.255.255 On-link 127.0.0.1 306 192.168.153.0 255.255.255.0 On-link 192.168.153.1 276 192.168.153.1 255.255.255.255 On-link 192.168.153.1 276 192.168.153.255 255.255.255.255 On-link 192.168.153.1 276 192.168.171.0 255.255.255.0 On-link 192.168.171.102 276 192.168.171.102 255.255.255.255 On-link 192.168.171.102 276 192.168.171.255 255.255.255.255 On-link 192.168.171.102 276 192.168.237.0 255.255.255.0 On-link 192.168.237.1 276 192.168.237.1 255.255.255.255 On-link 192.168.237.1 276 192.168.237.255 255.255.255.255 On-link 192.168.237.1 276 224.0.0.0 240.0.0.0 On-link 127.0.0.1 306 224.0.0.0 240.0.0.0 On-link 192.168.171.102 276 224.0.0.0 240.0.0.0 On-link 192.168.237.1 276 224.0.0.0 240.0.0.0 On-link 192.168.153.1 276 255.255.255.255 255.255.255.255 On-link 127.0.0.1 306 255.255.255.255 255.255.255.255 On-link 192.168.171.102 276 255.255.255.255 255.255.255.255 On-link 192.168.237.1 276 255.255.255.255 255.255.255.255 On-link 192.168.153.1 276 ===========================================================================
Windows XP route table with some other VMware networks:
=========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.171.1 192.168.171.161 10 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 192.168.114.0 255.255.255.0 192.168.114.1 192.168.114.1 20 192.168.114.1 255.255.255.255 127.0.0.1 127.0.0.1 20 192.168.114.255 255.255.255.255 192.168.114.1 192.168.114.1 20 192.168.145.0 255.255.255.0 192.168.145.1 192.168.145.1 20 192.168.145.1 255.255.255.255 127.0.0.1 127.0.0.1 20 192.168.145.255 255.255.255.255 192.168.145.1 192.168.145.1 20 192.168.171.0 255.255.255.0 192.168.171.161 192.168.171.161 10 192.168.171.161 255.255.255.255 127.0.0.1 127.0.0.1 10 192.168.171.255 255.255.255.255 192.168.171.161 192.168.171.161 10 224.0.0.0 240.0.0.0 192.168.114.1 192.168.114.1 20 224.0.0.0 240.0.0.0 192.168.145.1 192.168.145.1 20 224.0.0.0 240.0.0.0 192.168.171.161 192.168.171.161 10 255.255.255.255 255.255.255.255 192.168.114.1 192.168.114.1 1 255.255.255.255 255.255.255.255 192.168.145.1 192.168.145.1 1 255.255.255.255 255.255.255.255 192.168.145.1 6 1 255.255.255.255 255.255.255.255 192.168.171.161 192.168.171.161 1 Default Gateway: 192.168.171.1 ===========================================================================
and the same XP machine with two NICs to the outside world:
=========================================================================== Active Routes: Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.71.1 192.168.71.161 20 0.0.0.0 0.0.0.0 192.168.171.1 192.168.171.161 10 127.0.0.0 255.0.0.0 127.0.0.1 127.0.0.1 1 192.168.71.0 255.255.255.0 192.168.71.161 192.168.71.161 20 192.168.71.161 255.255.255.255 127.0.0.1 127.0.0.1 20 192.168.71.255 255.255.255.255 192.168.71.161 192.168.71.161 20 192.168.114.0 255.255.255.0 192.168.114.1 192.168.114.1 20 192.168.114.1 255.255.255.255 127.0.0.1 127.0.0.1 20 192.168.114.255 255.255.255.255 192.168.114.1 192.168.114.1 20 192.168.145.0 255.255.255.0 192.168.145.1 192.168.145.1 20 192.168.145.1 255.255.255.255 127.0.0.1 127.0.0.1 20 192.168.145.255 255.255.255.255 192.168.145.1 192.168.145.1 20 192.168.171.0 255.255.255.0 192.168.171.161 192.168.171.161 10 192.168.171.161 255.255.255.255 127.0.0.1 127.0.0.1 10 192.168.171.255 255.255.255.255 192.168.171.161 192.168.171.161 10 224.0.0.0 240.0.0.0 192.168.71.161 192.168.71.161 20 224.0.0.0 240.0.0.0 192.168.114.1 192.168.114.1 20 224.0.0.0 240.0.0.0 192.168.145.1 192.168.145.1 20 224.0.0.0 240.0.0.0 192.168.171.161 192.168.171.161 10 255.255.255.255 255.255.255.255 192.168.71.161 192.168.71.161 1 255.255.255.255 255.255.255.255 192.168.71.161 6 1 255.255.255.255 255.255.255.255 192.168.114.1 192.168.114.1 1 255.255.255.255 255.255.255.255 192.168.145.1 192.168.145.1 1 255.255.255.255 255.255.255.255 192.168.171.161 192.168.171.161 1 Default Gateway: 192.168.171.1 ===========================================================================
–jeroen
via: windows 7 – What does “On-link” mean on the result of “rout print” command? – Super User.
Leave a Reply