Comments on Subnetting
In IS 450 we spend some time on subnetting, and everyone should be
comfortable with the idea of breaking an IPv4 address into 3
portions: network number, subnet number, and host number. Here's
an example class B network with 6b set aside for the subnet number
(borrowed from RFC 950 and
modified):
3 2 1
1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0 9 8 7 6 5 4 3 2 1 0
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Network | Subnet | Host Number |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Here we can see 16b of network number, 6b of subnet, and 10b of
host number.
- With 16b set aside for the network number, we could have
216 different class B networks.
- With 6b set aside for the subnet number, we could have
26=64 different subnets.
- With 10b set aside for the host number, there are
210=1024 IP addresses per subnet.
Note that for the 10b host number, I said 210 IP
addresses, rather than 210 hosts. This is because one
of those addresses, all ones, is broadcast on that subnet, and
another, all zeroes, is used as a subnet identifier. So we would
expect at most 210-2 interfaces on such a subnet.
Historical note:
There are old web pages out
there, and web pages using old information. In particular RFC 950 (August
1985) says that the number of usable subnets, with n bits set
aside in the subnet portion of an IP address, is
2n-2. This wastes a lot of IP addresses, especially on
networks with large subnets. By RFC 1878
(December 1995) this waste was recognized, and 2n was
used. It is possible, however, that one could encounter an older
device which is in compliance with the older standard, but not the
newer.
I continue to recommend the Microsoft TCP/IP Fundamentals for
Microsoft Windows, Chapter
4 - Subnetting as a gentle introduction
to subnetting which appears to be up-to-date and has no mistakes
that I've noticed. Also, see the "Subnetting Confusion" page
from an MCSE site.
From here one can go
- Up to Martens' IS 450 and Networking Page
- To Martens' Course Page
- To Martens' home page
- To the UMBC IS Dept
- To UMBC
, Jeff Martens