The IETF introduced RFC 1517 in 1993, introducing classless inter-domain routing (CIDR). The CIDR replaced the old classful network assignments. The classful address has now become obsolete due to the CIDR scheme.
The CIDR network address is determined by the subnet mask instead of the value of the address’s first octet. The network and host portions of the IP address are also determined by the subnet mask, which is called the network prefix. The network prefix is also known as prefix lengths such as /16, /17, /25, and /30.
The ISPs are no longer bound only to the 8/16 or /24 subnet mask. They can now assign IP addresses more efficiently using any prefix length. Now, the ISPs can assign IP address blocks according to the customers’ requirements, from a few hosts to hundreds or thousands of hosts. The CIDR also reduces the routing table size and manages the IPv4 address space more efficiently using Route summarization and supernetting.
Route Summarization and Supernetting
Route summarizations, also known as prefix aggregation, combine multiple routes into a single route to reduce the size of routing tables. For example, one summary static route can change several specific static route statements.
The figure below illustrates the route summarization. Router1 has 5 different routes. Each network has a different IP address network. All networks can be summarized into a single network to Router0.
The 172.16.0.0/21 summarized or aggregated route includes all the networks belonging to Router2, Router3, Router4, and Router5. To summarize this type of route, suppernetting is required. A supernet summarizes multiple network addresses with a smaller mask than the classful mask.
Supernetting is required when the route summarization mask is less than the default traditional classful mask. The supernet is always a route summary, but a route summary is not always a supernet. The procedure to determine a summary route is the following:
- Convert all network addresses into binary format.
- Count the number of far-left matching bits to identify the summarised route’s prefix length or subnet mask.
- Copy the matching bits and add zero to the remaining places to determine the summarized network address.
This address and subnet mask can now be used as a summary route for all the networks. We can configure Summary routes for both static routes and classless routing protocols. The figure below illustrates the summary routing procedure:
Static Routing Classless Inter-Domain Routing (CIDR) Example
The smaller routing tables make the routing table lookup process easy, fast, and efficient because there are fewer routes to search. So, if we use a single static route instead of multiple static routes, the size of the routing table is reduced.
A single static route can efficiently represent dozens, hundreds, or even thousands of routes. It is possible to configure a summary static route using CIDR.
In the Figure below, Router0 has been configured to reach the identified networks in the topology. Though acceptable, configuring a summary static route would be more efficient.
Figure 2 shows route aggregation using CIDR summarization. The four static route entries were reduced to 172.16.0.0/21 entries. The example below removes the six static route entries and replaces them with a static route summary.
Classless Routing Protocol Example
In the classful routing protocols, the receiving router automatically applies the default subnet mask to the network address in the routing table. If the topology in the figure contained a classful routing protocol, then Router0 would only install 172.16.0.0/16 in the routing table.
Variable Length Subnet Mask(VLSM) and supernet routes needed classless routing protocols such as RIPv2, OSPF and EIGRP. Classless routing protocols advertise network addresses with their associated subnet masks. When a supernet route is in a routing table, such as a static route, a classful routing protocol does not include that route in its updates.
FAQs
What is Classless Inter-Domain Routing (CIDR)?
Classless Inter-Domain Routing (CIDR) was introduced by the IETF in 1993 via RFC 1517 to replace obsolete classful addressing. It uses subnet masks as network prefixes (e.g., /16, /25) for flexible IP allocation, allowing ISPs to assign blocks based on needs from few to thousands of hosts. This enhances IPv4 efficiency and reduces routing tables.
What are the benefits of CIDR?
CIDR improves IPv4 address space management by enabling variable prefix lengths, unlike fixed classful masks. It reduces routing table sizes through summarization and supernetting, supports VLSM in protocols like OSPF and EIGRP, and allows efficient allocation for customers, minimizing waste and simplifying global routing.
How does route summarization work in CIDR?
Route summarization aggregates multiple routes into one by converting network addresses to binary, counting matching leftmost bits for the prefix length, and filling remaining bits with zeros. For example, networks under 172.16.0.0/21 can summarize routes from several routers, reducing entries and speeding up lookups
What is supernetting in CIDR?
Supernetting is a form of route summarization using a mask smaller than the default classful one to combine networks. It’s essential when summarizing requires a supernet, like aggregating class C networks. Unlike general summarization, supernetting always involves class boundaries, aiding in efficient routing table management.
How is CIDR used in static routing?
In static routing, CIDR allows summary routes to replace multiple specific entries. For instance, four routes to different networks can be aggregated into 172.16.0.0/21, pointing to one next-hop. This simplifies configuration, reduces table size, and improves efficiency over classful methods.