IP fundamentals

How to read an IPv6 address

IPv6 uses eight 16-bit groups in its expanded text representation. A shorter representation can describe exactly the same address.

Updated

Expand or compress zeros

The expanded address 2001:0db8:0000:0000:0000:0000:0000:0001 may be written 2001:db8::1. Leading zeros inside a group can be omitted. The double colon replaces whole zero groups and may appear only once, because otherwise the expanded address would be ambiguous.

Understand prefixes

A slash and number describe the number of leading bits in a prefix, as in 2001:db8:abcd::/48. The prefix represents a range, not a single address. A slash is therefore not valid in a field that expects exactly one IP address.

Watch the address shrink

Illustrative data · No network requests

128 bits / 8 × 16 bitsExpand
12001
20db8
30000
40000
50000
60000
70000
80001
Eight groups
20010db8000000000000000000000001
2001:0db8:0000:0000:0000:0000:0000:0001

128 bits

Expand

All eight groups represent the same 128-bit number.

Step 1 / 3
Read all scenarios
  1. Expand: 2001:0db8:0000:0000:0000:0000:0000:0001 · Eight groups · 128 bits. All eight groups represent the same 128-bit number.
  2. Trim zeros: 2001:db8:0:0:0:0:0:1 · Remove leading zeros · Same address. Leading zeros inside each group can be omitted.
  3. Compress: 2001:db8::1 · Compress one zero run · Same 128 bits. The double colon replaces consecutive all-zero groups once.

IPv4-mapped addresses

Some software represents an IPv4 peer within an IPv6-shaped address such as ::ffff:192.0.2.1. It is not evidence that the original client used native IPv6. An address parser should recognize this representation and preserve the distinction.

Scopes and zone identifiers

A link-local address may be shown with a zone suffix such as %eth0. The suffix tells the local operating system which interface to use. It has no meaning as a global IP lookup input, and link-local addresses should not be given a public location.

Check your understanding

Which notation correctly represents 2001:0db8:0000:0000:0000:0000:0000:0001?

Which notation correctly represents 2001:0db8:0000:0000:0000:0000:0000:0001?

Working through a learning path?

Record your own progress on this browser. No account required.

Learning paths →

Try this

Use a single unadorned IPv6 address in the lookup box. Leave out brackets, port numbers, CIDR suffixes and interface zone identifiers.

IPv4 / IPv6 subnet calculator →

Technical references