Public and private IPv4 addresses

Running out of IPv4

1990s internet growth made it obvious IPv4 space would not last. The permanent fix is IPv6. The stopgaps that bought time: NAT, CIDR, private addressing (RFC 1918), and VLSM.

Public addresses

Any host reachable from the internet needs a public IP, and it must be globally unique. Duplicates would break packet delivery.

Uniqueness is enforced by a registry hierarchy: originally InterNIC, now IANA at the top. IANA hands address pools to five Regional Internet Registries:

RIRs allocate to Local Internet Registries (LIRs), usually ISPs. Your ISP assigns your addresses.

These are provider-aggregatable addresses: tied to the ISP. Switch ISPs and you renumber your internet-facing hosts. The alternative, provider-independent space, stays with you.

Public ranges by class

Basically each classful range minus the reserved chunks:

The gaps are the private blocks (10/8, 172.16/12, 192.168/16), and 0.0.0.0/8 and loopback 127.0.0.0/8 are also excluded.

This is a simplification. Other carve-outs exist inside the “public” spans, like 169.254.0.0/16 link-local and a few documentation and test blocks. Fine for exam purposes.

Private addresses (RFC 1918)

Published by the IETF in Feb 1996 to slow depletion and stop people from inventing random addresses internally. Three blocks, free to use inside any private network, needing only to be unique internally:

These are not routable on the internet. Backbone routers are configured to discard them.

Don’t grab arbitrary public addresses for internal use even if the network is isolated. If it ever connects, you collide.

To reach the internet from private space, translate private to public at the edge. That’s NAT, typically done on a router. Details in a later note.