What is an IPv4 address and how is it structured?
32 bits, written as four dotted decimal octets (0–255 each), split into a network portion and a host portion.
* One IPv4 address in dotted-decimal and binary — the 32 bits split into four octets. — Michel Bakni, CC BY-SA 4.0, via Wikimedia Commons. *
An IPv4 address is just a 32-bit number; the dotted form is a human-readable way to write it. Each of the four "octets" is one byte, so its value runs 0–255.
223.1.1.1 = 11011111.00000001.00000001.00000001
The clever part is that the 32 bits are divided: the high bits identify the network, the low bits identify the host within it. Where the split falls is set by the subnet mask / CIDR prefix, not by the address itself.
| Part | Purpose |
|---|---|
| Network portion | Which network the interface is on |
| Host portion | Which device within that network |
Key facts:
- 8 bits per octet ⇒ each is 0–255
- 32 bits total ⇒ ~4.3 billion possible addresses (which is why they ran out)
- routers carry several IPs (one per network); PCs usually 1–2
Tip: Comfort converting decimal ↔ binary is what makes subnetting click — the network/host split happens at the bit level.
Go deeper:
IPv4 (Wikipedia) — 32-bit addresses, dot-decimal notation, and the network/host split.