> ## Content Index
> Fetch the complete content index at: https://www.pinglabz.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# IPv6 Address Format Explained Byte by Byte
- URL: https://www.pinglabz.com/ipv6-address-format/
- Published: 2026-04-26T08:03:44.000Z
- Updated: 2026-06-13T20:08:36.000Z
- Description: 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.
- Author: Jaime
- Tags: IPv6, #Import 2026-08-01 19:54

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:

2001:0db8:0000:0000:0000:ff00:0042:8329

2001: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:5d04

fe80::204:61ff:fefe:5d04

2001:db8:0:1:0:0:0:1

2001: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

/3 (2000::/3)

All currently-allocated global unicast

/12 (2A00::/12 etc.)

RIR allocation (continent-level)

/32

ISP allocation (typical)

/48

Customer allocation (typical end-customer assignment)

/56

Customer subnet (often residential)

/64

End-network subnet (default for hosts)

/127

Point-to-point link (RFC 6164 recommendation)

/128

Single 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).

MAC address

00-1A-2B-3C-4D-5E

Insert FFFE in the middle

00-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 ID

021A: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

::/128

Unspecified (during DAD; "no address yet")

::1/128

Loopback (equivalent to IPv4 127.0.0.1)

::FFFF:0:0/96

IPv4-mapped IPv6 (used internally for dual-stack sockets)

FE80::/10

Link-local (always present on every interface)

FC00::/7

Unique Local Addresses (RFC 4193)

FF00::/8

Multicast

2000::/3

Global unicast (currently allocated)

Two specific multicast addresses appear constantly:

FF02::1

All nodes on link

FF02::2

All routers on link

FF02::5

OSPFv3 routers

FF02::A

EIGRP for IPv6

FF02::1:FFXX:XXXX

Solicited-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:

2001:0db8:0000:0000:0000:0000:0000:0001

2001:db8::1

fe80:0000:0000:0000:0202:b3ff:fe1e:8329

fe80::202:b3ff:fe1e:8329

2001:0db8:0000:0042:0000:8a2e:0370:7334

2001:db8:0:42:0:8a2e:370:7334

0000:0000:0000:0000:0000:0000:0000:0000

::

Expand these (the inverse):

2001:db8::1234

2001:0db8:0000:0000:0000:0000:0000:1234

fe80::1

fe80:0000:0000:0000:0000:0000:0000:0001

::ffff:192.168.1.1

0000: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:

Starts with 2 or 3

Global unicast (2000::/3)

Starts with FE80

Link-local (always)

Starts with FD or FC

Unique Local (private-like)

Starts with FF

Multicast

:: alone

Unspecified or loopback (::1)

Contains FFFE in the middle

EUI-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](https://www.pinglabz.com/ipv6/) as your byte-level reference.