Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

share|improve this question
    
What are the IP addresses of Router A and Router B? Are RouterA and router B the default GW for Networks behind them? –  Doon May 18 '12 at 17:42
    
Sorry I should have put that in. Every router port would be the .1 address for the network that it is connected to. So on router A, the port that is facing switch A1 would be 192.168.1.1. Therefore, computer A1 would have 192.168.1.1 set as its default gateway. –  jstevens13 May 18 '12 at 18:48
    
I assume those are just placeholder addresses, but just in case they aren't: you shouldn't be using 172.168.x.x on your internal network; that address space is on the public internet, owned by AOL. RFC1918 ranges (10/8, 172.16/12, 192.168/16) and addresses you own are the only addresses you should ever use. –  Shane Madden May 18 '12 at 20:14
    
Shane - Those are placeholder addresses - but thank you for the heads-up! –  jstevens13 May 18 '12 at 21:09
add comment

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer
    
To reply to your first assumption: yes the port or router A that is facing computer C would have an IP address of 192.168.4.1 and the port of router B that is facing computer C is 172.168.4.1. The routers are already setup to route between all 4 of their ports respectively. –  jstevens13 May 18 '12 at 18:52
    
I'm not sure I understand your second assumption though (and maybe this was just a type-o) but all subnets are /24 subnets. So to restate the second assumption. I need computer C on its 192.168.4.10 interface to be able to talk to computers on 192.168.1.0, 192.168.2.0, 192.168.3.0 networks as well as, on its 172.168.1.10 interface to be able to talk to computers on 172.168.1.0, 172.168.2.0, 172.168.3.0 networks. –  jstevens13 May 18 '12 at 18:58
    
i was just making sure that the routers could already talk both ways. The /23 is a covering route, just a more efficient way of saying 192.168.2.0/24 and 192.168.3.0/24 but you could easily just route them all by /24 (Sorry I am mostly a Network wonk, so always try to aggregate routes wherever possible). –  Doon May 19 '12 at 1:26
    
@jstevens13: Remember, it won't do much good for C to be able to reach a machine if those machines can't reach C too. So you'll need to add static routes on the default gateways of each network that needs tor each C. –  David Schwartz May 19 '12 at 4:38
    
@Doon I understand completely now. Thanks for the explanation and the answer! –  jstevens13 May 19 '12 at 12:27
show 3 more comments

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.