Address Classes and CIDR Notation

๐Ÿ’ก Introduction

Address classes were the first attempt at splitting up the global Internet IP space. Subnetting was introduced when it became clear that address classes themselves weren't a sufficient way of keeping everything organized. But as the Internet continued to grow, traditional subnetting just couldn't keep up.

๐ŸŒ Address Classes

With traditional subnetting and address classes, the network ID is always either eight bits for Class A networks, 16 bits for Class B networks, or 24 bits for Class C networks. This means that there might only be 254 Class A networks in existence, but there are 2,097,152 potential Class C networks. That's a lot of entries in a routing table.

๐Ÿ”„ Limitations of Address Classes

The sizing of these networks isn't always appropriate for the needs of most businesses. 254 hosts in a Class C network is too small for many use cases, while the 65,534 hosts available for use in a Class B network is often way too large. Many companies ended up with various adjoining Class C networks to meet their needs. That meant that routing tables ended up with a bunch of entries for a bunch of Class C networks that were all actually being routed to the same place.

๐Ÿ”€ CIDR Notation and Flexibility

This is where CIDR (Classless Inter-Domain Routing) comes into play. CIDR is an even more flexible approach to describing blocks of IP addresses. It expands on the concept of subnetting by using subnet masks to demarcate networks. CIDR abandons the concept of address classes entirely, allowing an address to be defined by only two individual IDs.

๐Ÿ”๐Ÿ”„ Advantages of CIDR

CIDR simplifies how routers and other network devices need to think about parts of an IP address. It allows for more arbitrary network sizes, where networks themselves can be of differing sizes. Previously, if a company needed more addresses than a single Class C network could provide, they needed an entire second Class C network. With CIDR, they can combine that address space into one contiguous chunk.

๐Ÿ”ข Available Host IDs

CIDR also provides additional available host IDs. You always lose two host IDs per network for network and broadcast addresses. For example, a slash 24 network has 2^8 or 256 potential hosts, but only 254 available IPs to assign. However, a single slash 23 network has 2^9 or 512 total hosts, resulting in 510 available IPs after deducting the network and broadcast addresses.

๐ŸŒ๐Ÿ”๐Ÿ”€๐Ÿ”ข

Last updated