1.7 Given a scenario, use appropriate IPv4 network addressing
Subnetting
📘CompTIA Network+ (N10-009)
1. What is CIDR?
CIDR stands for Classless Inter-Domain Routing.
It is a method used to allocate IP addresses more efficiently than the old system, which was based on IP classes (Class A, B, C). CIDR allows networks to be divided into smaller or larger segments without being limited to the traditional class sizes.
- Old “classful” IP addressing wasted IP addresses.
- CIDR solves this by letting network administrators define prefix lengths that fit the actual number of hosts needed.
2. How CIDR Works
CIDR replaces the old “Class A/B/C” system with a prefix notation, also called CIDR notation.
Format:
IP_address/prefix_length
- IP_address: the network address (e.g., 192.168.1.0)
- prefix_length: number of bits used for the network portion (e.g., /24)
Example:
192.168.1.0/24
- /24 means the first 24 bits are the network part.
- The remaining 8 bits are for host addresses.
- This allows for 256 IP addresses (2^8), minus 2 reserved addresses (network and broadcast), so 254 usable hosts.
3. CIDR vs Classful Addressing
| Feature | Classful | CIDR |
|---|---|---|
| Network Sizes | Fixed: A, B, C | Flexible, any size |
| Efficiency | Can waste IPs | Uses IPs efficiently |
| Notation | 192.168.1.0 (class implied) | 192.168.1.0/24 (prefix defines size) |
| Routing | More routes needed | Aggregation possible (fewer routes) |
Key point: CIDR allows you to create networks that exactly match your needs without wasting IP addresses.
4. Calculating Networks with CIDR
To calculate networks, you need to understand how prefix length affects the number of hosts.
Formula for Hosts per Network
Number of hosts = 2^(32 - prefix_length) - 2
- Subtract 2 for network address and broadcast address.
Example:
IP: 10.0.0.0/28
Prefix length: 28
Host bits = 32 - 28 = 4
Number of hosts = 2^4 - 2 = 14 usable hosts
Example:
IP: 192.168.1.0/26
Host bits = 32 - 26 = 6
Number of hosts = 2^6 - 2 = 62 usable hosts
5. Why CIDR is Used in IT Networks
CIDR has several practical IT uses:
- Efficient IP allocation:
A company can create multiple subnets of the exact size they need.- Example: One subnet for 50 devices, one for 200 devices, without wasting IPs.
- Route aggregation:
- Multiple smaller networks can be grouped into a single routing table entry.
- Example: Instead of routing each /24 separately, you could route 192.168.0.0/22 to cover 192.168.0.0 to 192.168.3.255.
- Supports modern internet:
- The internet uses CIDR to prevent routing tables from becoming too large.
- Subnetting within an organization:
- IT administrators can segment departments efficiently:
- /28 for small labs
- /24 for medium departments
- /22 for large branches
- IT administrators can segment departments efficiently:
6. CIDR Notation Cheat Sheet for Exam
| CIDR | Host Bits | Usable Hosts | Network Size |
|---|---|---|---|
| /30 | 2 | 2 | Point-to-point links |
| /29 | 3 | 6 | Small subnet |
| /28 | 4 | 14 | Small subnet |
| /27 | 5 | 30 | Medium subnet |
| /26 | 6 | 62 | Medium subnet |
| /25 | 7 | 126 | Large subnet |
| /24 | 8 | 254 | Typical office subnet |
| /23 | 9 | 510 | Large office or lab |
| /22 | 10 | 1022 | Very large subnet |
TIP for the exam: Know /24, /26, /28, /30 for subnetting questions.
7. Key Exam Points about CIDR
- CIDR replaces classful addressing.
- It uses prefix length (/xx) instead of class A/B/C.
- Efficient IP allocation → no wasted addresses.
- Allows subnetting and route aggregation.
- Formula for usable hosts:
2^(32 - prefix) - 2 - Common CIDR prefixes for subnetting practice: /30, /28, /26, /24.
8. Real IT Environment Example (for clarity)
Imagine an IT administrator managing an office network:
- The HR department has 25 employees → assign 192.168.1.0/27 (30 usable IPs).
- The IT lab has 10 devices → assign 192.168.1.32/28 (14 usable IPs).
- The Main office has 200 employees → assign 192.168.0.0/24 + 192.168.1.0/24 or a single /23 subnet (510 hosts).
CIDR makes it easy to fit each subnet to the exact number of devices, saving IP addresses and simplifying routing.
✅ Summary:
CIDR is about flexibility and efficiency. It’s essential for subnetting in modern networks and is heavily tested in Network+ exams. Understanding how to calculate host ranges, usable addresses, and applying prefix lengths is key to passing the exam.
