[ previous ] [ next ] [ threads ]
 From:  "Mike Maltese" <mike at pcmedx dot com>
 To:  "M0n0wall" <m0n0wall at lists dot m0n0 dot ch>
 Subject:  [m0n0wall] Re: Networking knowledge
 Date:  Mon, 8 Mar 2004 15:52:49 -0800
> You can see looking at this that the first 29 bits are turned on, so an
> address of can also be expressed more
> simply as
> The interesting side effect of all this is that you can take 32 and
> subtract the netmask bits to get the host bits.  In the above example,
> there are 3 host bits.  2 to the power of 3 is 8, meaning 8 host
> addresses.  It's really quite simple.  :)

Great explanations and examples. I just wanted to add something as a side

Remember that you automatically lose two addresses right off the top, plus
one for the default gateway. The first number, is the network
ID. You don't really lose this one because you never really had it to use,
but it is important nonetheless. Next, there is the broadcast address, which
is always the last possible address, in this example.
Finally, there must be a default gateway for the subnet. Although it doesn't
have to be, this is traditionally the first assignable address, which would
be in this case. While the default gateway is also a host, I
really don't consider it as usable when laying out a subnet. This leaves you
with a total of five usable host addresses for the subnet, through 6. This applies to any subnet regardless of it's size.
For example, a can have a maximum of 253 hosts plus the
default gateway. Keep this in mind when deciding on a network/mask pair. As
another example, I use for my home subnet because I may
need more than five but never more than 13 addresses.