Classless Interdomain Routing
CIDR is a mechanism developed to help alleviate the problem of exhaustion of IP addresses and growth of routing tables. The idea behind CIDR is that blocks of multiple addresses (for example, blocks of Class C address) can be combined, or aggregated, to create a larger classless set of IP addresses, with more hosts allowed. Blocks of Class C network numbers are allocated to each network service provider; organizations using the network service provider for Internet connectivity are allocated subsets of the service provider's address space as required. These multiple Class C addresses can then be summarized in routing tables, resulting in fewer route advertisements. (Note that the CIDR mechanism can be applied to blocks of Class A, B, and C addresses; it is not restricted to Class C.)
CIDR is described further in RFC 1518, An Architecture for IP Address Allocation with CIDR, and RFC 1519, Classless Inter-Domain Routing (CIDR): An Address Assignment and Aggregation Strategy, available at http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc1519.html. RFC 2050, Internet Registry IP Allocation Guidelines, specifies guidelines for the allocation of IP addresses. It is available at http://www.cis.ohio-state.edu/cgi-bin/rfc/rfc2050.html.
Most CIDR debates revolve around summarizing blocks of Class C networks into large blocks of addresses. As a general rule, Internet service providers (ISPs) implement a minimum route advertisement standard of /19 address blocks. A /19 address block equals a block of 32 Class C networks. (In some cases, smaller blocks might be advertised, such as with a /21 mask [eight Class C networks].) Addressing is now so limited that networks such as 22.214.171.124/8 are being divided into blocks of /19 that are assigned to major ISPs, which allows further allocation to customers. CIDR combines blocks of addresses regardless of whether they fall within a single classful boundary or encompass many classful boundaries.
Figure 1-20 shows an example of CIDR and route summarization. The Class C network addresses 192.168.8.0/24 through 192.168.15.0/24 are being used and are being advertised to the ISP router. When the ISP router advertises the available networks, it can summarize these into one route instead of separately advertising the eight Class C networks. By advertising 192.168.8.0/21, the ISP router indicates that it can get to all destination addresses whose first 21 bits are the same as the first 21 bits of the address 192.168.8.0.
Figure 1-20 CIDR Allows a Router to Summarize Multiple Class C Addresses
The mechanism used to calculate the summary route to advertise is the same as shown in the "Route Summarization" section. The Class C network addresses 192.168.8.0/24 through 192.168.15.0/24 are being used and are being advertised to the ISP router. To summarize these addresses, find the common bits, as shown here (in bold):
The route 192.168.00001xxx.xxxxxxxx or 192.168.8.0/21 (also written as 192.168.8.0 255.255.248.0) summarizes these eight routes.
In this example, the first octet is 192, which identifies the networks as Class C networks. Combining these Class C networks into a block of addresses with a mask of less than /24 (the default Class C network mask) indicates that CIDR, not route summarization, is being performed.
Key Point: CIDR Versus Route Summarization
The difference between CIDR and route summarization is that route summarization is generally done within, or up to, a classful boundary, whereas CIDR combines several classful networks.
In this example, the eight separate 192.168.x.0 Class C networks that have the prefix /24 are combined into a single summarized block of 192.168.8.0/21. (At some other point in the network, this summarized block may be further combined into 126.96.36.199/16, and so on.)
Consider another example. A company that uses four Class B networks has the IP addresses 172.16.0.0/16 for Division A, 172.17.0.0/16 for Division B, 172.18.0.0/16 for Division C, and 172.19.0.0/16 for Division D. They can all be summarized as a single block: 172.16.0.0/14. This one entry represents the whole block of four Class B networks. This process is CIDR; the summarization goes beyond the Class B boundaries.