NAMES & ADDRESSESAI-REVIEWED

How do IPv6 addresses and prefixes work?

Useful first: IP addresses · optional, not a requirement

Choose your depth

Stay with the essentials, or look closer.

Simple explanation
2 min read · estimate

YOUR GOALRecognize IPv6 addresses and explain why local and wider communication use different address scopes.

One interface, several addresses

A larger address space

IPv6 is a version of the Internet Protocol. Its packets carry 128-bit addresses, compared with 32 bits in IPv4. The usual hexadecimal notation uses digits 0–9 and letters a–f, separated by colons. A fully expanded address has eight groups of four hexadecimal digits. Start with IP addresses if the difference between an address and a device is unfamiliar.

[1] [2]

Count interfaces, not people

An address belongs to a network interface, such as a laptop's Wi-Fi connection. One interface can hold several IPv6 addresses at once. For example, automatic configuration can produce a link-local address and additional addresses using information advertised by a router. Seeing multiple entries for one interface is therefore not, by itself, evidence of a fault or several devices.

[2] [6]

Local means this link

A link-local address, such as fe80::2a, is for communication on one link. Routers must not forward packets with link-local source or destination addresses onto another link. Global scope has no such one-link boundary, but does not guarantee a working route. A laptop can keep its link-local address while using another address for wider communication.

[2] [5]
THE IDEA TO KEEP

An IPv6 address identifies an interface in context; its scope matters.

ONE THING TO WATCH OUT FOR

Each device must have exactly one IPv6 address.

Addresses are assigned to interfaces, and an interface can have multiple addresses for different uses.

A QUICK CHECK, NOT A TEST
A laptop lists a link-local address and another IPv6 address on the same Wi-Fi interface. What can you conclude?
Show the explanation

Multiple addresses on one interface can be normal. One interface can have several addresses. The count does not reveal how many adapters exist, and link-local traffic stays on its link.

Progress is saved only in this browser.

KEEP EXPLORINGRouters and routing
Was this explanation clear?
Report a mistake by email
Basic explanation
2 min read · estimate

YOUR GOALExpand a compressed address and test whether an address falls within a stated prefix.

Read the address and prefix

Expand the missing zero groups

2001:db8:42:7::2a expands to 2001:0db8:0042:0007:0000:0000:0000:002a. Four groups precede :: and one follows it, so three zero groups are missing. Leading zeros inside a group may be omitted; :: can appear only once. Every 2001:db8 example here uses the documentation-only prefix 2001:db8::/32, not an address to configure or test on the public Internet.

[3] [4]

A slash counts bits

In 2001:db8:42:7::/64, the first 64 bits define the prefix: four groups of 16 bits. The example address 2001:db8:42:7::2a matches; 2001:db8:42:8::2a does not. The slash number counts bits, not written characters. Other prefix lengths exist: IPv6 forwarding must support lengths through /128, so /64 is not a universal rule.

[2] [8]

A matching prefix is not a path

Prefix membership is a bit comparison. It does not, by itself, prove that another address is directly reachable on your link. IPv6 treats address assignment and on-link information separately; hosts learn or are configured with the latter. When troubleshooting, check the actual routing information instead of inferring a path from similar-looking addresses.

[7] [8]
THE IDEA TO KEEP

Expand first, compare the required leading bits, then check the actual route.

ONE THING TO WATCH OUT FOR

Two addresses with matching leading groups must be directly connected.

Matching a prefix describes an address range. On-link determination needs its own configuration or learned information.

A QUICK CHECK, NOT A TEST
Which address belongs to the documentation prefix 2001:db8:42:7::/64?
Show the explanation

2001:db8:42:7::99 A /64 fixes the first four 16-bit groups. Only the third option begins with 2001:db8:42:7; this establishes prefix membership, not live connectivity.

Progress is saved only in this browser.

KEEP EXPLORINGRouters and routing
Was this explanation clear?
Report a mistake by email
Advanced explanation
2 min read · estimate

YOUR GOALChoose canonical notation, interpret a local zone identifier, and distinguish deprecated from invalid addresses.

Separate spelling, scope and lifetime

Canonical does not mean uniquely legal

RFC 5952 recommends lowercase letters, no leading zeros, and :: for the longest run of zero groups. Break ties by choosing the leftmost run; do not compress a single zero group. Thus 2001:db8:0:0:7:0:0:9 becomes 2001:db8::7:0:0:9. Other valid spellings can denote the same address. This remains a documentation example, not a usable public endpoint.

[3] [4]

The percent suffix selects local context

Different links can contain the same link-local address. In a tool that supports interface names, fe80::2a%eth0 selects the zone associated with the local interface named eth0. The suffix is not part of the 128 address bits. Names and numeric zone identifiers are local to the host; copying a suffix to another machine does not guarantee it selects the same link.

[5] [2]

An address can age without changing scope

For an automatically configured address, expiry of the preferred lifetime makes it deprecated, but it can remain valid until its valid lifetime expires. Existing communications may continue using it when changing addresses would disrupt them; new communications should use a preferred address when possible. This staged transition helps explain overlapping addresses during renumbering. Deprecation does not turn a global address into a link-local one.

[6] [2]
THE IDEA TO KEEP

Text formatting, scope context and address lifetime describe different properties.

ONE THING TO WATCH OUT FOR

A deprecated IPv6 address is already invalid.

Deprecation discourages new use. Invalidation happens when the valid lifetime expires.

A QUICK CHECK, NOT A TEST
An address has 30 minutes of valid lifetime left, but its preferred lifetime just expired. What is its state?
Show the explanation

Deprecated but still valid; prefer another suitable address for new communications. Preferred-lifetime expiry causes deprecation. The address remains valid for the remaining valid lifetime; neither the expiry nor the word deprecated changes its scope.

Progress is saved only in this browser.

KEEP EXPLORINGRouters and routing
Was this explanation clear?
Report a mistake by email
GO STRAIGHT TO THE SOURCE

Keep asking. Check the details.

Source-checked using AI (OpenAI Codex) on . The checks covered sources, examples, and quizzes for this article version.

No human review is claimed. AI review can miss errors; check the original sources below.

  1. RFC 8200 — Internet Protocol, Version 6 (IPv6) Specification
  2. RFC 4291 — IP Version 6 Addressing Architecture
  3. RFC 5952 — A Recommendation for IPv6 Address Text Representation
  4. RFC 3849 — IPv6 Address Prefix Reserved for Documentation
  5. RFC 4007 — IPv6 Scoped Address Architecture
  6. RFC 4862 — IPv6 Stateless Address Autoconfiguration
  7. RFC 5942 — IPv6 Subnet Model: The Relationship between Links and Subnet Prefixes
  8. RFC 7608 — IPv6 Prefix Length Recommendation for Forwarding
How explanations are prepared