Free tech learning for everyone, from basics to pro

Network FundamentalsNetworking SecurityIntermediate

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

FeatureWhat it means
Huge address space128 bits give about 3.4 × 1038 addresses, enough for every device for the foreseeable future.
Simpler headerA fixed 40-byte main header with optional "extension headers", so routers can forward packets faster.
End-to-end connectivityDevices can have globally unique addresses, so NAT is no longer needed (firewalls are still essential).
Auto-configurationHosts can build their own address (SLAAC) without a DHCP server, or use DHCPv6.
No broadcastBroadcast is replaced by more efficient multicast.
AnycastSeveral servers share one address and routers deliver to the nearest one (used widely by DNS).
IPsec supportIPsec was designed in from the start; it was once mandatory and is now optional.
Better quality of serviceTraffic Class and Flow Label fields help routers handle voice and video smoothly.
Mobility and extensibilityDevices can keep their address as they move, and new options can be added with extension headers.

Address structure

The structure of a 128-bit IPv6 address20010db8000000000000ff0000428329Network prefix (64 bits)Interface ID (64 bits)8 blocks × 16 bits = 128 bits · shortened: 2001:db8::ff00:42:8329
Figure 1. An IPv6 address is eight blocks of four hexadecimal digits. The first half usually identifies the network, the second half the interface.

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

  1. Drop leading zeros in any block: 0db8 → db8, 0042 → 42, 0000 → 0.
  2. 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:

Building an EUI-64 interface ID from a MAC addressMAC address00:1A:2B3C:4D:5EInsert FFFE00:1A:2BFF:FE3C:4D:5EFlip 7th bit021A:2BFF:FE3C:4D5E00 → 02
Figure 2. EUI-64: split the 48-bit MAC, insert FFFE in the middle, then flip the 7th bit of the first byte.

Because this reveals the MAC address, most modern operating systems instead use random interface IDs for privacy.

Types of unicast address

Scopes of IPv6 unicast addressesInternet: Global Unicast (2000::/3)Organisation: Unique Local (fc00::/7, in practice fd..)One link / segment: Link-Local (fe80::/10)never forwarded by routers
Figure 3. Link-local addresses stay on one link, unique local addresses stay inside an organisation, and global unicast addresses work across the internet.
  • 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 with fd): 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.
2001:db8::1:0:0:1 (the :: can replace only one run of zeros; the first, longer-or-equal run is chosen).
An address starts with fe80. What type is it and can it cross a router?
Link-local. No: routers never forward link-local addresses.
How many bits are in an IPv6 address, and how many blocks?
128 bits, in eight 16-bit 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.
Tracks your learning on this device only. See your progress on the learning paths.

About the author

Mohamed Fayas

Founder of FM TecHub. CCNA certified, with a BTEC HND in Network Engineering, and BEng (Hons) in Computer Networking and Cloud Security. He writes practical, plain-English guides on networking, security and cloud.

More about the author

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.

Stay up to date by email

New notes, tools and security news from FM TecHub, explained simply. Free.

We only use your email to send these updates. See our privacy policy.