Jun 16, 2012
tom

Windows routes local connections

Question

I have several network cards but for know I need to route all remote connections to one of them. So I added the following route:

route add 0.0.0.0 mask 0.0.0.0 192.168.101.1 metric 1 (where 192.168.101.1 is a default gateway of required network card)

But now local connections to locahost do not work. How can I keep them working?

Asked by Idsa

Answer

If you want your default route to be a specific NIC, this is accomplished through your Network Connections > Advanced > Advanced Settings… > Adapters and Bindings tab > Connections window (I’m currently on Vista, but is the same area for all OS). You can change the order in which Windows will use the NICs. Just move the NIC you want to the top of the list and that should take care of the default route (as long as you don’t have any specific routes that would supersede the NIC order).

You could also add specific route as you have done and possibly adjust the metric if there are conflicting routes as Hyppy stated, but you’d also need the -p switch to make the route persistent across reboots. If you use the first method, you shouldn’t need to add any routes at all.

Answered by August

Related posts:

  1. How to make routes on a windows 7 laptop persistent?
  2. Static Routes on Windows – Computer with two NICs connected to two routed networks
  3. Windows static routes w/o specifying gateway (next hop)
  4. Which route when there are two physical connections?
  5. Windows Server 2003 with Two NICs, one WAN and one LAN

Leave a comment