I have a Windows Server 2003 VM with two NICs, one that is connected to a private VLAN and one that is connected to a public-facing VLAN. I have manually assigned addresses to both connections. How can I configure Windows such that only traffic addressed to the private subnet (say, 10.5.1.0/24) will route through the private VLAN, and all other traffic should route through the public one? I should mention that the private VLAN is connected to a router/firewall VM that is connected to the same public VLAN as the one Windows Server 2003 is connected to, but of course the two have two different manually configured IP's.
You would set the default gateway on the public NIC. This will make all traffic that you don't have a specific route defined for use it.
Then, you need to add a static route to the internal network. You can do this with a route command.
route add 10.5.1.0 mask 255.255.255.0 x.x.x.x if y -p
x.x.x.x is your gateway on the internal network and
y is the interface index of your internal NIC prefixed with
0x. You can find the index of each interface by running
route print. If it was interface 2, for example, you would substitute
y in the above example.
-p at the end makes it persistent, so that the route will remain across reboots. If you just want to test, you can make add the route without -p and it will go away on reboot if it causes issues.