When we switched from classful subnetting to CIDR, we created a new way to design and configure our networks. In this video, you’ll learn about classless inter-domain routing and how we were able to easily customize our subnet masks.
<< Previous: IPv4 ClassesNext: IPv4 Addresses and Subnetting >>
Classless Inter-Domain Routing was created in 1993 to help address some of the shortcomings we had with the class-based subnet masking. You recall from one of our previous videos, we have a Class A, a Class B, and a Class C set of addresses. And the default subnet masks you can see here.
In this class-based subnetting, you could choose one of these three classes to define how big or how small you wanted your networks to be subnetted, which means you could either have with Class A 128 networks that would have 16 million plus hosts per network. You could have 16,000 or so networks with 65,000 hosts per network, or you could have two million networks, but you can only have 254 hosts on a single network.
As you can see with this class-based system, there were some pretty dramatic differences between those three. There’s no in between with these. You could either choose the A, the B, or the C, and that was it. That was one of the biggest reasons that we went to a classless based subnetting system, so that we could really define the network for the proper sizes that was right for us.
This also meant that we were conserving IP addresses, which of course is important with IPv4. It also meant that the subnet masks did not end on a single octet. We weren’t restricted to simply 255.0.0.0, or 255.255.0.0, or the Class C at 255.255.255.0. We could pick subnet masks that were somewhere in between.
We call this notation CIDR notation or CIDR block notation. What this really meant was that we didn’t have to express a subnet mask with its old 255.255.255.0. Of course, if you looked at it in binary, this is what it would look like. So for CIDR block notation, we took every place that there was a one, counted up that number. In this case, for this particular subnet mask, there are 24 ones. So we would express this subnet as 192.168.1.1/24.
It’s that /24 that designates the CIDR block notation and the subnet mask for this network. If you were to do the math on this network, you would see that this particular subnet ranged from 192.168.1.0, which is the network address, through 192.168.1.255, which is the broadcast address that gives you 256 separate hosts except we don’t use the network address and we don’t use the broadcast address for host. So we subtract 2 from that, and we have 254 hosts per network.
Here’s another CIDR block notation– 10.1.0.1/16. It’s a similar scenario. We take that old subnet mask of 255.255.0.0. That is 16 ones, thus the /16. And if we do the math, this is the range of IP addresses we would get for this particular subnet.
Of course we don’t have to end a subnet mask at the end of an octet. We’ve separated out in these eight-bit octets up here and on our second choice. But of course, we could use any number of bits we would like to as a subnet mask. That is, after all, one of the benefits of a classless-based subnetting system, instead of the older class-based system.
So we can take this same IP address we used earlier, 10.1.0.1, and we can subnet it with a 26-bit subnet mask. If we were to look at this in binary form you can see that we now have 26 ones. We’re actually two bits into the last octet, which means the remaining six bits would be used for host.
If we were to write this out in decimal, it would be the same thing as saying 255.255.255.192. And doing the math on that, we know that if we take those last six bits, we would have 64 addresses. Of course, one of those is the network address and the other is the broadcast, which gives us a total of 62 addresses per subnet.
Now that we can carve out networks that are exactly the size that we need, let’s look at a practical example of how this was done. Let’s take one particular host 208.130.29..33, and let’s look at historically how that particular device got that IP address.
We’ll start with the internet service provider. The Internet Assigned Numbers Authority provided MCI at the time with a particular block of addresses that it could use. And it’s 22.214.171.124/11, which gave MCI this rest of the address to use for anything that would like to do. And what it did was subnet it out even further.
And it had a customer, Automation Research Systems, that needed a block of addresses for its servers and its customers. So MCI carved out or subnetted further and created a subnet of 126.96.36.199/22. So we went 22 bits into this particular address.
When Automation Research Systems got that, it realized it needed a separate subnet just for its public servers, so it used two additional bits there to create 188.8.131.52/24. And that left the entire final octet– those last eight bits– to be used for IP addresses of servers on that public server subnet, and it gave one to freesoft.org at the time of 184.108.40.206.
And the /32 means we’re using the entire range as a single address for a single device. And that’s how CIDR block notation allows us to create these flexible subnetting schemes so that we can carve out and assign just the right amount of IP address space for what we need.