4

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

https://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

4
  • 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, 2012 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, 2012 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. May 18, 2012 at 20:14
  • Shane - Those are placeholder addresses - but thank you for the heads-up!
    – jstevens13
    May 18, 2012 at 21:09

2 Answers 2

2

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.

8
  • 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, 2012 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, 2012 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, 2012 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. May 19, 2012 at 4:38
  • @Doon I understand completely now. Thanks for the explanation and the answer!
    – jstevens13
    May 19, 2012 at 12:27
1

A /23 would leave out the 192.168.3.0 network.

A /23 will not include the 192.168.3.0/24

You need to configure the route using 192.168.0.0/22 to include all three.
So:

Route -p add 192.168.0.0 MASK 255.255.252.0 192.168.4.1

Or separate :

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.255.0 192.168.4.1
Route -p add 192.168.3.0 MASK 255.255.255.0 192.168.4.1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .