[comp.protocols.tcp-ip] I need help with subnetting

kellen@UV4.EGLIN.AF.MIL ("Dan Kellen") (06/07/90)

   I need some routing/subnetting help.

   We have a class B network.  We are not doing subnetting, but have been
   assigning addresses as if we were; each building has a unique third octet.
   The buildings are tied together with ethernet bridges, not IP routers.

   We have a department that has just aquired several SUN's and want's to
   use one as a gateway to the others.  I gave them IP addresses with a new
   third octet for all of there machines, and an address with the third
   octet of the building they are in, for the second interface on the 
   gateway machine.

   Now comes the problem.  The SUN gateway doesn't gateway!  I can get to 
   the gateway from the main network, but not to/from the other SUN's.

   Since I'm not doing subnetting, the SUN's two interfaces have different 
   IP addresses, the same netmask, but are on two different Ethernet's.  

   I then changed the netmask of the interface to the other SUN's to mask 
   the third octet.  Now the SUN's can talk.  But, the SUN's IP interface 
   to the rest of the network doesn't work.  

   What am doing wrong?


   How about a picture:


        network: 129.61.2.0                network: 129.61.9.0
        netmask: 255.255.0.0               netmask: 255.255.255.0


                                                       +-----+
                                                       |     |
                    /\                           +-----| SUN |
                    |                            |     |     |
                    |             +-----+        |     +-----+
                    |      129.61 |     | 129.61 |
                    |-------------| SUN |--------+
                    |        2.40 |     | 9.2    |
                    |             +-----+        |     +-----+
                    |                            |     |     |
                    |                            +-----| SUN |
                    \/                                 |     |
                                                       +-----+

   Any help appriciated.
   Dan
   kellen@uv4.eglin.af.mil

AFDDN.JONSON@GUNTER-ADAM.AF.MIL (Matt Jonson) (06/09/90)

   Dan-

   First let me say a few things about your current problem and then talk
   about your future with respect to subnetting.  Chances are that the reason
   your sun isn't gatewaying is simply because your routes and your ifconfigs
   aren't set up right.

   Using your diagram, the suns behind the gateway must have (x being their
   host number):
	 route add 129.61.9.0 129.61.9.x 0
	 route add default 129.61.9.2 1
   That will insure that their packets get to the outside world.  However,
   the outside world won't know how to get to them unless each one of those
   machines (unless you use proxy arp) has:
	 route add 129.61.9.0 129.61.2.40 1

   Your gateway sun should have these commands performed somewhere during
   start-up:
	 route add 129.61.9.0 129.61.9.2 0
       * route add default 129.61.2.40 0
	 (I'll get back to the asterix later)
   That gateway sun should have a netmask of 255.255.255.0 on BOTH ethernet
   interfaces.  Welcome to subnetting.

   The preceding was written on the assumption that you have a class B
   network just kind of floating in space with no other gateways to anywhere.
   This will not work if there are any other gateways to other things
   on your ethernet.  If, for instance you have a gateway to milnet on this
   ethernet, you should configure it as the default route and the * route
   command from above becomes:
	 route add 129.61.0.0 129.61.2.40 0
	 route add default 129.61.x.y 1
	 route add othernet gateway 1
   At this point you will also need to add routes for every other different
   third octet address on your class B.  It's a pain -- your other option is
   to pick an arbitrary third octet to rehome everyone on or a higher subnet
   to mask off of.

   When this network grows, and gateways start appearing, this kind of
   addressing scheme will get extremely unwieldy.  You will have to do some
   subnetting to streamline things.  You should probably take a good look at
   where you see this net going in the future and think about who will and
   who will not be needing the capabilities of subnets.  Right now you really
   only have a class B ethernet, and except for this one hitch, that is still
   what you have.  If you don't subnet, you will have to make sure that every
   host on the net has a route to every other important gateway.
   But of course there's always proxy arp...

   You should probably try to migrate toward this kind of subnetting:

			     129.61.A.*
     host|net B --  129.61 __________________
	 |-----|GW|--------|   Subnet A     |                  +---SUN
     host|      --   A.a   |   main net     | 129.61 |---|129.61
			   |                |--------|SUN|-----| net C
			   |                |  A.x   |---| C.y |
	 |net D --  129.61 |                |                  +---SUN
	 |-----|GW|--------|                |
	 |      --   A.b   +----------------+

   In this scheme, your gateways will be the only things that have to know
   how to reach the other nets.  Your hosts will just have to know who their
   gateway is.  It is clearly superior to having to update everyones tables
   every time there is a change in the future.

   I noticed you were an Air Force user, so I figured we should get back to
   you.  We'd be happy to help you out with your (potential) subnetting
   problems.  That's one of our functions as the AF DDN PMO.  Please get back
   to us with the details of your net (who connected to, gateways, third
   octet numbers assigned...)

   Right now you are actually subnetting with all 8 bits of the third octet.
   That gives you 254 potential subnets.  You may only need to use the first
   three, four or five bits which will give you 8, 16 or 32 nets...

   POCs are Lt Matt Jonson, Darrel Beach, Capt Brad Wright.  AV: 446-4075


   Matt Jonson
   Network Systems Engineer
   afddn.jonson@gunter-adam.af.mil
   (205) 279-4075





-------