CIDR notation uses a prefix length to specify the number of bits in the network portion of an IP address, allowing for more flexible subnet masks than the classful system.
CIDR (introduced in 1993) replaced the original classful IP addressing system to solve address exhaustion and routing table expansion issues.
Feature | Classful Addressing | CIDR (Classless) |
---|---|---|
Subnet Mask | Fixed by class (A: /8, B: /16, C: /24) | Variable from /1 to /32 |
Boundary Constraints | Network size tied to class boundaries | Networks can be any size |
Address Space Usage | Often wasteful (e.g., Class A = 16M addresses) | More efficient, right-sized allocations |
Notation | Class identifier + network ID | Network address/prefix (e.g., 192.168.1.0/24) |
Supernetting | Not supported | Supported (combining smaller networks) |
Subnetting | Limited by class boundaries | Flexible for different network sizes |
Routing Tables | Larger, less efficient | Smaller, route aggregation possible |
CIDR Block | Addresses | Class Equivalent |
---|---|---|
/8 | 16,777,216 | Class A |
/16 | 65,536 | Class B |
/24 | 256 | Class C |
/27 | 32 | ⅛ of Class C |
/28 | 16 | 1/16 of Class C |
/29 | 8 | 1/32 of Class C |
/30 | 4 | 1/64 of Class C |
/31 | 2 | Point-to-point |
/32 | 1 | Single host |
Route Aggregation Example: Instead of advertising multiple routes (192.168.0.0/24, 192.168.1.0/24, etc.), CIDR allows advertising a single aggregate route (192.168.0.0/16).
CIDR Notation: network-address/prefix-length
Example: 192.168.1.0/24 means the first 24 bits are the network portion
Example 1: A company with 500 devices might use a /23 network (512 IPs)
Example 2: A small office with 20 devices might use a /27 network (32 IPs)
Example 3: A point-to-point link between routers might use a /30 network (4 IPs)