**February 16, 2009 **

By Jeff Ratchford, CCNA, CCNP, CCVP, CCSI# 21763

For a pdf of this article: **Classful Subnetting**

If there is a secret to the Cisco CCNA test, it is the ability to subnet quickly and accurately. In this article I will discuss classful

subnetting. Once a person has a good grasp on this process, the other components of subnetting become much easier.

Consider classful subnetting to be a six step process:

1. Convert the required number of subnets to binary and count the number of binary bit positions needed to represent the

number.

2. Append the number of bit positions obtained from step 1 to the given mask and then express the new mask in dotted

decimal notation.

3. Verify there are enough host bits left for the required hosts. We use the formula (2^x)-2, where x is the number of

remaining host bits in the new mask (the zeroes).

4. Calculate any growth available in network IDs. We use the formula (2^x), where x is the number of added mask bits. This

is the value calculated from step 1.

5. List the first few network IDs that result. To perform this step, remember the phrase, ‘the first network ID is the decimal

value of the low-order mask bit’. This is actually the block size of the mask and is also the first available subnet that is

available if subnet-zero is disabled. If subnet zero is enabled (it is by default) then the very first subnet is this ‘first network

ID’ minus this block size.

6. List the first and last host on one or two of the network IDs. To get the first host IP address we simply add one to the

network ID. The last host address on a subnet will always be two less than the next subnet. The broadcast address for a

subnet is always one less than the next subnet.

Let’s work through an example. We are given a class B network of 191.168.0.0/16. We decide we need to subnet this into at least

100 subnets, each having at least 100 hosts.

When we do step one, we see that we need seven significant bits to represent the decimal value of 100 (1100100).

Appending these seven bits to the given 16 bit mask gives us a new mask of 23 bits (255.255.254.0)

The new mask has 9 remaining host bits (the zeroes of the mask), giving us 510 possible hosts per subnet (2^9)-2.

Step four gives us 2^7=128 possible subnets. We assume that subnet-zero is allowed, therefore we do not need to subtract any

unusable subnets (the all zeroes and the all ones subnet).

In step 5 we list the first available subnets. The new mask in the third octet has the following bit pattern: 11111110. We know from

our binary math studies that the associated decimal value of each of these bits is: 128 64 32 16 8 4 2 1. Looking at the phrase

‘decimal value of low-order mask bit’ we see the decimal value is 2 in the third octet. This is also our block size. Based upon the

given of 191.168.0.0, our first available subnet is 191.168.2.0 if subnet zero is off. With subnet zero on we subtract the block size

of 2 in the third octet and we get 191.168.0.0 as the first available subnet (subnet-zero) and the second subnet is 191.168.2.0.

Each successive subnet is always a multiple of our block size. To get the tenth network after the ‘block size’ network we multiply

10 by the block size of 2 and get 191.168.20.0

Looking at subnet 191.168.0.0/23 we see that the first host IP is 192.168.0.1. Based upon the next subnet of 191.168.2.0, the

broadcast address of the 191.168.0.0 subnet is 192.168.1.255, which is the last available address before you reach the next

subnet of 191.168.2.0. The last available host IP on the 192.168.0.0 subnet is 191.168.1.254, which is two less than the next

available network id of 191.168.2.0.

CCBOOTCAMP

375 N. Stephanie Street, Bldg 21 Suite 2111 Henderson, NV 89014

Website: www.ccbootcamp.com Phone: 877.654.2243

For questions or comments about this article please email sales@ccbootcamp.com