Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Feb 1996 14:15:17 -0700
From:      Nate Williams <nate@sri.MT.net>
To:        "Garrett A. Wollman" <wollman@lcs.mit.edu>
Cc:        Nate Williams <nate@sri.MT.net>, hackers@FreeBSD.org
Subject:   Re: Broadcast, Netmask, and other such information
Message-ID:  <199602152115.OAA01407@rocky.sri.MT.net>
In-Reply-To: <9602152054.AA13444@halloran-eldar.lcs.mit.edu>
References:  <199602152029.NAA01202@rocky.sri.MT.net> <9602152037.AA13188@halloran-eldar.lcs.mit.edu> <199602152048.NAA01295@rocky.sri.MT.net> <9602152054.AA13444@halloran-eldar.lcs.mit.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
> I had a brain fart.  It should be /27, not /227.  It's the number of
> one bits in the netmask.

3 * 8 + 3, okay.  (Using information from the other article you replied
to.)

> > So to determine the netmask, you need to know how many addresses are in
> > the subnet, and subtract that from 255.255.255.255, right?
> 
> Well, no.  You need to know how many addresses there are total, and
> subtract the log_2 of that from 32.

What's the different between 'how many addresses in the subnet' and 'how
many addresses there are total'.

Maybe I'm not making myself clear.  When I say 'addresses in the
subnet', I'm trying to convey a number which *should* be a power of 2 #.
In the above example, there are 32 addresses assigned in each subnet, of
which there are only 31 usable as host addresses (except in the first
and last subnets due to the .0 & .255 addresses being unusable).

This number should be subtracted from 255.255.255.255.

I'm trying to apply this in a generic sense, so if I have the network
address 128.18.0.0/16 address assigned to me, and I try to be funky and
not assign addresses on byte boundaries how I would calculate things.

Or, if I try to break things into 4x64 chunks given a 10.5.6/24 address
assigned to me.

(Using the calculation I used above would mean a subnet on the /24
address broken into 4 chunks would have a broadcast of 255.255.255.192,
right?)



Nate



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199602152115.OAA01407>