← Back to Blog
IT Tools • 7 min read • January 15, 2024

CIDR Notation Guide: Complete Tutorial for Network Engineers

Master CIDR notation, subnet mask conversion, and efficient IP address allocation for modern networks.

What is CIDR Notation?

CIDR (Classless Inter-Domain Routing) notation is a method for describing IP networks and their routing prefixes. It replaces the older classful network addressing architecture with a more flexible system that allows for variable-length subnet masking (VLSM).

CIDR Format

IP_ADDRESS/PREFIX_LENGTH

Example: 192.168.1.0/24

Understanding Prefix Length

The prefix length (number after the slash) indicates how many bits are used for the network portion of the address. The remaining bits are used for host addresses.

Common CIDR Prefixes

CIDR Subnet Mask Hosts Use Case
/8 255.0.0.0 16,777,214 Large organizations
/16 255.255.0.0 65,534 Medium networks
/24 255.255.255.0 254 Small networks
/30 255.255.255.252 2 Point-to-point links

Converting Between CIDR and Subnet Masks

Understanding the relationship between CIDR notation and traditional subnet masks is crucial for network configuration:

Conversion Example

CIDR: 192.168.1.0/25

Subnet Mask: 255.255.255.128

Network: 192.168.1.0

Broadcast: 192.168.1.127

Usable Range: 192.168.1.1 - 192.168.1.126

Subnetting Fundamentals

Subnetting divides a large network into smaller, manageable subnetworks. This improves network performance, security, and administration by creating broadcast domains and enabling hierarchical addressing.

Subnetting Benefits

  • Reduced Broadcast Traffic: Smaller broadcast domains improve performance
  • Enhanced Security: Network segmentation isolates traffic
  • Efficient IP Usage: Right-sized subnets prevent IP waste
  • Simplified Management: Logical network organization
  • Scalability: Hierarchical addressing supports growth

Supernetting (Route Aggregation)

Supernetting combines multiple smaller networks into a larger routing prefix, reducing routing table size and improving routing efficiency. This is essential for Internet backbone routing.

Supernetting Example

Aggregating four /26 networks:

192.168.1.0/26 (192.168.1.0 - 192.168.1.63)

192.168.1.64/26 (192.168.1.64 - 192.168.1.127)

192.168.1.128/26 (192.168.1.128 - 192.168.1.191)

192.168.1.192/26 (192.168.1.192 - 192.168.1.255)

Aggregated: 192.168.1.0/24

VLSM (Variable Length Subnet Masking)

VLSM allows different subnet sizes within the same network, maximizing IP address efficiency. This technique is crucial for modern network design and is supported by classless routing protocols.

VLSM Design Process

Starting with 192.168.1.0/24, design subnets by requirements:

Step 1: Largest subnet first

Sales (50 hosts needed): 192.168.1.0/26 (62 usable)

Step 2: Next largest

IT (25 hosts needed): 192.168.1.64/27 (30 usable)

Step 3: Medium subnets

Management (10 hosts): 192.168.1.96/28 (14 usable)

Step 4: Point-to-point links

WAN Links: 192.168.1.112/30, 192.168.1.116/30 (2 usable each)

Routing and Switching Concepts

Layer 2 vs Layer 3 Operations

Layer 2 Switching

  • MAC Address Based: Forwards frames using MAC addresses
  • Broadcast Domain: Single collision domain per port
  • VLAN Support: Virtual LANs for segmentation
  • STP: Spanning Tree Protocol prevents loops
  • Fast Switching: Hardware-based forwarding

Layer 3 Routing

  • IP Address Based: Routes packets using IP addresses
  • Subnet Boundaries: Connects different networks
  • Routing Protocols: OSPF, EIGRP, BGP for path selection
  • TTL Processing: Prevents routing loops
  • Inter-VLAN: Routes between VLANs

Routing Protocol Considerations

Classless Routing Protocols

Modern protocols that support CIDR and VLSM:

OSPF

Link-state, fast convergence, hierarchical design

EIGRP

Hybrid protocol, unequal load balancing

BGP

Path vector, Internet routing, policy-based

Best Practices

  • Plan for Growth: Always allocate more addresses than currently needed
  • Use Consistent Addressing: Develop and follow an IP addressing scheme
  • Document Networks: Maintain accurate network documentation
  • Avoid Overlapping: Ensure subnets don't overlap in routing tables
  • Reserve Addresses: Keep some subnets reserved for future expansion

Tools and Calculators

Use our CIDR Calculator to quickly convert between CIDR notation and subnet masks, or try our IP Subnet Calculator for comprehensive network planning.

Pro Tip: When designing networks, start with the largest subnets first, then subdivide as needed. This prevents address space fragmentation.

Disclaimer: All content, tools, and calculators are provided for informational purposes only. Please verify information from authorized sources before making any decisions.