Classful Subnetting – CompTIA Network+ N10-009 – 1.7

We’ve designed IPv4 to support nearly any network size. In this video, you’ll learn the fundamentals of IPv4 subnetting and how network classes are used as a starting point for IP subnetting.


When you start working with IP version 4, one of the things you’ll hear about are classes of IP addresses. And in casual conversation, we might even refer to an address as a class A address, a class B address, or a class C address. This was a method of describing an IP address as it related to its subnet mask.

Anything that is a class A address has eight bits assigned for the network address and 24 bits that are associated with the host address. This means that the subnet mask for a class A address would be 255.0.0.0. A class B address default subnet mask is 255.255.0.0. And the default subnet mask for a class C address is 255.255.255.0.

This style of class-based subnetting is one that we have not used since 1993. But we still refer to some of these addresses in a very colloquial sense. And although you may hear someone refer to an address as a class A address or a class C address, in reality, we no longer use a class-based form of subnet masking.

So if we don’t use classes, why are we doing a video on class-based networking? That’s because these classes do act as a starting point when we begin any type of subnetting on our networks. If you’re going to subnet a network, it’s important to know where to begin the subnetting process. And this class-based system is the starting point.

These class A, class B, and class C addresses have an obvious demarcation between the network part of the address and the host part of the address. With class A, that line is drawn after the first eight. Bits in a class B address, that line is after the first 16 bits. And in a class C address, that line is after the first 24 bits.

Here’s a table that defines the different subnet classes for class A, class B, class C, class D, and the reserved class E. And you can see, if you look on the right side, the default subnet masks are the ones we just saw, where class A has a default mask of 255.0.0.0. Class B is 255.255.0.0. And class C is 255.255.255.0.

The way that you can look at an IP address and tell immediately what class that IP address is associated with is the very first octet of the address. If the decimal octet is between 0 and 127 as the first number of that IP address, it’s a class A address. If the first number of the IP address is between 128 and 191, that’s a class B address. And if the first number is between 192 and 223, that is a class C address.

If you were to look at that address in binary, if the first bit was 0, it’s a class A address. If the first bits are 1, 0, it’s a class B address. And if the first three bits are 1,1,0, it’s a class C address.

Class D addresses are used for multicast communication. And therefore, they are not assigned to an individual device. But there is a range for class D addresses, and that is between 224 and 239. Or the first four bits of a class D address are 1,1,1,0.

And there is a range of IP addresses that are not used for any purpose. This is a reserved range. We refer to this as the class E range, between 240 and 255, or the first four bits of 1,1,1,1.

So based on that chart and those ranges of IP addresses, let’s see what class a particular IP address would be part of. Let’s start with the IP address of 17.22.90.7. To be able to determine the class, we need to look at the first octet, which in this case is the number 17. And if you refer back to that chart, the number 17 is in a class A address.

Let’s do another one. IP address is 220.10.77.40. If we look at that first octet, it is 220. And 220 is in the C class.

The next IP address is 165.245.0.1. We need to look at that first octet. In this case, that’s 165, and 165 is in the range of a class B address. Next on our list is 128.90.10.2. That first number is 128, which means that is also a class B address.

The IP address of 191.77.24.250 has the first octet as 191. And if we refer to our chart, 191 is in the range of a class B address. And lastly, 192.1.12.5. We’re looking at that first octet of 192, which falls in the range of a class C address.

When you start calculating an IP subnet, there are four different values that are very important to know. The first is the IP address associated with the network address. This is the one that defines all of the other devices on this particular subnet.

To calculate a network address, you set all of the host bits of that address to 0 and then determine what the decimal representation of that might be. The second important piece of information you need for an IP subnet is the first usable host address on that subnet. This is always going to be one number higher than this previously defined network address.

You also need to know the network broadcast address. This is the last IP address of this particular network address. To be able to calculate the network broadcast address, you would set all of your host bits to 1, which is the same as 255 decimal, and perform the conversion between the binary and the decimal. And just as you need to know the first usable host address on the network, you also need to know the last usable host address. And to calculate that, you look at the network broadcast address, and it’s one number fewer than the broadcast address.

So let’s calculate those four important subnet values. And let’s start with the IP address of 10.74.222.11. If we look at our chart, we know that this starts with the number 10. Therefore, this must be a class A address.

And the default subnet mask for a class A address is 255.0.0.0. Since we’re using this class A subnet mask, we know that everything that’s on the left side of our bar, or this first octet, is going to be our network address. And everything on the right side will be associated with the host ID.

So let’s add those to our chart. We have a network column and a host column. Obviously, the 10-dot is going to be in the network column. That’s what’s on the left side of that bar. And then everything on the right side is going to be the host address.

We first need to calculate the network address. And to do that, we set all the host bits to 0. This means that everything in that second column will be 0. And the network address, therefore, will be 10.0.0.0.

The first host address is one more than the network address. So our first host address would be 10.0.0.1. To calculate the broadcast address for this subnet, we set all the host bits to 1, which means that the broadcast address is 10.255.255.255. And as you recall, to calculate the last usable address on this subnet, we need to subtract 1 from the broadcast address. So the last usable address on this network is 10.255.255.254.

With these four values, you’ll be able to determine the network address. You’ll know if an IP address happens to be one of the usable addresses within that range. And you’ll know what the last, or broadcast address is for that entire network.

Let’s do another one. In this case, the IP address is 172.16.88.200. If we look at that first octet, we can see that that is a class B address, which means the default subnet mask for this network is 255.255.0.0. This means that we would draw our line right in the middle, between the first 16 bits and the last 16 bits. So everything on the left side is associated with the network address, and everything on the right side is associated with the host address.

Now, let’s perform those exact same calculations. We want to determine what the network address is. So we will set all host bits to 0. This means that the network address for this particular subnet is 172.16.0.0.

To be able to calculate the first host address, we need to add 1 to that value or 172.16.0.1. To calculate the broadcast address, we set all host bits to 1, which means the broadcast address for this subnet is 172.16.255.255. And to define the last usable host address on this network, we subtract 1 from the broadcast address, which means the last usable address is 172.16.255.254.

Let’s see if we’ve figured out this process and step through another IP address, in this case, 192.168.4.77. Looking at this first octet of 192, that fits into the range of a class C address, which means the default subnet mask is 255.255.255.0. If we were to draw our line, the network side of the address is the first three octets, and the host side is the last octet.

Let’s put that into our chart. So our first three octets, 192.168.4, is the network side. And .77 is the host side. To be able to calculate the network address, we set all host bits to 0. So the network address for this particular subnet is 192.168.4.0.

If we add 1 to that address, we get our first host address of 192.168.4.1. To be able to calculate the broadcast address, we set all host bits to 1, which means the broadcast address is 192.168.4.255. And if we subtract 1 from that broadcast address, we get the last host address, and that would be 192.168.4.254.

Although we no longer use class-based subnetting, we can still use the same process when we look at anything that may be class or non-class based. And as we go through our additional subnetting videos, you’ll notice that this same process is used over and over again, regardless of the IP address and the subnet mask.