If you’ve ever been in charge of IP address assignment, you’ve come across the terms classful and classless addressing. If you haven’t, the main difference between classful and classless addressing is in the subnet length: classful addressing uses fixed length subnet masks, but classless uses variable length subnet masks (VLSM).

Remember subnets?

Need a refresher on how subnets work? Rather than dive into the details here, we’ve put together an in-depth piece that covers subnetting, subnet ranges, CIDR notation and more. Subnetting: What It Is and How It Works.

Let’s take a look closer at both classful and classless addressing, the history and purpose behind them, and the reasons classless addressing has really won out.

What is classful addressing?

Classful addressing is an IPv4 addressing architecture that divides addresses into five groups.

Prior to classful addressing, the first eight bits of an IP address defined the network a given host was a part of. This would have had the effect of limiting the internet to just 254 networks. Each of those networks contained 16,777,216 different IP addresses. As the internet grew, the inefficiency of allocating IP addresses this way became a problem. After all, there are a lot more than 254 organizations that need IP addresses, and a lot fewer networks that need 16.7 million IP addresses to themselves.

Simply put: we needed a way to more efficiently allocate addresses. In 1981, RFC791 and classful addressing came along to help solve that problem. With classful addresses, we went from just 254 available networks to 2,113,664 available networks. How?

How classful addressing works

Classful addressing divides the IPv4 address space (0.0.0.0-255.255.255.255) into 5 classes: A, B, C, D, and E. However, only A, B, and C are used for network hosts. Class D, which covers the 224.0.0.0-239.255.255.255 IP address range, is reserved for multicasting, and class E (240.0.0.0-255.255.255.255) is reserved for “future use.”

The table below details the default network mask (subnet mask), IP address ranges, number of networks, and number of addresses per network of each address class.

IPv4 address
class
Network
Mask
Number of
IPv4 Networks
Number of
IPv4 addresses
per network
IPv4 address range
A 255.0.0.0 128 16,777,216 0.0.0.0 –

127.255.255.255

B 255.255.0.0 16,384 65,536 128.0.0.0 –

191.255.255.255

C 255.255.255.0 2,097,152 256 192.0.0.0 –

223.255.255.255

As we can see, Class A continues to use the first 8-bits of an address, and may be suitable for very large networks. Class B is for networks much smaller than Class A, but still large in their own right. Class C addresses are suitable for small networks.

What are the limitations of classful IP addressing?

As you can probably guess, the internet is hungry for IP addresses. While classful IP addressing was much more efficient than the older “first 8-bits” method of chopping up the IPv4 address space, it still wasn’t enough to keep up with growth.

As internet popularity continued to surge past 1981, it became clear that allocating blocks of 16,777,216, 65,536, or 256 addresses simply wasn’t sustainable. Addresses were being wasted in too-large blocks, and it was clear there’d be a tipping point where we ran out of IP address space altogether.

One of the best ways to understand why this was a problem is to consider an organization that needed a network just slightly bigger than a Class C. For example, suppose our example organization needs 500 IP addresses. Going up to a Class B network means wasting 65,034 addresses (65,534 usable Class B host addresses minus 500). Similarly, if it needed just 2 public IP addresses, a Class C would waste 252 (254 usable addresses – 2).

Any way you look at it, IP addresses under the IPv4 protocol were running out, either through waste or the upper limits of the system.

Did you know? There’s a calculated limit of 4,294,967,296 IPv4 addresses, and they were exhausted on April 21, 2017.

What is classless addressing?

Classless addressing is an IPv4 addressing architecture that uses variable-length subnet masking.

The solution would come in 1993, as Classless Inter-Domain Routing (CIDR) introducing the concept of classless addressing. You see, with classful addressing, the size of networks is fixed. Each address range has a default subnet mask. Classless addressing, however, decouples IP address ranges from a default subnet mask, allowing for variable-length subnet masking (VLSM).

Using classless addressing and VLSM, addresses can be allocated much more efficiently. This is because network admins get to pick network masks, and in turn, blocks of IP addresses that are the right size for any purpose.

How does classless addressing work?

At a high level, classless addressing works by allowing IP addresses to be assigned arbitrary network masks without respect to “class.” That means /8 (255.0.0.0), /16 (255.255.0.0), and /24 (255.255.255.0) network masks can be assigned to any address that would have traditionally been in the Class A, B, or C range. Additionally, that means that we’re no longer tied down to /8, /16, and /24 as our only options, and that’s where classless addressing gets very interesting.

Going back to our example organization, if we need 500 IP addresses, using a subnet calculator (we built one!) tells us a /23 block is much more efficient than a Class B allocation. /23 gives us 510 usable host addresses. That means by switching to classless addressing, we’ve avoided wasting over 65,000 addresses. Similarly, if we need just the two hosts, a /30 saves 250 addresses.

With a /23, almost all IPs are used. With a Class B, 90% of IPs will be wasted.


What’s “classless subnetting” and how is it different?

You’ll often hear people refer to the term “classless subnetting” interchangeably with “classless addressing,” as the terms generally refer to the same thing. Classless subnetting is simply the use of VLSM to subnet your networks.

There’s also the matter of class and subnetting. The fundamental difference between classless subnetting and classful subnetting is: network masks must be explicitly defined in classless subnetting, while network masks are implicit in classful subnetting. What does that mean exactly?

Consider the IP address 192.168.11.11. With classful IP addressing, you know it’s a Class C address. That means you also know the network mask is 255.255.255.0 (/24). In a classful address, the format of the IP address implies the network mask. There’s no option.

However, with classless addressing, knowing the IP address alone does not imply you have the network mask. You need to be explicitly told what it is.

What are the advantages of classless addressing

In a word, classless addressing can be summarized as: efficient. Specifically, as we can see in RFC4632, classless addressing helped solve three major problems and delivers these advantages:

  1. More IP address allocations. Today, we know IPv6 is our long-term IP address solution to the IP address exhaustion problem. However, IPv6 is not yet widely used. In the early 1990s, it was clear we would rapidly exhaust the IPv4 address space if nothing changed. As a result, classless addressing was used as a medium-term solution to help us stretch the life of IPv4.
  2. More balanced use of IP address ranges. Classless addressing decoupled the relationship between network size and IP address and allowed for balanced use across what used to be the Class A, B, and C ranges. Far less wasted addresses.
  3. More efficient routing. VLSM and subnetting make route aggregation and classless routing protocols possible. With route aggregation (sometimes called route summarization or supernetting), routing tables can be smaller, reducing resource consumption on routers, and saving bandwidth. Additionally, including network masks in routing protocols allows for more specific routes to be advertised. For example, 198.51.100.0/29 tells us more than 198.51.100.0 (with an implicit /24).

Of course, as anyone who has studied for a networking certification can tell you, there is a significant complexity increase between classful and classless addressing. With classful addressing, you could always infer the subnet from the IP address. With classless addressing and VLSM, network masks must be explicitly defined. Similarly, there are complexities with classless routing that don’t exist with classful routing. With classful routing, a routing table can have multiple matches for a single IP address. Overall, it’s a lot more to learn and keep straight.

However, the advantages of classless addressing far outweigh the complexity trade offs. As a result, classless addressing has become a fundamental part of how subnetting—and even the Internet—work.


Take control of your subnetting fast with Auvik’s cloud-based network management. Want to find out for yourself? Sign up for our 14-day trial.