Network diagram showing CIDR route summarization with multiple routers and aggregated IP networks.

What is Classless Inter-Domain Routing (CIDR)

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.

Network diagram illustrating Classless Inter-Domain Routing (CIDR) route summarization, showing Router1 connecting to Router0 via 10.10.10.0/30, with Router1 aggregating routes from Router2 (172.16.0.0/23), Router3 (172.16.2.0/24), Router4 (172.16.3.0/24), and Router5 (172.16.4.0/22).
What is Classless Inter-Domain Routing (CIDR) 6

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:

Diagram showing CIDR route summarization, displaying IP networks 172.16.0.0, 172.16.2.0, 172.16.4.0, and 172.16.3.0 with their binary representations, aggregated into a single summary route 172.16.0.0/21, highlighting matching bits in green.
What is Classless Inter-Domain Routing (CIDR) 7

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.

Network diagram of CIDR route summarization, showing Router1 (2811) connected to Router0 (2811) via 10.10.10.0/30, with Router1 aggregating routes from Router2 (172.16.0.0/23), Router3 (172.16.2.0/24), Router4 (172.16.3.0/24), and Router5 (172.16.4.0/22), including static route configurations on Router0.
What is Classless Inter-Domain Routing (CIDR) 8

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.

Network diagram of CIDR route summarization, showing Router1 (2811) connected to Router0 (2811) via 10.10.10.0/30, with Router1 aggregating routes from Router2 (172.16.0.0/23), Router3 (172.16.2.0/24), Router4 (172.16.3.0/24), and Router5 (172.16.4.0/22), including commands to remove and add static routes on Router0.
What is Classless Inter-Domain Routing (CIDR) 9

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.

Avatar of Asad Ijaz

Asad Ijaz

NetworkUstad's lead networking architect with CCIE certification. Specializes in CCNA exam preparation and enterprise network design. Authored 2,800+ technical guides on Cisco systems, BGP routing, and network security protocols since 2018. Picture this: I'm not just someone who writes about tech; I'm a certified expert in the field. I proudly hold the titles of Cisco Certified Network Professional (CCNP) and Cisco Certified Network Associate (CCNA). So, when I talk about networking, I'm not just whistling in the dark; I know my stuff! My website is like a treasure trove of knowledge. You'll find a plethora of articles and tutorials covering a wide range of topics related to networking and cybersecurity. It's not just a website; it's a learning hub for anyone who's eager to dive into the world of bits, bytes, and secure connections. And here's a fun fact: I'm not a lone wolf in this journey. I'm a proud member and Editor of Team NetworkUstad. Together, we're on a mission to empower people with the knowledge they need to navigate the digital landscape safely and effectively. So, if you're ready to embark on a tech-savvy adventure, stick around with me, Asad Ijaz Khattak. We're going to unravel the mysteries of technology, one article at a time!"