Introduction

CIDR (Classless Inter-Domain Routing) notation replaced the old classful IP addressing system. It provides a flexible way to specify IP address ranges and subnet masks in a compact format.

What is CIDR?

CIDR uses slash notation to specify how many bits are used for the network portion:

192.168.1.0/24

              └─ 24 bits for network, 8 bits for hosts

Breaking Down CIDR

192.168.1.0/24:

  • Network bits: 24
  • Host bits: 8 (32 - 24)
  • Subnet mask: 255.255.255.0
  • Number of hosts: 2^8 - 2 = 254

CIDR vs Traditional Subnet Masks

Traditional Notation

IP Address:  192.168.1.0
Subnet Mask: 255.255.255.0

CIDR Notation

192.168.1.0/24

Advantages:

  • More compact
  • Easier to calculate
  • Flexible (any number of bits)

Common CIDR Blocks

CIDRSubnet MaskHostsNetworksUse Case
/8255.0.0.016M+1Very large networks
/16255.255.0.065K256Large organizations
/24255.255.255.025465KSmall networks
/32255.255.255.25514BSingle host

Calculating CIDR

From Subnet Mask

Subnet Mask: 255.255.255.0
Binary:      11111111.11111111.11111111.00000000
Bits:        8 + 8 + 8 + 0 = 24
CIDR:        /24

Number of Hosts

Hosts = 2^(32 - CIDR) - 2

Examples:

  • /24: 2^8 - 2 = 254 hosts
  • /25: 2^7 - 2 = 126 hosts
  • /30: 2^2 - 2 = 2 hosts

Tools

Use our tools:

Conclusion

CIDR notation simplifies IP addressing:

Key concepts:

  • Slash notation
  • Network vs host bits
  • Flexible addressing
  • Modern standard

Benefits:

  • Compact notation
  • Easy calculations
  • Flexible subnetting
  • Efficient routing

Next Steps