background image
IP Addressing and Subnetting 261
Step 3
Write down two octets (in the case of Class A) or one octet (in the
case of Class B) of 0 after the one-octet space left in Step 2,
leaving a number with three octets written and an open space in
the subnet part of the number.
Step 4
Write down a 1 in the open octet.
Step 5
Repeat Steps 1 through 4, but in Step 4 add 1 to the number.
Continue repeating these steps until you reach 254.
A similar algorithm is used when a Class A network is subnetted, using mask 255.255.255.0,
although that is not shown here.
The number of valid subnets is an important concept when deriving the actual subnet numbers.
How many should you expect to find? The formula is very straightforward, with a few twists on
the real answer. First, the formula:
2
number-of-subnet-bits
The previous example in Figure 5-23 provides a good context in which to consider the
formula. A Class B network 150.150.0.0 is used, so there are 16 network bits. The mask is
255.255.255.0, so there are 8 host bits. That leaves 8 subnet bits--2
8
=
256, for 256 subnets.
From the previous example, 150.150.0.0 is the first subnet, and 150.150.255.0 was the last,
which is consistent with the formula.
Two previously reserved cases, 150.150.0.0 and 150.150.255.0, were not used in the example.
The first of these, which is called the zero subnet because the subnet value is all binary 0s, is
usable only if the ip subnet-zero global command is configured. The other subnet, called the
broadcast subnet because it looks like a typical broadcast address, is usable without any special
configuration.
NOTE
Do not confuse the zero subnet and broadcast subnet with the two reserved IP addresses in each
subnet. There are still two reserved addresses in each subnet that cannot be assigned to any
interface as an IP address. Those two numbers are the numbers used for the subnet number itself
and the broadcast address for the subnet.
Binary Algorithm for Deriving the Valid Subnets with Basic and Difficult
Subnetting
This section details a binary algorithm you can use to derive the subnet numbers. With basic
subnetting, you probably would not want to go through this much trouble. However, with
ch05.fm Page 261 Monday, March 20, 2000 5:06 PM