~/netref / IP Classes & Reserved
##

IP Classes & Reserved Ranges

Classful addressing is legacy but still the mental model. The reserved & private blocks below are the ones you actually need daily.

ClassRangeLeading bitsDefault maskNetworksHosts/net
A1.0.0.0 – 126.255.255.2550xxxxxxx255.0.0.012616,777,214
B128.0.0.0 – 191.255.255.25510xxxxxx255.255.0.016,38465,534
C192.0.0.0 – 223.255.255.255110xxxxx255.255.255.02,097,152254
D224.0.0.0 – 239.255.255.2551110xxxx— multicast
E240.0.0.0 – 255.255.255.2551111xxxx— reserved

// the first-octet rule — leading bits decide the class

A1 – 126
bits 0…
default /8 127 = loopback
B128 – 191
bits 10…
default /16
C192 – 223
bits 110…
default /24
D224 – 239
bits 1110…
default — multicast
E240 – 255
bits 1111…
default — reserved

// why this is the mental model, not the rule anymore

  • Classful addressing is legacy — CIDR (1993) replaced fixed class boundaries with variable prefixes
  • The first-octet value alone tells you the old class
  • Usable hosts per network = 2ʰᵒˢᵗ ᵇⁱᵗˢ − 2 (network + broadcast reserved)
  • Private ranges (RFC 1918) need NAT to reach the internet
  • /31 (RFC 3021) and /32 are exceptions to the −2 rule

// private & reserved blocks

private
10.0.0.0/8
Private (RFC 1918) — Class A
private
172.16.0.0/12
Private (RFC 1918) — 172.16–172.31
private
192.168.0.0/16
Private (RFC 1918) — Class C
special
127.0.0.0/8
Loopback
special
169.254.0.0/16
Link-local / APIPA
special
100.64.0.0/10
Carrier-grade NAT (RFC 6598)
special
0.0.0.0/8
"This" network / unspecified
doc
192.0.2.0/24
Documentation TEST-NET-1
doc
198.51.100.0/24
Documentation TEST-NET-2
doc
203.0.113.0/24
Documentation TEST-NET-3
special
224.0.0.0/4
Multicast (Class D)
special
240.0.0.0/4
Reserved (Class E)
special
255.255.255.255/32
Limited broadcast