Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On Windows 7 I have been using the command route add to add routing entries with a gateway. I now want to add a routing entry with no gateway, where the route is directly reachable.

Windows 7 calls such routes "on-link". I have tried creating on-link routes using the route add command and omitting the gateway entry, but that hasn't worked.

How can I create an on-link route in Windows 7?

share|improve this question
add comment

1 Answer 1

up vote 5 down vote accepted

You need to put 0.0.0.0 in the gateway entry to create an "on-link" route.

For example, enter the following command in cmd.exe or bash:

route add 10.10.10.100 mask 255.255.255.0 0.0.0.0

share|improve this answer
    
Please describe steps required to do it. –  gronostaj Jul 2 '13 at 14:46
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.