Does CIDR Eliminate IP Address Classes? – Routing Explained

ipipv4route-summarizationrouting

I am still struggling to understand to what extent CIDR really renders IP address classes obsolete. Here's what I understood so far:

  1. It's ridiculously inefficient (and impossible, too) to assign every organization that needs to address more than 255 hosts a class B address, which could technically address 65535 hosts.

  2. However, if such an organization needed to address, say, approximately 700 hosts, one could just assign three (preferably contiguous) class C network addresses to that organization. E.g.:

    192.42.42
    192.42.43
    192.42.44
    
  3. Problem: For that one organization, routers would have to store three entries in their forwarding tables, which won't scale.

  4. CIDR solves this problem by introducing route summarization/aggregation, enabling the ISP that assigned the three class C networks to the organization to advertise only one prefix to the rest of the world. E.g.,

    192.42.42.0/21
    

So far, so good. However, I just can't grasp why every resource I touch claims that classful addressing is "a thing of the past". After all, the ISP is in charge of, say, class C network addresses, and does assign these to its customers. CIDR just fixes the problem of multiple entries in the forwarding tables, right? Thus, IP address classes are still around, are they not?

Exam's coming up, so help is much appreciated. 😛

Best Answer

Address delegation really used to happen in three sizes: class A, B and C. Class A delegations would be given from a certain address range, class B delegations from a different range etc. Because the different classes used different address ranges you could determine the class by looking at the first part of an address. And this was built into the routing protocols.

  • Class A delegations contained 16777216 addresses each
  • Class B delegations contained 65536 addresses each
  • Class C delegations contained 256 addresses each

This was very inefficient for networks that didn't fit these sizes. A network that needed 4096 addresses would either get sixteen Class C delegations (which would be bad for the global routing table because each of them would have to be routed separately: the class size was built into the protocol) or they would get one Class B delegation (which would waste a lot of addresses).

In 1993 CIDR was introduced. The protocols were adjusted to be able to deal with prefixes of different sizes and it became possible to route (both internally and externally) prefixes like a /30 or a /21 or a /15 etc etc. Anything between /0 and /32 became possible. Organisations that needed 2048 addresses could get a /21: exactly what they would need.

The way you could internally subdivide those addresses was also limited. There were rules on how you could subnet. Originally each subnet within your classful network had to be the same size. You need one subnet with 128 addresses and another subnet with 16 addresses: too bad.

Variable Length Subnet Masking (VLSM) is the internal-network equivalent of CIDR. VLSM has existed longer than CIDR. It was already mentioned in 1985. So CIDR is basically extending VLSM to inter-domain routing. With VLSM your subnets don't all have to be the same size anymore. You can assign a different number of addresses for each subnet, depending on your needs.

These days all routing on the internet is done without classes. A prefix in the routing table might by coincidence (or because of history) match the classful structure, but protocols will no longer assume they can deduce the prefix length (subnet mask) from the first part of the address. All prefix lengths are explicitly communicated: classless.

Saying that an ISP is in charge of a Class C network is similarly obsolete. Addresses are distributed completely classless by the RIRs (Regional Internet Registries, the organisations responsible for delegating addresses to ISPs and businesses with their own independent addresses).

IPv4 addresses classes really don't exist anymore, and have been deprecated in 1993. If you look at old obsolete routing protocols you can of course still see the assumptions they made based on address class, but that was 20 years ago...