Thursday, September 27, 2007

Adding static routes on windows

If a Windows machine has 2 network cards on it, each on a separate network, 1 or more static routes is necessary to tell windows the correct network to use for a given packet.  On Windows XP static routes can be added with the route ADD command.


So if NIC1 was on the with a gateway of and NIC2 was on with a gateway of 2 static routes would be needed:


route ADD MASK -p

route ADD MASK -p


The -p makes the routes persistent (e.g., will survive reboots).  This will direct any traffic destined for 192.168.1.* through NIC1 and traffic destined for 192.168.10.* through NIC2.


Without the static route windows will probably choose to send all traffic out the NIC with the highest (or lowest) MAC address.


No comments :

Post a Comment