🧮 Subnetting Mastery 6 min de lectura

Subnetting Cheat Sheet and Quick Reference

A comprehensive subnetting cheat sheet covering CIDR notation, subnet masks, host counts, and quick-reference tables for IPv4 and IPv6.

The Classful Era

In the early internet, IP addresses were divided into five classes based on the first few bits of the address. Three of these classes were used for general networking:

Class First Octet Default Mask Networks Hosts/Network
A 1 -- 126 /8 (255.0.0.0) 126 16,777,214
B 128 -- 191 /16 (255.255.0.0) 16,384 65,534
C 192 -- 223 /24 (255.255.255.0) 2,097,152 254

Class D (224--239) was reserved for multicast, and Class E (240--255) for experimental use.

The Problem with Classful Addressing

The classful system was wasteful. An organization that needed 300 hosts could not use a Class C (/24, 254 hosts) -- it was too small. So they received a Class B (/16, 65,534 hosts), wasting over 65,000 addresses.

  • A Class B allocation for 500 hosts = 99.2% waste
  • Only three possible subnet sizes -- no middle ground
  • The Class B space was exhausted rapidly during the early 1990s

This inflexibility threatened to exhaust the entire IPv4 address space decades earlier than necessary.

CIDR: The Solution

Classless Inter-Domain Routing (CIDR), defined in RFC 4632, eliminated the fixed class boundaries. Instead of being limited to /8, /16, or /24, any prefix length from /0 to /32 is valid:

Need 500 hosts?  Use /23 (510 hosts)  -- not /16
Need 30 hosts?   Use /27 (30 hosts)   -- not /24
Need 2,000 hosts? Use /21 (2,046 hosts) -- not /16

CIDR notation uses a slash followed by the number of network bits: 192.168.0.0/23.

How CIDR Changed Routing

Before CIDR, routers could determine the network mask by inspecting the first octet. With CIDR, the prefix length must be explicitly carried in routing protocols. This required upgrading to classless routing protocols:

Protocol Classful or Classless Carries Mask?
RIPv1 Classful No
RIPv2 Classless Yes
OSPF Classless
EIGRP Classless Yes
BGP-4 Classless Yes

Supernetting with CIDR

CIDR also enables klzzwxh:0003 -- combining multiple contiguous prefixes into a single shorter prefix. An ISP with four /24 blocks can advertise them as one /22, shrinking the global routing table.

Legacy Impact

Although classful addressing was officially retired in 1993 with RFC 1519, its influence lingers:

  • Many network tools still default to classful masks (e.g., entering 10.1.1.0 defaults to /8)
  • The terms "Class A", "Class B", "Class C" remain widely used informally
  • Some older hardware and software still assume classful boundaries

Modern networks are entirely classless. If you encounter classful behavior, it is a legacy artifact that should be corrected.

Ver también