CIDR

This article is not assessed by the IB but may be helpful to deepen your understanding. Plus, I think it's cool.

The Big Idea

CIDR, or Classless Inter-Domain Routing, is a modern method used to allocate IP addresses and manage routing efficiently. Before CIDR, networks used classful addressing, where IP addresses were divided into fixed classes (A, B, C, etc.) with predefined subnet masks. This approach wasted many IP addresses. CIDR replaced it by allowing networks to use variable-length subnet masks (VLSM)—so instead of rigid classes, networks could be sized exactly as needed.

CIDR notation looks like this:
192.168.10.0/24

The “/24” means that the first 24 bits of the IP address represent the network portion, and the remaining 8 bits represent the host portion.

  • Network portion: The part of the IP address (the leftmost bits) that identifies the specific network. All devices on the same network share the same network portion. Routers use this part to decide where to forward packets.
  • Host portion: The part of the IP address (the remaining rightmost bits) that identifies a specific device (host) within that network. These bits are unique for each device on the same network.

In the example 192.168.10.0/24,

  • the first 24 bits are the network portion,
  • and the last 8 bits are the host portion,
    which together define how many unique device addresses can exist within that subnet.

Why CIDR Matters

  • Efficient allocation: Reduces IP waste by allowing custom-sized networks.
  • Simplified routing: Combines multiple smaller networks into one route (route aggregation).
  • Scalability: Supports modern hierarchical routing systems used in the internet backbone.

Worked Example: 192.168.10.0/26

Let’s explain step-by-step how CIDR works using a specific example.

Step 1: Interpret the CIDR notation

  • CIDR block: 192.168.10.0/26
  • The “/26” means 26 bits are for the network ID.
  • The remaining (32 − 26 = 6 bits) are for hosts.

Step 2: Calculate the number of hosts

  • Number of host addresses = 2⁶ − 2 = 62 usable hosts.
    (The subtraction of 2 accounts for the network address and broadcast address.)

Step 3: Determine the subnet mask

  • /26 corresponds to 255.255.255.192 because:
    • The first three octets (24 bits) are full: 255.255.255.
    • The remaining 2 bits in the fourth octet are 1s:
      • 11000000 = 192.

Step 4: Find subnet boundaries

Each subnet increases by 64 in the fourth octet (since 256 − 192 = 64).

SubnetNetwork AddressUsable RangeBroadcast Address
1192.168.10.0192.168.10.1 – 192.168.10.62192.168.10.63
2192.168.10.64192.168.10.65 – 192.168.10.126192.168.10.127
3192.168.10.128192.168.10.129 – 192.168.10.190192.168.10.191
4192.168.10.192192.168.10.193 – 192.168.10.254192.168.10.255

Each subnet provides 62 usable IPs—ideal for small departmental networks.


CIDR and Aggregation

Suppose an ISP owns four subnets:
192.168.10.0/26, 192.168.10.64/26, 192.168.10.128/26, and 192.168.10.192/26.

These can be aggregated into one 192.168.10.0/24 route.
This reduces routing table entries and makes internet routing more scalable.


Command Term Focus: EXPLAIN

In the IB context, Explain means “give a detailed account including reasons or causes.”

  • A strong response clearly connects subnet size, mask length, and usable hosts.
    • Example (strong): “A /26 network provides 64 addresses because 2⁶ = 64. Two are reserved for network and broadcast, leaving 62 usable.”
  • A weak response might only restate facts without reasoning.
    • Example (weak): “/26 has 62 hosts.”

 

Summary

ConceptExplanation
CIDR NotationUses a slash and number to show how many bits define the network.
Subnet MaskDerived directly from the CIDR prefix (e.g., /26 → 255.255.255.192).
Hosts per SubnetCalculated as 2^(host bits) − 2.
BenefitsEfficient IP use, flexible subnetting, and reduced routing complexity.

 

Key Takeaway

CIDR made IP networking scalable and efficient. By allowing networks to use only as many addresses as needed, it preserved the IPv4 address space and laid the groundwork for modern hierarchical internet routing