Before the Internet was even a thing, computer networks existed. These networks used IP addresses identical to the ones used today. These networks were interconnected over the ARPANET, which eventually evolved into what is now the Internet. In these early days of computer networking, the scale and popularity of the Internet were essentially inconceivable. Many of the modern technologies we take for granted simply didn’t exist. Because of this and the assumptions of the time, vast batches of IP addresses were handed out.
As the ARPANET continued to grow, it was determined that the contemporary system for handing out addresses was going to run into issues with address space exhaustion in the near future. Classful networking was the first attempt to delay the issue of addressing space exhaustion. To understand what classful networking is, and how it works, it’s important to understand the systems that underly it, primarily IPv4 addresses.
Contents
IP Address Structure
An IP address is the unique Internet Protocol address used to direct network traffic over the Internet. IPv4 is the main addressing scheme. IPv4 addresses are generally displayed in the dotted-quad notation to be human readable. For example, an IP address may look like this “192.168.0.1”. Each IP address has four sections, separated by dots, hence the term – dotted quad. However, it is also referred to as dot-decimal notation.
In reality though, computers don’t actually use this format. Like everything that computers deal with, IP addresses are used in binary. In the case of IPv4 addresses, each of the four sections, known as an octet, is represented by 8 binary digits. The above address is really “11000000.10101000.00000000.00000001” in binary.
One of the key things about this is that because each octet is only represented by 8 binary bits, the human-readable numbers must be between 0 and 255. This means that there are at most 255*255*255*255 or 4,294,967,296 possible IP addresses. While four billion possible IP addresses probably seems like a lot, that’s less than one IP address per person currently alive. Most people in the western world have more than one internet-connected device.
Class A Networks and Early Assumptions
In the early days of computer networking, it was assumed that there wouldn’t be a lot of networks. There were no home internet connections or even home computers. Large companies, educational institutes, and government departments were the only places with any networks. All of these networks were assumed to be likely to grow significantly. In contrast, the total number of networks would stay relatively small. This assumption wasn’t even misguided with the information at the time as the IBM PC, the first home computer, hadn’t been released yet.
Companies like Apple, Ford, and AT&T got big batches of addresses. The US DOD got more than a dozen large batches of addresses. Apple got 17.0.0.0, Ford got 19.0.0.0, AT&T got 12.0.0.0, while the DOD got 6.0.0.0, 7.0.0.0, 11.0.0.0, and more. Each of these networks assigned every IP address beginning with the first number (17, 7, 19, etc) to the respective companies. This meant each network could support 16,777,216 individual IP addresses. It also meant that there was a total of 255 possible networks.
This was the big problem, as computer networking grew in popularity, it became clear that 255 networks would not be enough to satisfy the demand. Thankfully this issue was spotted early enough for a fix to be developed. The first fix was called classful networking and it was introduced in 1981. Incidentally, this is the same year that the IBM PC was released. The personal computer and home internet connections would soon turn up the pressure on the address space.
The Classes
The idea of classful networking is to break these massive networks into many smaller ones. The original huge networks were reclassed as Class A networks. The new classes B and C were also created, while another section was set aside as reserved for future use. The easiest way to separate the classes is that Class A takes up the first half of all addresses. Class B then takes half of the remaining addresses, and Class C gets half of the addresses after Class B. The rest of the address space is reserved.
In practicality, this means that any IP address where the first octet had a number below 128, is a Class A network. A Class B network is any address where the first octet is between 128 and 191. Any network where the first octet is between 192 and 223 is a Class C network. And anything beginning with 224 or higher is reserved. In binary terms, every Class A IP address starts with a 0. Every Class B address starts with 10, every Class C address starts with 110, and the reserved space starts with 111. This makes it easily possible to determine the boundaries of each network.
This means that the overall space for class A networks is halved from the original 256 to 128. Importantly, it also means that there are now 16,384 Class B networks, that support up to 65,536 IP addresses each, and 2,097,152 Class C networks that support 256 IP addresses each. The reserved space on the end of the address space was later split into Class D and Class E.
Reserved Space
A number of addresses at the start and end of each class were reserved with some sections in the middle being reserved too. Some, like 0.0.0.0 to 0.255.255.255 weren’t specifically used for anything, instead being reserved for future use. Other reserved sections were given a specific purpose. For example, any IP address that starts with 127 is treated as a loopback address. The network traffic never gets transmitted and simply bounces back to the sender without being sent.
Addresses starting with 192 were reserved, with 192.168 addresses being reserved for use in internal networks, allowing any internal network to use it. This is used in almost all home networks, for example, as it provides 256 possible addresses. For larger use cases any address starting with 172.16 to 172.31 is also reserved for internal use as is any network beginning with 10.
These private address spaces are reserved for internal use only. All networking equipment is designed to prevent any traffic destined for one of these reserved addresses from getting past a router to another network. The addresses are network-specific, meaning anyone and everyone can use them on their own internal networks. For this to work, the router must have a public IP address, keep track of which internal device is requesting what data from another network, and ensure that the response gets back to the right device. This technique is called NAT or Network Address Translation.
Success and Failure of Classful Networking
Classful networking allows for much more efficient use of the space than just assigning one 256th of the possible address space to any company that asks for it. The vast majority of companies, government departments, etc., don’t need 16,777,216 IP addresses. They can get a much smaller number of IP addresses assigned to them and do just fine.
While the classful networking system looks good on paper, and is certainly neat, unfortunately, it runs into similar issues at a different scale. Most companies are also smaller than a class B network, not needing 65536 possible IP addresses. Even in the mid-80s and early 90s though, many companies were too big for a class C network with just 256 IP addresses. This meant companies often needed Class B networks even if they only needed 300 IP addresses. Again, this meant that the address space was used inefficiently with vast swathes of addresses issued to companies that would never utilise all of it.
Successors to Classful Networking
This issue was quickly identified, and so in 1993, just 12 years after classful networking was introduced it was replaced. Its replacement was called Classless Inter-Domain Routing, or CIDR (pronounced cider). CIDR allowed much more configurability in the number of addresses issued. Allowing networks to be defined by each binary bit rather than each octet. This solution is still in use today, though the massive growth in internet-connected devices has now completely exhausted the IPv4 address space even with this more efficient addressing technique.
The solution to that is the switch to IPv6 which provides a much larger address space, 340,282,366,920,938,463,463,374,607,431,768,211,456 possible addresses to be exact. That’s roughly 340 trillion trillion trillion, which is a lot more than the 4.3 billion odd IPv4 addresses. Unfortunately, despite the urgency driven by the impending and now present IPv4 address space exhaustion IPv6 support is still sketchy. However, this is mainly due to legacy hardware.
Conclusion
Classful networking was an early attempt to improve the efficiency of IP address allocation. It was successful in delaying the exhaustion of the IPv4 address space, for the 12 years it was in place. It was superseded by CIDR, which was a more successful long-term solution.
Some legacies of classful networking live on with many companies still having Class B or and even a few having Class A networks assigned to them that they can’t possibly make efficient use of. Indeed even attempting to do so presents somewhat of a security risk as any machine using one of those IP addresses would be publicly addressable without a firewall in place. In CIDR notation a Class A network is a /8, a Class B network is a /16, and a Class C network is a /24.