Static Routes on Windows – Setting Up with Two NICs

local-area-networknetworkingstatic-routeswindows

I asked this on another site recently, but I figured this might be a good place to ask this as well:

Please take a look at the diagram below. My question is in regards to computer "C" in the middle of the diagram. It has three NIC cards. It needs to be able to talk to computers A1, A2, A3, B1, B2, and B3. To do that, I will need to put static routes into computer C's route table. My question is what are the exact static route entries that I need to put into the route table to achieve this? In other words, what does "route print" look like after I have entered the static routes?

This would be on Windows 7 or Windows XP

http://i.stack.imgur.com/L2Kby.jpg

Edit: I should say I've done quite a bit of research on this, but I'm still a little shaky on the exact entries to achieve this.
This link from Microsoft is helpful with examples – but it is not totally clicking for me

Best Answer

A quick stab with the following assumptions:

Router A has IP address: 192.168.4.1, and has correct routes/or its default pointing to 192.168.4.10
Router B has IP address: 172.168.4.1, and has correct routes/or its default pointing to 172.168.4.10    

You need to route 192.168.1.0/24 and 192.168.2.0/23 to 192.168.4.1 You need to route 172.168.1.0/24 and 172.168.2.0/23 to 172.168.4.1

so

  route -p add 192.168.1.0 MASK 255.255.255.0  192.168.4.1
  route -p add 192.168.2.0 MASK 255.255.254.0  192.168.4.1 
  route -p add 172.168.1.0 MASK 255.255.255.0  172.168.4.1 
  route -p add 172.168.2.0 MASK 255.255.254.0  172.168.4.1 

The -p will make them persistent across reboots.

Related Topic