Skip to content

📘 08-05: CIDR (Classless Inter-Domain Routing)

Network Systems

Module 08: Subnets and VLANs

Home All Notes Practice Quiz

❓ What is CIDR?

CIDR (Classless Inter-Domain Routing) is a method of IP address allocation that allows flexible network boundaries.

It replaces classful networking by removing fixed classes (A, B, C) and allowing networks to be defined using prefix lengths.


💡 Why CIDR is Needed

Classful networking had several limitations: - fixed network sizes (/8, /16, /24)
- inefficient use of IP addresses
- lack of flexibility

CIDR solves these issues by: - allowing variable-length subnet masks
- enabling efficient allocation of IP addresses


📌 CIDR Notation

CIDR represents an IP address using a prefix length.

Format:

IP Address / Prefix Length

Example: - 192.168.1.0/24
- 10.0.0.0/8
- 172.16.0.0/16


📌 Understanding Prefix Length

The prefix length indicates the number of bits used for the network portion.

  • /24 → first 24 bits = network
  • /16 → first 16 bits = network
  • /8 → first 8 bits = network

The remaining bits are used for hosts.


🧮 CIDR and Subnet Mask

CIDR notation corresponds directly to a subnet mask.

CIDR Subnet Mask
/8 255.0.0.0
/16 255.255.0.0
/24 255.255.255.0
/26 255.255.255.192

📌 Binary Representation

CIDR uses continuous 1s to represent the network portion.

Example: /26

11111111.11111111.11111111.11000000

  • First 26 bits → Network
  • Last 6 bits → Host

📌 CIDR vs Classful Networking

Feature Classful CIDR
Network sizes Fixed Flexible
Efficiency Low High
Subnetting Limited Fully supported
Address usage Wasteful Optimized

🧮 CIDR and Subnetting

CIDR is the foundation of subnetting.

Subnetting works by: - increasing the prefix length
- borrowing bits from the host portion

Example: - 192.168.1.0/24 → original network
- 192.168.1.0/26 → subnetted network

👉 Prefix increases → more subnets, fewer hosts per subnet


🧭 CIDR in Routing

CIDR is also used in routing to summarize networks.

Example:

Instead of multiple routes: - 192.168.1.0/24
- 192.168.2.0/24
- 192.168.3.0/24

We can summarize as: - 192.168.0.0/22

👉 This reduces routing table size and improves efficiency.


💡 Key Idea

CIDR removes fixed class boundaries,

👉 allowing networks to be defined using flexible prefix lengths.

This makes modern networking: - scalable
- efficient
- adaptable