forgotmyip.com
Home / Guides

What is IPv4?

The dotted 32-bit format, special ranges and why it ran out.

Published

IPv4 (Internet Protocol version 4) is defined in RFC 791, published in 1981. The ARPANET planned its complete switch-over to TCP/IP for 1 January 1983 (RFC 801). An IPv4 address is a 32-bit number, usually written as four decimal numbers separated by dots — for example 203.0.113.42.

How an IPv4 address is written

The 32 bits are split into four 8-bit parts called octets, so each number is from 0 to 255:

203      .0        .113      .42
11001011 .00000000 .01110001 .00101010   # the same address in binary

32 bits allow 232 = 4,294,967,296 different addresses — about 4.3 billion.

Why IPv4 ran out

On 3 February 2011, IANA allocated its last five /8 blocks to the five Regional Internet Registries, and “the free pool of available IPv4 addresses is now fully depleted” (ARIN announcement). Two techniques stretch the remaining addresses:

The long-term fix is IPv6.

Special IPv4 ranges

These ranges are reserved for special purposes (full list: IANA IPv4 Special-Purpose Address Registry):

Range Purpose Defined in
10.0.0.0/8 Private networks RFC 1918
172.16.0.0/12 Private networks (172.16.0.0 – 172.31.255.255) RFC 1918
192.168.0.0/16 Private networks RFC 1918
100.64.0.0/10 Shared address space for carrier-grade NAT RFC 6598
127.0.0.0/8 Loopback — 127.0.0.1 is “this computer” (localhost) RFC 1122
169.254.0.0/16 Link-local — self-assigned when no address is configured RFC 3927
0.0.0.0 “This host on this network” — used before a host has an address RFC 1122
255.255.255.255 Limited broadcast to the local network RFC 919
192.0.2.0/24, 198.51.100.0/24, 203.0.113.0/24 Documentation and examples RFC 5737

Tip: a 169.254.x.x address means the device configured itself because it didn't get an address from a DHCP server (RFC 3927) — try reconnecting to the network or restarting the router.

What does “/24” mean? (CIDR notation)

In CIDR notation (RFC 4632), the number after the slash is how many leading bits identify the network; the remaining bits identify hosts on it.

CIDR Subnet mask Addresses
/8 255.0.0.0 224 = 16,777,216
/16 255.255.0.0 216 = 65,536
/24 255.255.255.0 28 = 256
/32 255.255.255.255 1 — a single address

So 192.168.1.0/24 covers 192.168.1.0 to 192.168.1.255. In a normal subnet the all-zeros and all-ones host addresses (.0 and .255 here) aren't assigned to devices (RFC 1122, §3.2.1.3), leaving 254.

How to see your IPv4 address

Your public IPv4 is shown on the home page, or from a terminal:

curl -4 https://forgotmyip.com

For your device's private address, see How to find your IP address.

Sources

  1. RFC 791 — Internet Protocol (IPv4)
  2. RFC 801 — NCP/TCP Transition Plan (switch-over by 1 January 1983)
  3. ARIN — The IANA IPv4 Address Free Pool is Now Depleted (3 Feb 2011)
  4. RFC 3022 — Traditional IP Network Address Translator (NAT)
  5. RFC 6598 — IANA-Reserved IPv4 Prefix for Shared Address Space (CGN)
  6. IANA IPv4 Special-Purpose Address Registry
  7. RFC 1918 — Address Allocation for Private Internets
  8. RFC 1122 — Requirements for Internet Hosts
  9. RFC 3927 — Dynamic Configuration of IPv4 Link-Local Addresses
  10. RFC 919 — Broadcasting Internet Datagrams
  11. RFC 5737 — IPv4 Address Blocks Reserved for Documentation
  12. RFC 4632 — Classless Inter-domain Routing (CIDR)

Forgot your IP? See your IPv4 and IPv6 now.

Show my IP