How do i calculate the correct network mask for a static route

  • Thread starter Thread starter steve
  • Start date Start date
S

steve

-------------------------------------
Problem (see configuration for description of what VM01 & GB01 network
elements are)

I need VM01 & GB01 to be able to communicate on both the 198.208.* and the
192.168.210.* networks. To do this i figured all i would need to do would
be to add a static route on either side of the machine, like so

GB01>route add 192.168.210.100 MASK 255.255.255.0 198.208.20.173

Which i thought would route any traffic destined for 192.168.210.* using
gateway 198.208.20.173 (VM01), which as it is dual honed would route the
traffic appropriately towards the 192.168.210.* network. Unfortunately this
gives me the error that the source & destination mask != destination. I have
tried many combinations of masks and have converted both the IP's to binary
and &'d them, but still i get the same error.!!!!

*) Am i doing something fundemantally wrong here, or must i have just
calculated the &'d address wrong.

*) Will i need to add a route back from the src machine .. something along
the lines of
GB01>route add 192.168.210.100 MASK 255.255.255.0 198.208.20.173
// route 192.168.210.100 traffic to VM01 (198.208.20.173)
VM01>route add 192.168.210.100 MASK 255.255.255.0 198.208.0.156
// route 192.168.210.100 traffic to GB01(198.208.20.156)


Configuration
-------------------------------------
I have two pc's both have 1 network card and each machine has 2 ip addresses
as detailed below

VM01 (2 ip addresses)
198.208.20.173
192.168.210.100
198.208.20.254 (gateway)

GB01 (2 ip addresses)
198.208.0.156
192.168.210.101
198.208.0.254 (gateway)

VM01 is able to ping 198.208.0.156 (therefore the gateway must be routing
this traffic at the 198.208.* network level)
GB01 is able to ping 198.208.20.173 (therefore the gateway must be routing
this traffic at the 198.208.* network level)

VM01 cannot ping 192.168.210.101 (the gateway cannot route the traffic as
it has no knowledge of it)
GB01 cannot ping 192.168.210.100 (the gateway cannot route the traffic as
it has no knowledge of it)

If i move VM01 to have ip address on the 198.208.0.* network with gateway
198.208.0.* all machines interconnect fine : ie i can ping across the
192.168.210.* networks. This totally avoids any routes, however as it is
not my network i am unable to do this.
 
Doh..

I think i have to do
route add 192.168.210.0 MASK 255.255.255.0 198.208.20.173 instead!!!
 
Back
Top