[comp.dcom.lans] Multiple netmasks

kurt@hi.UUCP (Kurt Zeilenga) (07/28/87)

Keywords:


At present, if you want to break up a network into
different size subnets there is really no way of doing it.
Hence, I would like to (re)start a discussion on ways of
implementing multiple masks for said purpose.

How does the system know wether a given address is an A, B,
or C Class address?  It looks at magic bits that are
hardcoded! It would be really nice to be able to
softcode some bits.  Hence, every network could have a
subnetmask.  The subnetmask is used to mask out n bits of
the IP address.  Those n bits are then used to lookup what
netmask to use.

Consider Host A:
/etc/ifconfig ie0 0xXXXXf001 subnetmask 0x0000c000 up
/etc/ifconfig ie1 0xXXXX0081 subnetmask 0x0000c000 up

and Host B:
/etc/ifconfig ie0 0xXXXXf002 subnetmask 0x0000c000 up
/etc/ifconfig ie1 0xXXXX8101 subnetmask 0x0000c000 up

and in /etc/subnets (or wherever) there are three fields.
Network, Subnet, Mask.  This so that if you have a
gateway between to different networks each doing subnetmasking.

0xXXXX0000	0x0000c000	0xfffff000
0xXXXX0000	0x00008000	0xffffff00
0xXXXX0000	0x00004000	0xffffff80
0xXXXX0000	0x00000000	0xffffffc0

Okay, say host A gets a packet off of ie1.  The packet
is for IP address 0xXXXX8102.  We mask the address with
the subnetmask and get 0x00008000, lookup the netmask and
get 0xffffff00.  Using it we figure out that we need to
send this to host 2 on network 0xXXXX8100.  We look in the
routing table and see that we ahve a rout to 0xXXXX8100 via
0xXXXXf002, we send the packet off.....
	
Of course there are problems with this idea, but it's a
start.  Any comments?

-- 
	Kurt Zeilenga	 (zeilenga@hc.dspo.gov)		I want my talk.flame!

	"Remember, Mommie, I'm off to get a commie..."

jqj@gvax.cs.cornell.edu (J Q Johnson) (07/29/87)

In article <12107@hi.UUCP> kurt@hi.UUCP (Kurt Zeilenga) proposes that
subnet routing be modified.  His proposal, slightly cleaned up, is
that:  When sending or forwarding to an IP address on a "local" subnetted
network (i.e. one for which the system has a directly connected interface),
the subnet mask should NOT be used directly to determine routing.  Instead,
it should be used to mask off a field of the destination IP address, then
that field should be used in a table lookup to determine the netmask to
use in examining the routing tables.

Thus, if net 128.84.0.0 is subnetted into 1 subnet with 16K hosts, 8
subnets with 4K hosts each, plus 1023 subnets with 255 hosts each,
the administrators of 128.84.0.0 could legislate that addresses
with the 2 highest bits of the third octet set to 0 would be
interpreted as 16 bits of net, 8 bits of subnet, and 8 bits of host,
while having both of those bits set would be interpreted as 2 bits of
subnet and 14 bits of host, and the rest would be interpreted as 4 bits
of subnet and 12 bits of host.  The table he proposes might have:

# subnet index mask is 0x0000c000
# network	index value	subnet mask
128.84.0.0	0x0000c000	0xffffc000
128.84.0.0	0x00008000	0xfffff000
128.84.0.0	0x00004000	0xfffff000
128.84.0.0	0x00000000	0xffffff00

It seems to me that this scheme would work, although at this point it
is unlikely ever to be adopted by the community as a standard.  The major
problems with it are (1) it is quite complex to administer [I spent 15
minutes constructing the above example, and am not confident I got it
right], and (2) it requires that every host that does routing know how
the network is broken into subnets (such hosts currently need to know
this information, but it consists of only a single number, the subnetmask).

Problem (2) is the serious one:  almost all host implementations would have
to be changed.  Given the problems we've had in getting vendors to support
the current subnetting scheme, it seems very unlikely that they would change
to support such a new scheme.

This raises the question of whether there is any less radical way to support
variable sized subnets, perhaps a solution that involves changing the code
only in gateways.  Anyone have any ideas?