Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a windows 7 client with a wired ethernet NIC and a wireless 802.11g NIC.

The wired ethernet NIC is connected to a network switch and has subnet 192.168.0.*.

The wireless NIC is connected to a network switch and has subnet 192.168.1.*.

I also can start a VPN which accesses a network which also has subnet 192.168.0.*.

I have a linux system attached to the ethernet switch with an IP address in the 192.168.0.* range. When the VPN is connected, I can't access the linux system any more because, unsurprisingly, the packets are routed through the VPN instead of the ethernet switch.

Is there anything I can do on the W7 box to route just this single IP address corresponding to the linux box through the ethernet switch, leaving all the other 192.168.0.* addresses to be routed via the VPN?

share|improve this question
up vote 1 down vote accepted

You should be able to add a route to the Windows machine using the route command. Simply add the address as a /32 route, making it exit via the proper NIC.


route add mask if 11 metric 1

In this case "11" is an interface number, and takes place of the gateway parameter because there is none.

share|improve this answer
Thanks. Will give this a try and report back! – user146172 Nov 19 '12 at 20:12
I'm having a bit of trouble here. The command I'm trying is route add mask if 11 metric 1 - this doesn't work because I'm missing a gateway parameter. But the ethernet NIC is just connected to a switch and there isn't a gateway. What should I use as the gateway parameter? – user146172 Nov 19 '12 at 21:11
Thanks for the answer edit! I was wondering what "no gateway" could be. All 0s makes sense! – gparent Nov 19 '12 at 21:31
@user146172 266? That can't be right. – David Schwartz Nov 19 '12 at 23:57
If you check edit history, you'll notice he had it right there. – gparent Nov 20 '12 at 1:45

Your Answer


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.