IPv6 Address Format Explained Byte by Byte

IPv6 addresses are 128 bits as eight groups of four hex digits. The two compression rules, prefix notation, EUI-64 interface IDs, special addresses, and worked examples.

IPv6 addresses are 128 bits, written as eight groups of four hexadecimal digits separated by colons. They look intimidating at first - 2001:0db8:85a3:0000:0000:8a2e:0370:7334 - but the format is simpler than IPv4 once you understand the compression rules and the conventional /64 split.

This article walks through the byte-level format, the two compression rules, the prefix length convention, the EUI-64 interface ID derivation, and the worked examples that make IPv6 addresses readable instead of intimidating. If you are studying for CCNP/CCIE, configuring IPv6 for the first time, or trying to read a Cisco router's IPv6 routing table, this is the byte reference.

The 128-bit Format

An IPv6 address is 128 bits long. Written in hexadecimal, that is 32 hex digits. Convention groups them into eight blocks of four hex digits separated by colons:

2001:0db8:85a3:0000:0000:8a2e:0370:7334

Each block represents 16 bits (4 hex digits = 4 * 4 = 16 bits). Eight blocks = 8 * 16 = 128 bits total. The notation is case-insensitive (uppercase or lowercase hex both valid; lowercase is conventional).

Compression Rule 1: Drop Leading Zeros

Within each 16-bit block, leading zeros may be dropped:

2001:0db8:85a3:0000:0000:8a2e:0370:7334
becomes
2001:db8:85a3:0:0:8a2e:370:7334

The 0db8 becomes db8; 0000 becomes 0; 0370 becomes 370. Each block must contain at least one hex digit (a single zero, not nothing).

Compression Rule 2: The Double Colon

One run of consecutive all-zero blocks may be replaced with :::

2001:db8:85a3:0:0:8a2e:370:7334
becomes
2001:db8:85a3::8a2e:370:7334

The two consecutive :0:0: become ::. Critical: only one :: per address. Two would be ambiguous - the parser cannot tell how many zero blocks each represents.

Examples of the rule applied:

FullCompressed
2001:0db8:0000:0000:0000:ff00:0042:83292001:db8::ff00:42:8329
0000:0000:0000:0000:0000:0000:0000:0001::1 (loopback)
0000:0000:0000:0000:0000:0000:0000:0000:: (unspecified)
fe80:0000:0000:0000:0204:61ff:fefe:5d04fe80::204:61ff:fefe:5d04
2001:db8:0:1:0:0:0:12001:db8:0:1::1 (only the longer zero run is compressed)

The last example shows why "longest run" matters. The address has two zero runs (one block at position 3 and three blocks at positions 5-7). Compressing the longer run is conventional and keeps the address most compact.

Prefix Notation

IPv6 uses CIDR-style prefix notation: address followed by /N where N is the number of network bits.

2001:db8:1::1/64

This means the first 64 bits are network; the last 64 bits are host. The /64 is the dominant convention for normal networks. Larger prefixes (smaller subnets like /127 for point-to-point links, /128 for loopbacks) and smaller prefixes (provider allocations like /48) exist but /64 is the default for end-host networks.

The 64/64 split is what enables Neighbor Discovery efficiencies and SLAAC. Hosts can use the bottom 64 bits as an interface identifier without colliding (the address space is huge enough).

Common Prefix Sizes

PrefixUse
/3 (2000::/3)All currently-allocated global unicast
/12 (2A00::/12 etc.)RIR allocation (continent-level)
/32ISP allocation (typical)
/48Customer allocation (typical end-customer assignment)
/56Customer subnet (often residential)
/64End-network subnet (default for hosts)
/127Point-to-point link (RFC 6164 recommendation)
/128Single host (loopback addresses, etc.)

An enterprise customer typically gets a /48 from their ISP; they then sub-divide into many /64 subnets. With /48 = 65,536 /64 subnets, this is enough for any enterprise.

EUI-64 Interface IDs

Hosts deriving their own interface ID for SLAAC originally used Modified EUI-64: take the MAC address (48 bits), insert FFFE in the middle to make 64 bits, and flip the U/L bit (bit 7 of the first byte).

StepValue
MAC address00-1A-2B-3C-4D-5E
Insert FFFE in the middle00-1A-2B-FF-FE-3C-4D-5E
Flip U/L bit (XOR 0x02 on first byte)02-1A-2B-FF-FE-3C-4D-5E
Final interface ID021A:2BFF:FE3C:4D5E

Combined with prefix 2001:db8:1::/64, the full address becomes 2001:db8:1:0:21a:2bff:fe3c:4d5e.

Modern hosts often use Privacy Extensions (RFC 4941) that generate random interface IDs every few hours instead of the deterministic EUI-64 ID. This prevents tracking based on the MAC-derived host part. Cisco routers still use EUI-64 by default for interface addresses; end hosts use random or stable-private interface IDs.

Special and Reserved Addresses

AddressUse
::/128Unspecified (during DAD; "no address yet")
::1/128Loopback (equivalent to IPv4 127.0.0.1)
::FFFF:0:0/96IPv4-mapped IPv6 (used internally for dual-stack sockets)
FE80::/10Link-local (always present on every interface)
FC00::/7Unique Local Addresses (RFC 4193)
FF00::/8Multicast
2000::/3Global unicast (currently allocated)

Two specific multicast addresses appear constantly:

AddressUse
FF02::1All nodes on link
FF02::2All routers on link
FF02::5OSPFv3 routers
FF02::AEIGRP for IPv6
FF02::1:FFXX:XXXXSolicited-node multicast (used by NDP)

The solicited-node multicast is interesting: instead of broadcasting (no broadcast in IPv6), an NDP Neighbor Solicitation is sent to a multicast group derived from the target address. Only hosts whose interface ID ends with the same XX:XXXX listen on that group, dramatically reducing wasted host wake-ups compared to ARP broadcast.

Worked Examples

Compress these:

FullCompressed
2001:0db8:0000:0000:0000:0000:0000:00012001:db8::1
fe80:0000:0000:0000:0202:b3ff:fe1e:8329fe80::202:b3ff:fe1e:8329
2001:0db8:0000:0042:0000:8a2e:0370:73342001:db8:0:42:0:8a2e:370:7334
0000:0000:0000:0000:0000:0000:0000:0000::

Expand these (the inverse):

CompressedFull
2001:db8::12342001:0db8:0000:0000:0000:0000:0000:1234
fe80::1fe80:0000:0000:0000:0000:0000:0000:0001
::ffff:192.168.1.10000:0000:0000:0000:0000:ffff:c0a8:0101 (IPv4-mapped)

The IPv4-mapped form lets dual-stack sockets handle both v4 and v6 connections through a single API.

Reading IPv6 Addresses Quickly

Some patterns become recognizable with practice:

PatternHint
Starts with 2 or 3Global unicast (2000::/3)
Starts with FE80Link-local (always)
Starts with FD or FCUnique Local (private-like)
Starts with FFMulticast
:: aloneUnspecified or loopback (::1)
Contains FFFE in the middleEUI-64 derived

Summary

IPv6 addresses are 128 bits, eight groups of four hex digits, with two compression rules: drop leading zeros within each block, and replace one run of zero blocks with ::. The /64 prefix is the convention for normal networks. EUI-64 derives interface IDs from MAC addresses but Privacy Extensions are now common.

Master the format and compression and the rest of IPv6 reads naturally. Bookmark this article alongside the IPv6 cluster pillar as your byte-level reference.

Read next

© 2025 Ping Labz. All rights reserved.