I'm using Windows 7. When I type "route print" under command prompt, I get a IPv4 Route Table with several "On-link" values under the Gateway column. For example, like this one:
IPv4 Route Table
===========================================================================
Active Routes:
Network Destination Netmask Gateway Interface Metric 0.0.0.0 0.0.0.0 192.168.1.1 192.168.1.5 25 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 137.132.0.0 255.255.0.0 172.18.180.1 172.18.180.10 31 137.132.80.16 255.255.255.255 192.168.1.1 192.168.1.5 26 169.254.0.0 255.255.0.0 On-link 172.18.180.10 306 169.254.255.255 255.255.255.255 On-link 172.18.180.10 286 172.18.0.0 255.254.0.0 172.18.180.1 172.18.180.10 31 172.18.180.0 255.255.255.0 On-link 172.18.180.10 286 172.18.180.10 255.255.255.255 On-link 172.18.180.10 286 172.18.180.255 255.255.255.255 On-link 172.18.180.10 286 172.25.64.0 255.255.240.0 172.18.180.1 172.18.180.10 31 192.168.1.0 255.255.255.0 On-link 192.168.1.5 281 192.168.1.5 255.255.255.255 On-link 192.168.1.5 281 192.168.1.255 255.255.255.255 On-link 192.168.1.5 281 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 172.18.180.10 286 224.0.0.0 240.0.0.0 On-link 192.168.1.5 281 255.254.0.0 255.254.0.0 172.18.180.1 172.18.180.10 31 255.255.0.0 255.255.0.0 172.18.180.1 172.18.180.10 31 255.255.240.0 255.255.240.0 172.18.180.1 172.18.180.10 31 255.255.254.0 255.255.254.0 172.18.180.1 172.18.180.10 31 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 172.18.180.10 286 255.255.255.255 255.255.255.255 On-link 192.168.1.5 281 255.255.255.255 255.255.255.255 192.168.1.1 192.168.1.5 26
===========================================================================So what does "On-link" mean?
34 Answers
They are addresses that can be resolved locally. They don't need a gateway because they don't need to be routed.
1Yep, the other three answers are correct: it's just a route that's 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.
So, in the table you gave above, 192.168.1.255 is contacted by simply putting a packet on the network from 192.168.1.5, marked as going to 192.168.1.255. The destination machine would see the packet, and take it off the network directly.
But to reach 137.132.0.0, the packet would be sent out from 172.18.180.10, to the gateway 172.18.180.1, where the gateway would see that it's to be forwarded on to where it's going.
Note that I haven't bothered looking at the whole routing table to make sure there are no more specific routes overriding these, as it's a little beside the point for this issue.
2on-link is a vista thing and it means there is a direct connection meaning “directly reachable”. In general, such record will be generated after establishing a dial-up connection.
1Wild guess: Unrouted subnets that are handled locally.