I have a computer with 2 network interfaces. One interface is connected to LAN network with IP, and the other is connected to a recorder server ( is the gateway for the LAN. When I try to ping to, Windows first tries a route to the interface without network (; I want to add a route to specifing I want to use the interface when I try to ping I have tried:

route add mask if 13

Here is a print of my interfaces:

screenshot 1

When I add the static route to the table, it doesn't show the specified interface, only associate it to the gateway.

screenshot 2

Is it correct?

2 Answers 2


To specify the interface in windows route command, you are supposed to use 'IF'... Uppercase letters, not lowercase.

Also, where you are specifying you want to add a route to a single IP, you need to use a subnet mask of

The subnet mask of specifies a single host. A subnet mask of specifies 192.168.0.X where X=1-254

So, your command should be:

route add mask IF 13

Looking again at your question, the best solution for you may be to use your LAN side like a normal 192.168.0.X network... But for the recorder server, I would recommend specifying a different network: Recorder server IP of, and then your second network interface should be This will eliminate the need to manually configure routes, and may simplify everything for you.


This should work: 

route add mask

If you want persistence:

route -p add mask

Not sure what the "if" was for, but try this for cost:

route add mask metric 13
  • "if" was for interface, so "IF".
    – Qwerty
    May 28 at 11:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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