IPv6 explained: why we need it, address structure, shortening rules and address types
In short: IPv6 uses 128-bit addresses, giving an almost unlimited supply. Addresses are written as eight hexadecimal blocks and can be shortened. Hosts can configure themselves, there is no broadcast, and addresses come in scopes: link-local, unique local and global.
Why a new version of IP?
IPv4 was designed in the early 1980s, when the internet connected a few universities and research labs. Its 32-bit address space (about 4.3 billion addresses) seemed huge then, but phones, laptops, cameras and smart devices used it up. The IETF developed IPv6 to solve this and to improve other weaknesses:
- IPv4 addresses ran out, forcing heavy use of NAT;
- IPv4 had no built-in security;
- its quality-of-service fields offered limited control;
- devices needed manual setup or a DHCP server to get an address.
IPv6 is not backward compatible with IPv4, so networks usually run both side by side (dual stack) during the transition.
Main features of IPv6
| Feature | What it means |
|---|---|
| Huge address space | 128 bits give about 3.4 × 1038 addresses, enough for every device for the foreseeable future. |
| Simpler header | A fixed 40-byte main header with optional "extension headers", so routers can forward packets faster. |
| End-to-end connectivity | Devices can have globally unique addresses, so NAT is no longer needed (firewalls are still essential). |
| Auto-configuration | Hosts can build their own address (SLAAC) without a DHCP server, or use DHCPv6. |
| No broadcast | Broadcast is replaced by more efficient multicast. |
| Anycast | Several servers share one address and routers deliver to the nearest one (used widely by DNS). |
| IPsec support | IPsec was designed in from the start; it was once mandatory and is now optional. |
| Better quality of service | Traffic Class and Flow Label fields help routers handle voice and video smoothly. |
| Mobility and extensibility | Devices can keep their address as they move, and new options can be added with extension headers. |
Address structure
An IPv6 address has 128 bits, divided into eight blocks of 16 bits. Each block is written as four hexadecimal digits (0–9, a–f), and the blocks are separated by colons.
Two rules to shorten an address
- Drop leading zeros in any block:
0db8→db8,0042→42,0000→0. - Replace one run of all-zero blocks with
::, but only once in an address, otherwise it would be unclear how many zeros each::stands for.
Example: 2001:0db8:0000:0000:0000:ff00:0042:8329 becomes 2001:db8:0:0:0:ff00:42:8329 (rule 1), then 2001:db8::ff00:42:8329 (rule 2). Try it with the IPv6 expand and compress tool.
Interface ID and EUI-64
The last 64 bits of most addresses are the interface ID. A device can build it from its 48-bit MAC address using the EUI-64 method:
Because this reveals the MAC address, most modern operating systems instead use random interface IDs for privacy.
Types of unicast address
- Global unicast (starts with 2 or 3, i.e.
2000::/3): the IPv6 equivalent of a public address, unique and routable on the internet. The first 48 bits are typically the global routing prefix given by the ISP, the next 16 bits the subnet ID, and the last 64 bits the interface ID. - Link-local (
fe80::/10): created automatically on every IPv6 interface and used only to talk to neighbours on the same link. Routers never forward these addresses. - Unique local (
fc00::/7; in practice addresses start withfd): for private use inside an organisation, similar to IPv4 private ranges, and not routed on the internet.
Other special addresses: ::1 is loopback (like 127.0.0.1) and ff00::/8 is multicast.
How an IPv6 host gets its address
IPv6 hosts do not need a DHCP server to get online. A router sends router advertisements containing the /64 prefix, and hosts can build their own global address with SLAAC (stateless address autoconfiguration), after checking it is unique. Two flags in the advertisement tell hosts whether to use DHCPv6 as well: for the address (M flag) or just for options such as DNS (O flag). Whichever method is used, the default gateway always comes from the router advertisement. Read the full process in IPv6 Neighbour Discovery, SLAAC and DHCPv6.
Practice
Shorten 2001:0db8:0000:0000:0001:0000:0000:0001.
An address starts with fe80. What type is it and can it cross a router?
How many bits are in an IPv6 address, and how many blocks?
Key takeaways
- IPv6 uses 128-bit addresses to solve IPv4 exhaustion.
- It adds auto-configuration, multicast instead of broadcast, anycast and a simpler header.
- Shorten by dropping leading zeros and using :: once for a run of zero blocks.
- The last 64 bits are the interface ID, from EUI-64 or (more often today) random.
- Global unicast (2000::/3) is public; unique local (fd..) is private; link-local (fe80::/10) stays on one link.
Original content written by Mohamed Fayas for FM TecHub. © 2026 FM TecHub. You're welcome to share a link to this page; please don't copy the text elsewhere without permission.