CIDR is a convention defined in RFC 1817 (www.ietf.org/rfc/rfc1817.txt) that calls for aggregating multiple network numbers into a single routing entity. CIDR actually was created to help the scalability of Internet routers—imagine a router in the Internet with a route to every Class A, B, and C network on the planet! There are actually a little more than two million Class C networks alone! By aggregating the routes, Internet routers have a significantly smaller number of routes in their routing tables.
Figure 12-5 shows a typical case of how CIDR might be used to consolidate routes to multiple Class C networks into a single route.
Figure 12-5 Typical Use of CIDR
Figure 12-5 Typical Use of CIDR
Imagine that ISP 1 owns Class C networks 22.214.171.124 through 126.96.36.199 (they might look funny, but they are valid Class C network numbers). Without CIDR, all other ISPs' routing tables would have a separate route to each of the 216 Class C networks that begin with 198. With CIDR, as the illustration shows, the other ISPs' routers will have a single route to 188.8.131.52/8—in other words, a route to all hosts whose IP address begins with 198. More than two million Class C networks alone exist, but CIDR has helped Internet routers reduce their routing tables to a more manageable size, in the range of 120,000 routes by mid-2003.
By using a routing protocol that exchanges the mask as well as the subnet/network number, a classless view of the number can be attained. In other words, routers treat the grouping as a math problem, ignoring the Class A, B, and C rules. For instance, 184.108.40.206/8 (220.127.116.11, mask 255.0.0.0) defines a set of addresses whose first 8 bits are equal to decimal 198. This route is advertised by ISP 1 to the other ISPs, which need a route only to 18.104.22.168/8. In its routers, ISP 1 knows which Class C networks are at which customer sites. This is how CIDR gives Internet routers a much more scalable routing table, by reducing the number of entries in the tables.
For CIDR to work as shown in Figure 12-5, ISPs need to be in control of consecutive network numbers. Today IP networks are allocated by administrative authorities for various regions of the world, which, in turn, allocate consecutive ranges of network numbers to particular ISPs in those regions. This allows summarization of multiple networks into a single route, as shown in Figure 12-5.
CIDR also helps to reduce the chance that we will run out of IP addresses for new companies connecting to the Internet. CIDR also allows an ISP to allocate a subset of a Class A, B, or C network to a single customer. For instance, imagine that ISP 1's Customer 1 needs only 10 IP addresses and that Customer 3 needs 25 IP addresses. So, ISP 1 does something like this: It assigns IP subnet 22.214.171.124/28, with assignable addresses 198.8.17 to 198.8.30, to Customer 1. For Customer 3, ISP 1 suggests 126.96.36.199/27, with 30 assignable addresses (188.8.131.52 to 184.108.40.206). (Feel free to check the math with the IP addressing algorithms listed earlier.)
CIDR helps prevent the wasting of IP addresses, thereby reducing the need for registered IP network numbers. Instead of the two customers consuming two whole Class C networks, each consumes a small portion of a single Class C network. At the same time, CIDR, along with the intelligent administration of consecutive network numbers to each ISP, allows the Internet routing table to support a much smaller routing table in Internet routers than otherwise would be required.
Was this article helpful?