🦆 IP Ducky

How IP Addresses Work

How IPv4 Addresses Work: Structure and Notation

IPv4 is the addressing system that has run the internet for decades. Under its familiar dotted format lies a simple 32-bit number.

Four numbers, one 32-bit value

An IPv4 address like 192.0.2.235 is really a single 32-bit binary number, split into four 8-bit chunks called octets for readability. Each octet ranges from 0 to 255 (the values a byte can hold), which is why you never see 256 in an IPv4 address.

Written in binary, 192.0.2.235 is 11000000.00000000.00000010.11101011. The dotted-decimal form is just a friendlier way to write the same 32 bits.

How many addresses is that?

Thirty-two bits gives 2³², or about 4.3 billion unique addresses. In the 1980s that seemed inexhaustible. Today, with billions of people and tens of billions of devices, it is not nearly enough — the pool of unallocated IPv4 addresses has effectively run dry.

Network and host portions

An IPv4 address is divided into a network part (which network the device is on) and a host part (which device within that network). A subnet mask marks where the split falls. This division is what lets routers make quick decisions: they look mainly at the network part to decide where to forward a packet.

Special ranges

Living with scarcity

Because IPv4 ran out, the internet leans heavily on Network Address Translation (letting many devices share one public address) and is gradually migrating to IPv6. IPv4 is not going away soon, but it is now a carefully rationed resource rather than the limitless supply it once appeared to be.

🦆 Check your own IP address