RFC 4291: IPv6 addressing architecture
Summary
In February 2006, Robert Hinden and Stephen Deering specified the IPv6 addressing architecture in RFC 4291: notation, address types and scopes. IPv6 knows unicast, anycast and multicast but no broadcast any more, and every interface has several addresses at the same time. The document replaces RFC 3513 and, with later additions, is still valid today.
How to read IPv6 addresses
An IPv6 address consists of eight groups of 16 bits in hexadecimal. Leading zeros may be omitted, and one contiguous run of zero groups can be replaced by :: once per address; ::1 is the loopback address. Prefixes are written with a slash as in CIDR.
Because several notations of the same address are allowed, RFC 5952 defined a recommended form in August 2010: lower case and the longest run of zeros compressed. This makes searching logs and configurations considerably easier.
Address types and interface IDs
Every IPv6 interface automatically has a link-local address from fe80::/10; it is valid only on the local segment. Multicast lives in ff00::/8 and takes over the tasks for which IPv4 used broadcast. RFC 4291 already declares site-local addresses and IPv4-compatible addresses deprecated.
For most unicast addresses the text requires a 64-bit interface ID, originally derived from the MAC address in modified EUI-64 format. Because this makes a device recognisable across networks, RFC 8064 has recommended stable interface IDs that reveal no hardware address since February 2017.
Ideas
- Eight groups of 16 bits form an IPv6 address.
- :: compresses a run of zero groups exactly once.
- IPv6 has no broadcast; multicast takes over its tasks.
- Every interface automatically has a link-local address from fe80::/10.
- Interface IDs are 64 bits long for most addresses.
- An interface carries several IPv6 addresses at the same time.
Insights
- In IPv6 the scope is part of the address itself; whoever understands scopes understands most configuration errors.
- Interface IDs derived from the MAC address were convenient but made devices trackable; convenience and privacy had to be weighed anew.
Facts
- RFC 4291 appeared in February 2006 and replaces RFC 3513.
- Loopback is ::1, link-local lives in fe80::/10, multicast in ff00::/8.
- RFC 5952 from August 2010 recommends a uniform text representation.
- RFC 8064 from February 2017 recommends stable interface IDs without a hardware address.
References
- RFC 4291: IP Version 6 Addressing Architecture
- RFC 5952: A Recommendation for IPv6 Address Text Representation (2010)
- RFC 8064: Recommendation on Stable IPv6 Interface Identifiers (2017)
Remarks
- On Linux, ip -6 addr show reveals how many addresses an interface carries, usually at least one link-local and one global address.
Recommendations
- Write addresses uniformly according to RFC 5952 in documentation, monitoring and firewall rules.
- Plan one /64 per segment, because autoconfiguration is designed for it.
- Enable privacy-friendly interface IDs, such as stable or random addresses instead of EUI-64.
Read the RFC at the RFC Editor
Found a mistake or have something to add? Get in touch.
Links to the original source and the Web Archive open in a new tab.