How is an IPv6 address structured?
128 bits, written as eight colon-separated groups of 4 hex digits; typically the first 64 bits are the network prefix and the last 64 are the interface ID.
* 128 bits = eight 16-bit hex groups — the first /64 is the network prefix (/48 from the ISP + subnet bits), the last /64 is the interface ID. *
IPv6 quadruples the address from 32 to 128 bits — an astronomically larger space, which is the whole point (no more exhaustion). To stay readable, two shorthand rules apply: drop leading zeros in each group, and replace one run of all-zero groups with ::.
2001:0db8:0000:0001:0000:0000:0000:0001
→ 2001:db8:0:1::1
Structure (the common case): a /48 block comes from the provider, leaving 16 bits to number your own subnets (48→64), and the bottom /64 is the interface ID:
| Part | Width | Example |
|---|---|---|
| Network prefix (from ISP) | /48 | 2001:db8:: |
| Local subnet bits | the 16 bits up to /64 | choose per subnet |
| Interface ID | last /64 | ::1 |
Prefixes you'll see:
- /48 — typical provider allocation
- /64 — the standard subnet size, and required for SLAAC auto-configuration
- /128 — a single host
Tip: the interface ID is often auto-derived from the MAC address (or randomised for privacy), so a host can build its own address from just the /64 prefix the router advertises.
Go deeper:
IPv6 address (Wikipedia) — 128 bits, eight hex groups,
::compression, /64 subnets, interface ID and SLAAC.