Information Technology Reference
In-Depth Information
By using the entire third byte of a Class B address as the subnet address, it is easy to set
and determine the subnet address. For example, if Widget Inc. wants to have a subnet 6, the
third byte of all machines on that subnet will be 0000 0110 (decimal 6 in binary).
Using the entire third byte of a Class B network address for the subnet allows for a fair
number of available subnet addresses. One byte dedicated to the subnet provides eight bit
positions. Each position can be either a 1 or a 0, so the calculation is 2 8 , or 256. Thus,
Widget Inc. can have up to 256 total subnetworks, each with up to 254 hosts.
Although RFC 950 prohibits the use of binary all 0s and all 1s as subnet addresses,
today almost all products actually permit this usage. Microsoft's TCP/IP stack allows it, as
does the software in most routers (provided you enable this feature, which sometimes is not
the case by default). This gives you two additional subnets. However, you should not use a
subnet of 0 (all 0s) unless all the software on your network recognizes this convention.
How to Calculate the Number of Subnets
The formulas for calculating the maximum number of subnets and the maximum number
of hosts per subnet are as follows:
2 × number of masked bits in subnet mask = maximum number of subnets
2 × number of unmasked bits in subnet mask - 2 = maximum number of
hosts per subnet
In the formulas, masked refers to bit positions of 1, and unmasked refers to bit positions
of 0. The downside to using an entire byte of a node address as your subnet address is that
you reduce the possible number of node addresses on each subnet. As explained earlier,
without a subnet, a Class B address has 65,534 unique combinations of 1s and 0s that can
be used for node addresses. The question then is why would you ever want 65,534 hosts on
a single physical network?
The trade-off is acceptable to most who ask themselves this question. If you use an entire
byte of the node address for a subnet, you then have only 1 byte for the host addresses,
leaving only 254 possible host addresses. If any of your subnets are populated with more
than 254 machines, you'll have a problem. To solve it, you would then need to shorten the
subnet mask, thereby lengthening the number of host bits and increasing the number of
host addresses. This gives you more available host addresses on each subnet. A side effect of
this solution is that it shrinks the number of possible subnets.
Figure 8.10 shows an example of using a smaller subnet address. A company called
Acme Inc. expects to need a maximum of 14 subnets. In this case, Acme does not need
to take an entire byte from the host address for the subnet address. To get its 14 different
subnet addresses, it needs to snatch only 4 bits from the host address (2 4 = 16). The host
portion of the address has 12 usable bits remaining (2 12 - 2 = 4094). Each of Acme's 16
subnets could then potentially have a total of 4,094 host addresses, and 4,094 machines on
each subnet should be plenty.
Search WWH ::




Custom Search