For example, a class A network could accommodate over 16 million hosts, but only 128 (0-127) of these networks were available. In class B, on the other hand, slightly more than 16,000 networks were possible, but each network could contain 65,534 hosts. The networks in class C only had an octet left and could only accommodate 254 (1-254, since 0 and 255 are always reserved) hosts.
This shows that the classification just wasn’t practical in most cases. For many companies, a network with only 254 participants was far too small, but several thousands of hosts need the fewest networks. This ultimately led to a lot of waste, since companies inevitably had to collect unused addresses. To meet the needs of internet users better, it was decided to make the network sizes more flexible, to reduce the size of routing tables in internet routers, and to slow down the decrease in the number of available IP addresses.
Routing tables are located in a router and help find the way to the correct destination address. Data packets pass through many nodes from origin to destination. For routers to recognize what the optimal path through the network looks like, a corresponding table is fed with information. The size of the file grows exponentially when a path has to be introduced for every possible target. Since CIDR assembles addresses into blocks, it is no longer necessary to store so much information in the routing tables. This means that several addresses are combined into one route.