Windows 2 NICs 2 Networks – Routing Issue

routingwindows-server-2008

I have a Windows Server Box with 2 NICs sitting in 2 Networks with a Gateway Router to a 3rd:
e.g.:

A: 10.1.1.0/24 - Remote Network
B: 172.1.1.0/24 - "DMZ" with GW Router to Network A on IP 172.1.1.1
C: 192.168.1.0/24 - Local LAN - Default Gateway 182.168.1.1

NIC1 is in Network B: 172.1.1.5
NIC2 is in Network C: 192.168.1.5 - gets settings via DHCP

I want to have access to/from network A.
When I set the default gateway on NIC1 to 172.1.1.1 I can reach network A, but a config with 2 different default gateways is considered problematic/broken.

How to best solve this?

My first intuition was to set a route to network A via the router on network B:

route add 10.1.1.0 mask 255.255.255.0 172.1.1.1

Problems:

  • The route gets ignored. The command answers with OK!, a subsequent 'route print' does not list that route

Best Answer

You can't have two default gateways because it's an oxymoron. Another phrase for Default Gateway would be "Gateway of Last Resort", and two things can't be last.

It may help you visualise this if you remember that Windows routing (And that includes your default gateway(s)) is a global setting for all NICs, IP's and interfaces.

You may need to add the metric and interface option to the command. Please try with those options and then post the results of route print here if that doesn't help. Additionally, if you want this setting to persist across reboots, you will need to add -p after route:

ROUTE -P ADD 10.1.1.0 MASK 255.255.255.0 172.1.1.1 METRIC 1 IF B