IP Subnetting and Variable Length Subnet Masks (VLSMs)
Subnetting Class C Addresses
There are many different ways to subnet a network. The right way is the way that works best for you. First I’ll show you how to use the binary method, and then we’ll look at an easier way to do the same thing.
In a Class C address, only 8 bits are available for defining the hosts. Remember that subnet bits start at the left and go to the right, without skipping bits. This means that the only Class C subnet masks can be the following:
/25 /26 /27 /28 /29 /30
We can’t use a /31 or /32 because we have to have at least 2 host bits for assigning IP addresses to hosts. In the past, I never discussed the /25 in a Class C network. Cisco always had been concerned with having at least 2 subnet bits, but now, because of the ip subnet-zero command, we can use just 1 subnet bit.
In the following sections we are going to look at the binary way of subnetting, then move into the new, improved, easy to understand and implement, subnetting method.
The Binary Method: Subnetting a Class C Address
In this section, I’m going to teach you how to subnet a Class C address using the binary method. I’ll start by using the second subnet mask available with a Class C address, which borrows 2 bits for subnetting. For this example, I’ll be using 255.255.255.192.
192 = 11000000
The 1s represent the subnet bits, and the 0s represent the host bits available in each subnet. 192 provides 2 bits for subnetting and 6 bits for defining the hosts in each subnet.
What are the subnets? Since we now use ip subnet-zero, we can get four subnets, instead of the two that were available without the ip subnet-zero command.
00000000 = 0 (all host bits off) 01000000 = 64 (all host bits off) 10000000 = 128 (all host bits off) 11000000 = 192 (all host bits off)