IP network routing: restrict traffic on an interface

2

My PC has wired and wireless Ethernet. The wired port connects to a private network with no Internet access. the wireless port connects to a domain network with Internet access.

The problem is that the wired port has a lower metric so Windows tries to route traffic intended for the Internet through that port. How can I ensure that ONLY traffic for the private network goes through the wired interface, and everything else through wireless?

Phil J Pearson

Posted 2014-12-17T12:50:37.563

Reputation: 121

Answers

1

Set a route.

http://technet.microsoft.com/en-us/library/bb490991.aspx

Enter command line and write a route, probably somewhat like this:

route add 192.168.1.0 MASK 255.255.255.0 192.168.1.17

where the first ip is your private network and the last ip is the ip of your network card (can be looked up with ipconfig)

If you want a route that survives a reboot you need to add the -p option. If you want to remove the route again you use

route delete 192.168.1.0

if you want to look at all routes and their priorities, use

route print

You can route all traffic through 10.43.11.15 like this:

route add 0.0.0.0 MASK 0.0.0.0 10.43.11.15

And then you can use a metric argument to give tor route for local addresses higher priority (add a number at the end of the command line, see documentation route /?)

Peter

Posted 2014-12-17T12:50:37.563

Reputation: 4 199

Routing traffic to the private network is not a problem... it's routing all other traffic. How would this help? – Phil J Pearson – 2014-12-17T13:48:33.603

Make the wireless card the default route for everything else. Then this makes sure you still route your private network through the wired card. – Peter – 2014-12-17T13:51:53.940