routing with uneven netmask

routing with uneven netmask

Post by <br.. » Wed, 31 Dec 1997 04:00:00



hi all. i have a little routing problem/question

consider the following setup:

at our organization we have 32 class C subnets ranging from
193.222.[192 .. 223].0 -- the subnets are each connected via
routers. i'm sitting on subnet 193.222.207.0 with two
gateways, one to the internet and an internal gw to the
intranet. a friend set up his machine adding routing entries
for each subnet 193.222.[192 .. 223].0, looking something like


Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
193.222.207.0   *               255.255.255.0   U     0      0       16 eth0
193.222.192.0   193.222.207.1   255.255.255.0   UG    0      0        7 eth0
193.222.193.0   193.222.207.1   255.255.255.0   UG    0      0        7 eth0
193.222.194.0   193.222.207.1   255.255.255.0   UG    0      0        7 eth0
193.222.195.0   193.222.207.1   255.255.255.0   UG    0      0        7 eth0
193.222.196.0   193.222.207.1   255.255.255.0   UG    0      0        7 eth0
193.222.197.0   193.222.207.1   255.255.255.0   UG    0      0        7 eth0
...
193.222.223.0   193.222.207.1   255.255.255.0   UG    0      0        8 eth0

etc, you get the picture

i took a look and decided that, since the network part of the IP range
is 19 bit (high first) and the host part 13 bit can't i use the netmask
255.255.224.0 for one single routing entry:

193.222.207.0   *               255.255.255.0   U     0      0       16 eth0
193.222.192.0   193.222.207.1   255.255.224.0   UG    0      0        4 eth0

would make life alot easier i guess. but i'm not sure about what happens
since now the 207 network is in the table twice -- and do broadcasts
go to all subnets then?

i'm still learning and highly interested in such kind of stuff.
my question also is rather academic, since the internal gateways
all do RIP and i'll set up a routed in the near future.

thanks
wolfi

--
If it ain't worth dying for it ain't worth living with