What Is CIDR Notation in IP Addressing? (With Simple Examples)
If you are learning networking, preparing for CCNA or CCNP, or working as a network engineer, you have probably seen IP addresses written like this:
192.168.1.0/24 10.0.0.0/16 172.16.0.0/12But what does the “/24” mean?
That slash number is called CIDR notation, and it plays a major role in modern IP networking. In this guide, you will learn:
What CIDR notation is
Why it replaced classful IP addressing
How it works (in simple terms)
How to calculate IP ranges using CIDR
Real examples you can use in exams and real networks
Let’s break it down step by step.
What Is CIDR Notation?
CIDR stands for Classless Inter-Domain Routing.
CIDR notation is a method of representing an IP address along with its network prefix.
The format looks like this:
IP Address / Prefix Length Example:
192.168.1.0/24The number after the slash (/) tells us how many bits are used for the network portion of the IP address.
Simple Definition (Featured Snippet Style)
CIDR notation is a way to represent an IP address and its network size using a slash (/) followed by the number of network bits.
Why CIDR Was Introduced
Before CIDR, networks used classful IP addressing, which divided IP addresses into fixed classes:
Class A
Class B
Class C
Each class had a fixed subnet mask:
Class A → 255.0.0.0
Class B → 255.255.0.0
Class C → 255.255.255.0
The Problem with Classful Addressing
It caused huge IP address wastage.
Example:
If a company needed 300 IP addresses:
Class C (254 hosts) → Not enough
Class B (65,534 hosts) → Too many
There was no middle option.
CIDR solved this by allowing flexible subnet sizes.
Understanding IP Address Structure First
Before understanding CIDR fully, let’s quickly revise IPv4 basics.
An IPv4 address:
Is 32 bits long
Divided into 4 octets
Each octet = 8 bits
Example:
192.168.1.1In binary, it looks like this:
11000000.10101000.00000001.00000001An IP address has two parts:
Network portion
Host portion
CIDR tells us exactly how many bits belong to the network.
How CIDR Notation Works
Let’s understand using a simple example:
Example: 192.168.1.0/24
The “/24” means:
24 bits are for the network
Remaining 8 bits are for hosts
Since IPv4 has 32 bits total:
32 – 24 = 8 host bitsSubnet Mask Equivalent
/24 means:
255.255.255.0Because:
24 network bits = 11111111.11111111.11111111.00000000
How to Calculate Number of IP Addresses
Formula:
2^(Number of Host Bits)Usable Hosts:
2^(Host Bits) – 2 (We subtract 2 for network address and broadcast address.)
Simple CIDR Examples (Step-by-Step)
Example 1: 192.168.1.0/24
Host bits = 8
Total IP addresses = 2⁸ = 256
Usable hosts = 256 – 2 = 254
Range:
Network address: 192.168.1.0
First usable: 192.168.1.1
Last usable: 192.168.1.254
Broadcast: 192.168.1.255
This is commonly used in small office networks.
Example 2: 10.0.0.0/16
Host bits:
32 – 16 = 16Total IPs:
2¹⁶ = 65,536Usable:
65,536 – 2 = 65,534Subnet mask:
255.255.0.0This is often used in enterprise or large internal networks.
Example 3: 192.168.1.0/30
Host bits:
32 – 30 = 2Total IPs:
2² = 4Usable:
4 – 2 = 2 usable IP addressesRange:
Network
2 usable IPs
Broadcast
This is commonly used in point-to-point router links.
CIDR vs Classful IP Addressing
| Feature | Classful Addressing | CIDR |
|---|---|---|
| Network Size | Fixed | Flexible |
| IP Wastage | High | Low |
| Efficiency | Poor | High |
| Modern Usage | Obsolete | Standard Today |
CIDR allows network administrators to allocate IP addresses based on actual need.
This helps conserve IPv4 addresses.
CIDR and Route Summarization
CIDR is very important in routing.
Routers use something called:
Longest Prefix Match
Example:
If a router has:
192.168.0.0/16 192.168.1.0/24It chooses the most specific route (/24).
CIDR also allows route aggregation (supernetting).
Example:
Instead of advertising:
192.168.1.0/24 192.168.2.0/24 192.168.3.0/24We can summarize them as:
192.168.0.0/22This reduces routing table size and improves performance.
Protocols that use CIDR:
OSPF
EIGRP
BGP
IS-IS
CIDR in Cloud Networking
If you use AWS, Azure, or GCP, you will see CIDR everywhere.
Example:
When creating a VPC, you must define:
10.0.0.0/16Subnets might be:
10.0.1.0/24 10.0.2.0/24Cloud networking completely depends on CIDR-based addressing.
Common CIDR Mistakes
Thinking /24 means 24 hosts (Wrong)
Forgetting to subtract network & broadcast
Mixing subnet mask and prefix length
Not understanding binary boundaries
Calculation errors in exams
Practice is the key to mastering CIDR.
Conclusion
CIDR notation is a flexible and efficient way to represent IP networks.
It:
Eliminates classful IP limitations
Conserves IP addresses
Enables route summarization
Improves routing efficiency
Powers modern enterprise and cloud networks
Understanding CIDR is essential for every networking student and professional.
If you want to master CIDR, start practicing:
/24
/25
/26
/27
/28
/29
/30
The more you calculate, the easier it becomes.
Frequently Asked Questions
What does /24 mean in CIDR notation?
It means 24 bits are used for the network portion and 8 bits for hosts.
How many IP addresses are in /30?
4 total IP addresses, 2 usable.
Is CIDR used in IPv6?
Yes. IPv6 also uses prefix notation like:
2001:db8::/64 How do you convert subnet mask to CIDR?
Count the number of 1s in the subnet mask.
Example:
255.255.255.0 = /24 Why did CIDR replace classful addressing?
Because classful addressing wasted IP addresses and was inefficient.
Why CIDR Notation Is Important for Networking Students
If you are preparing for:
CCNA
CCNP
Network interviews
Cloud certifications
CIDR is a fundamental concept.
Without CIDR knowledge, you cannot:
Perform subnetting
Design networks
Configure routing protocols
Plan IP addressing
0 Comments