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?


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.

| improve this answer | |
  • 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
  • 1
    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
  • @David Schwartz yes that was a typo. – user146172 Nov 20 '12 at 22:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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