TechKnowSurge
CompTIA Network+ 1.7 Cisco CCNA 1.6 Cisco CCST Networking 2.2
VideoNetworkFree

IP Address Classes

Classful addressing is the original IPv4 framework defined in RFC 791 that divides the IP address space into five classes — A, B, C, D, and E — based on leading bit patterns. Understanding these classes and their network-to-host bit boundaries is foundational to subnetting and modern IP addressing.

Complete this video to capture a CTF flag worth 1 point.

About this video

Classful addressing is the foundational IPv4 framework introduced in RFC 791, one of the earliest specifications governing how IP version 4 operates. Before classful addressing existed, the IP address space used a simple eight-bit network and 24-bit host split, which allowed only 256 possible networks — far too few — while permitting over 16 million hosts per network, an unworkable number on a shared Ethernet segment. Classful addressing solved this by dividing the address space into structured classes based on the leading bits of the first octet, creating a more scalable balance between the number of available networks and the number of hosts each network could support. The five classes each serve a distinct purpose. Class A, identified by a leading bit of 0, spans 1 through 127 in the first octet, uses 8 bits for the network portion, and supports over 16 million hosts per network across 128 possible networks. Class B, identified by leading bits 10, covers 128 through 191, uses 16 bits for the network, and provides roughly 16,000 networks with up to 65,000 hosts each. Class C, identified by leading bits 110, spans 192 through 223, uses 24 network bits, and allows more than 2 million networks with 254 usable host addresses per network — a range well suited to smaller organizations. Class D (224–239) is dedicated entirely to multicast communications, enabling one device to address a defined group of recipients simultaneously, and Class E (240–255) is reserved for experimental purposes and is not used in operational networks. Although modern IP networking uses classless inter-domain routing (CIDR) to assign address space more efficiently, the boundaries and bit structures established by classful addressing remain embedded in how IPv4 behaves. The classful ranges for A, B, and C serve as the reference framework for subnetting, and recognizing them on sight is an essential skill for anyone working with IP addressing, network design, or troubleshooting.

What you'll learn

What's covered

Classful Addressing

Aligned to

CompTIA Network+
1.7 Given a scenario, use appropriate IPv4 network addressing.
Cisco CCNA
1.6 Configure and verify IPv4 addressing and subnetting
Cisco CCST Networking
2.2 Identify IPv4 addresses and subnet formats

Key terms

IP Address
A numerical label assigned to each device connected to a network that uses the Internet Protocol.
Internet Protocol
IP
The principal communications protocol for routing packets across network boundaries.
Classful Addressing
An early IPv4 addressing scheme that divided the address space into fixed classes (A, B, and C for hosts; D for multicast; E reserved) based on the leading bits of the address, with each class defining a fixed boundary between the network and host portions. Classful addressing was replaced by CIDR because it wasted large blocks of address space.
Network Layer
Layer 3 of the OSI model, responsible for logical addressing and routing data packets between networks.
Subnet Mask
A 32-bit number that divides an IP address into network and host portions.
IPv4 Address Class
One of five categories (A–E) into which IPv4 addresses are grouped based on leading bit patterns, each defining a specific range of addresses and a fixed network-to-host bit boundary.

Transcript

We're going to talk about classful addressing. 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, and it really is going to be talked about throughout the rest of this course.

Just a reminder: when we're talking about classful addressing, or classes, we're talking about RFC 791. It was created as one of the earliest iterations of IPv4, so it's really core to how IP version 4 operates. We still fall into the confined spaces of this classful addressing in some ways, so let's dive deep into that before we move on to subnetting.

Networks and Hosts

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 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 why this is important is that moving forward we're going to be talking a lot about networks and hosts. Just realize that a network is all these local devices that are connected together, and the hosts are the individual machines that are connected, the endpoints that are connected on this network. We'll be throwing out those terms quite a bit: network and hosts.

Before the Classes

One of the earlier definitions of IP addressing — specifically talking about RFC 760 here — defined what bits were associated with the network side and what bits were associated with the host side. So this right here, these first eight bits, were the network portion of this, so whatever fell into there means 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 a 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's eight bits here, so 2 to the eighth power, and that equates to 256 different networks. So we had the potential of having 256 networks connected together, whereas this was 2 to the 24th power, which is something like 16 million. This is how many hosts you could have on one of those networks: you could have over 16 million different devices on that network. If you got that many devices on a network it 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, and they said, how can we address this? Let's come up with some classful addresses.

Class A

What we can do is anything that starts with a zero — so 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 0000000, which would be zero, would be the range there, to 11111111. 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 zero, to 127. That's what defines what a Class A network is.

How many networks does that give us? We just said we have this many bits — there's seven bits that we have for networks — so that would be 2 to the seventh 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 2 right there. In any network there's 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.

Class B

Everything with a zero is already spoken for, if it's got a zero as that leading bit, so we need to say okay, whatever we have has to be a one at this point. So let's say a Class B is everything from 1 0 — anything that starts with the 1 0 is a Class B. So the leading bits are 1 0. We are defining Class B here. We've got everything from 10000000, which is 128, to — let's change that to 1111111 — so that ends up being 191, and that's a Class B.

So we say 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? Well, 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 one — you know, 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. So 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 that 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.

Class C

Let's tackle Class C. We know that all of the zeros are spoken for, and we know that all the 1 0s are spoken for, so this has to be a one now. So let's do a 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, and if we were to fill this in with all zeros here, then the starting range of that is 192. And then 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 a 223.

So it says if it's a Class C address we are going to use the first three octets as the network address. How many possibilities does that give us? Well, it's 8 plus 8 is 16, plus another five bits over here denoting what the network address is. So if it's 16 plus 5, 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.

So you can see how this classful addressing is giving us a lot more networks to work with, and how we can utilize a lot more networks. And then the number of hosts for each of these networks is just this tail end right here, so 2 to the eighth power, or 256, and we can minus that 2 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 the classful system, where you just take up one of that 256 networks that are possible just for your one home? Doesn't really make sense. So this is a more logical layout for this. This is the Class C.

Class D

We're on to Class D now. 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, and following what we've been following here, that's got to be a zero here. So the leading bits are 1 1 1 0.

That gives us anything from 0000, which is 224, and it goes to 1111 — 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 the multicast is one device to multiple devices that are on the network. So we have these multicast address ranges here. That is a Class D.

Class E

We only have one more spot here left, and that's because 1 1 1 0 is taken, so we're going to say the leading bits are 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 As, B's and C's, so 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 these Class A, B and C networks.

The Chart

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 take a little mental snapshot of, and maybe even have a paper copy of this, because we will be using this.

We went through and we 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, and now we're going to be taking this and utilizing it through pretty much the rest of this course.

About TechKnowSurge

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 →