Classful addressing is the original IPv4 address classification system defined in RFC 791, dividing the IP address space into five classes—A through E—based on leading bit patterns. Understanding these classes and their network and host ranges is foundational knowledge for subnetting and broader IPv4 networking.
Classful Addressing
When we're talking about classful addressing, or classes, we're talking about RFC 791. It was created as one of the earliest versions, the earliest iterations, of IP version 4, so it's really core to how IP version 4 operates. At some point in time we switched to classless addressing, but we still fall into the confined spaces of that classful addressing in some ways, so it's important to understand what classful addressing is. It's going to be talked about throughout the rest of this course, so let's dive deep into that before we move on to subnetting.
If I was in charge of a company and I was managing their network, let's say this is their network. I would say that this is their network and it's the network that I'm managing. However, from an IP address standpoint, this is actually multiple networks. So this would be a network over here, and we'd have a network address assigned to all of these devices over here. This would be another section of my corporate network, but this would be a separate layer 2 network from an addressing scheme. And these actually are individual networks as well.
The reason this is important is that moving forward we're going to be talking a lot about networks and hosts. Just realize that networks are all these local devices that are connected together, and the hosts are the individual machines, the endpoints, that are connected on this network. We'll be throwing out those terms quite a bit, network and hosts.
One of the earlier definitions of IP addressing, specifically RFC 760, defined what bits were associated with the network side and what bits were associated with the host side. These first eight bits were the network portion of this. Whatever fell into there meant that it was all part of the same network. If this was 50 right here as an example, then 50 would have been that network, 51 would have been the network, 52 would have been a network. And then whatever followed here, so in this example right here, 145.0.32, would have been a host on that network.
This allowed us to create very minimal networks. There are eight bits here, so 2 to the 8th power, and that equates to 256 different networks. We had the potential of having 256 networks connected together. Whereas this was 2 to the 24th power, which is something like 16 million, and this is how many hosts you could have on one of those networks. You could have over 16 million different devices on that network, which, if you got that many devices on a network, just would not work at all because of how Ethernet works and how our networks work. It's a shared network, and that's a whole other class, talking about all of that. But just know that 16 million is a ridiculous amount of endpoints that you would have on any one network, and 256 is a ridiculously low number for the number of networks we have.
So this obviously caused a problem. They said, how can we address this? Let's come up with some classful addresses.
They said what we can do is anything that starts with a zero. If the first bit is a zero, the leading bit, I'm going to call this the leading bit, is zero, then we're going to say that that is a class A. What that ends up being is a class A says that this first eight bits is the network bits. That means that this first bit has to be a zero, and then we have everything from 0 0 0, which would be 0 1 1 1 1 1 1 1, and if we figure out what the decimal equivalent of that would be, it would be 127. So there's the range right there. A class A is anywhere from, if it starts out with 0 to 127, it's a class A, and that's what defines what a class A network is.
So how many networks does that give us? We just said we have this many bits. There are seven bits that we have for networks, so that would be 2 to the 7th power, which is 128 is what that equates to be. For the number of nodes, that gives us still that 2 to the 24th power, which is more than 16 million, so we've got 16 million nodes with this.
One thing I'll note about this class A: I did subtract two right there. In any network, there are actually two addresses that are already spoken for, the network address and the broadcast address. We'll get more into that later, but just know that you actually have to subtract two from that number there.
Everything with a zero is already spoken for if it's got a zero as that leading bit. So we need to say that whatever we have has to be a one at this point. Let's say a class B is everything from 1 0. Anything that starts with a 1 0 is a class B, so the leading bits are 1 0.
We are defining class B here. We've got 128, to, let's change that to 1 1 1 1, so that ends up being 191, and that's a class B. If it's a class B, the first two octets denote what the network addresses are. So all of these are network addresses right there, and since they're all network addresses, what do we have to work with? All of these bits we have to work with right here for the network side of it. They could be all zeros, and all zeros except for one, counting up using those skills about counting in binary. We can use all of those up to all ones in this range right here.
So how much does that give us? We have eight bits over here and six bits over here, so that's a total of 14 bits. 2 to the 14th power is the answer of how many networks we have, which ends up being about 16,000 networks in there. Then we can figure out how many different nodes we can have on there, or how many different hosts we can have on there. If we look at how many bits are available to us, we have 16 bits, so 2 to the 16th power, which is about 65k, is what we have available for us there.
Notice I did subtract that two hosts on there that are already spoken for. But let's tackle class C. We know that all of the zeros are spoken for, and we all know that all the 1 0s are spoken for, so this has to be a one now. Let's do 1 1 0, and we're going to call this a class C. If it's a class C, the leading bits are 1 1 0.
If we were to fill this in with all zeros here, then the starting range of that is 192. And if we fill that in with all ones right there, the ending range of that is 223. If we were to calculate that out, convert it from binary to decimal, that would be 223.
It says if a class C address, we are going to use the first three octets as the network address. So how many possibilities does that give us? It's 8 + 8 is 16, plus another five bits over here denoting what the network address is. So it's 16 + 5, so then we have 21, so it would be 2 to the 21st power. If we calculate out 2 to the 21st power, then we would end up getting a little over 2 million networks. You can see how this classful address is giving us a lot more networks to work with and how we can utilize a lot more networks.
Then the number of hosts for each of these networks is just this tail end right here. So 2 to the 8th power, or 256. We can minus that two on there, so 254. So 254 addresses for it, which is much more reasonable for a lot of our addresses. Can you imagine your home taking up, in the old classful system, or even before that, before the classful system, where you just take up one of those 256 networks that are possible just for your one home? That doesn't really make sense. This is a more logical layout for this.
Class D looks a little bit different here. We still have the same leading bits here that we can figure out, because we know that 1 1 0 is all taken. So this has to be a 1 1 1. Following what we've been following here, that's got to be a zero here. So the leading bits 1 1 0.
That gives us anything from 0 0 0, which is 224. And it goes to 1 1 1, so if all of those are ones then that would give us 239. So if you see the first octet and it has anywhere from a range from 224 to 239 in it, then you know that that is a class D.
Now class Ds don't necessarily have networks or nodes that are assigned to it. Instead these are all multicast networks. We talked about multicast. We talked about a unicast, which is from one device to another device. We talked about broadcast, which is one device to all devices on the network. And then multicast is one device to multiple devices that are on the network. So we have these multicast address ranges here.
We only have one more spot here left, and that's because 1 1 1 is taken. So we're going to say the leading bits are 1 1 1. Let's do 1 1 1 1.
That gives us, if we were to add all zeros into here, that would calculate to 240. And if we go all the way to all ones there, that would be 255. So the rest of the range, anything that's left over, that's going to go in E. This is going to be class E, and this is going to be experimental. This is a range that's set aside for some other purposes that I don't fully understand or know. But just know that we really don't use that in our networks.
You do actually use a lot of multicast addresses within your network, so you will see that within your networks, but it plays along with your other class A's, B's, and C's. It does function a little different than those other classes. Mainly what you're going to be working with, and what we're going to be working with throughout this course, is class A, B, and C networks.
There we have it. We've filled out the whole chart. This is a chart that you'll be using for a while here. You need to know these classful ranges. You'll get very familiar with these classful ranges, so this is something that you'll take a little mental snapshot of, and maybe even have a paper copy of, because we will be using this.
We went through and stepped through figuring out a class A, B, and C, and saw how each one was broken down into a different set of networks and a different set of nodes, or a different set of hosts, on each one of those networks. So this is how you figure out the classful addresses.
TechKnowSurge builds IT and cybersecurity professionals through hands-on, concept-first training built around real understanding — not memorization. Free interactive tools, structured programs, and 25+ years of real-world experience, all in one place.
Explore free tools and programs →