CIDR (Classless Inter-Domain Routing) Demonstration

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 Network Analysis

Prefix Length: 24

Classful vs CIDR Addressing

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
Common CIDR Blocks
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
CIDR Benefits
  • Address Conservation: Assign only the number of addresses needed
  • Routing Efficiency: Route aggregation reduces routing table size
  • Flexible Subnetting: Create networks of any size
  • Hierarchical Addressing: Better organization of network space
  • Supernetting: Combine multiple networks with a single route

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

Common CIDR Use Cases

Private Network Addressing

  • 10.0.0.0/8 - Large enterprise networks
  • 172.16.0.0/12 - Medium networks, VPNs
  • 192.168.0.0/16 - Home/small business networks

Subnet Examples

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)