Hi, today I am going to dive into the classful addressing and classless addressing and their differences. Before classless IP addressing, there was rigid classful addressing. By classful, I mean that there is a block of fixed addresses per network, and the leading decimal had to be within a certain range as well. Let’s start with the leading range, but first it’s important to know that there are 5 classes. Classes A, B, C, D, and E. Each of these define the leading decimal, the number of networks(subnets) and the numbers of addresses per network(subnet). Class A ranges from 0 – 126, B ranges from 127 to 191, C from 192 to 223, D from 224 to 239 and E from 240 to 255. I put a chart down below.

By leading decimal, I am talking about the first octet of an IP address. So 12.0.0.1 would be a class A address. 125.0.0.1 would also be class A, 128.0.0.1 would be class B, 192.168.1.1 would be class C, 225.0.0.2 would be class D and 241.0.1.1 would be class E. These are essentially blocks that determine which “class” they belong to hence the word “classful addressing.” Not only do they determine the leading bit, but the number of networks and hosts per network vary as well. Class A can have 126 networks(subnets) with about 16 million hosts. Class B can have about 16,000 networks that each have about 65,000 hosts. Class C can have about 2 million networks each with 254 hosts. Class D is reserved for multicast transmissions and Class E is only for experimental purposes. Here is a table with the exact numbers below:

Classful addressing was good at the time, but as you can see it can be very wasteful for IP addresses, especially if those IP addresses were public. If you are a fairly large corporation with 30,000 devices that need an IP address a class B would be your best bet. Even though the 30,000 IPs were satisfied, that leaves that company with 30,000 IPs left over that will just be wasted. The wastefulness of IPs lead to classless addressing, specifically CIDR which stands for Classless Inter Domain Routing. This allows a subnet to be divided at any bit within the IPv4 address. CIDR uses something called a “slash notation” or a prefix length that allows an IP to be divided at any of the 32 bits. For example a slash notation can be 192.168.1/8. The 8 is the prefix length and that means that the first 8 bits belong to the network and the rest belong to the assignable addresses. Class A,B, and C have a slash notation but it is fixed. The notation of A is /8, the notation of B is /16, and the notation of C is /24. These cannot be changed in any circumstance. But with CIDR there can be a notation of /9 which means the first 9 bits are the network and the rest are assignable addresses. It can go all the way up to /30 and even 32/ with /32 literally being an actual host address. Here is a visual: this is a regular 32 bit format for a IPv4 DDN.

If I were to put a slash notation of /9 this would be the divided line would be this

The left side being the network address and the right side being the assignable addresses. This is a host address but a network address usually ends in all 0s so it would look like this.

Another example shows what it would look like if the slash notation is /25. The first 25 bits are the network portion and the remaining are the assignable addresses.

As you can see there the slash notation of 25 allows the first 25 bits to be the network portion leaving much less for the assignable hosts. This allows flexible IP addressing as companies are literally able to make networks(subnets) down to the literal bit ranging from 0 to 32. This leads to less addresses being wasted and more purposeful IP address assignments. Another feature that CIDR enables is VLSM which stands for Variable Length Subnet Mask. This is used in a scenario where different subnets have different needs. Networks are numbered by the power of two, so the ranges of addresses go like this: 2,4,8,16,32,64,128,256 and so on. These are the numbers of total host addresses before network and broadcast addresses are assigned. Say a company wants to have subnets for HR, Marketing, Finance, and Management. What if HR has 130 users, Marketing has 70 users, Finance has 30 users and Management has only 2 users. Instead of assigning them all their own subnets with a fixed length, VLSM allows the company to have ALL of those subnets into one big slash notation. This means that you can have one big network and divide it into smaller subnets of varying sizes.
Leave a Reply