Understanding IPv6 Address Notation
Pavan Bagde
IPv6 addresses are 128 bits long. One key architectural shift with IPv6 is the fixed boundary between the network and host portions of an address, which is set at /64. Eliminates ambiguity around subnetting, routing continues to work by prefix, just as it did with CIDR under IPv4, but routers are not required to examine all 64 bits of the network portion.
IPv6 Address Notation: The Basics
An IPv6 address is expressed as 8 groups of 16 bits, separated by colons. For example:
2001:0db8:000a:0806:0000:0000:0000:200e
Each 16-bit group is represented using 4 hexadecimal digits. This is different from IPv4 notation, in which each byte of the address is represented by a decimal (base10) number.
To simplify typing and reading, IPv6 allows two shortcuts:
- We can omit leading zeros in a group:
000abecomesa, and0806becomes806. - Only once per address we can compress consecutive zero groups using double colons
:: - However, it can appear as the first or last component. e.g. loopback address
::1, equivalent to127.0.0.1in IPv4.
So, the address above simplifies to -
2001:db8:a:806::200e
The original specification for IPv6 addresses, RFC4921, documented these notational simplifications but did not require their use. As a result, there can be multiple RFC491-compliant ways to write a given IPv6 address, which create problem when matching them.
Address Normalization and Standards
While early standards like RFC4291 allowed flexible formatting, RFC5952 later introduced rules to standardize representation. These rules include:
- Hex digits a–f must be represented by lowercase letters.
- The :: element cannot replace a single 16-bit group. (Just use :0:.)
- If there is a choice of groups to replace with ::, the :: must replace the longest possible sequence of zeros.
Adhering to RFC5952 simplifies parsing and ensures compatibility across systems.
You will still see RFC5952-noncompliant addresses out in the wild.
Working with IPv6 Prefixes
IPv6 addresses follow CIDR-style prefix notation, such as:
IPv6-address/prefix-length
Prefix delegation and assignment are hierarchical: an ISP receives a block from a regional registry(e.g. ARIN), then assigns a portion to customers. While the full network portion is 64 bits, routing can happen on shorter prefixes based on organizational structure.
Automatic Host Numbering
IPv6 supports automatic configuration of the host portion using the modified EUI-64 method:
- Take the 48-bit MAC address.
- Insert
FFFEin the middle. - Flip the 7th bit of the first byte (XOR with
0x02).
e.g. 00:1b:21:30:e9:c7 becomes:
021b:21ff:fe30:e9c7
This simplifies host management, but since MAC addresses expose vendor information, it can raise privacy concerns. Virtual machines and container systems typically randomize MACs to preserve uniqueness.
SLAAC: Stateless Address AutoConfiguration
IPv6 includes native support for auto-configuring network interfaces through SLAAC (Stateless Address AutoConfiguration):
- Each interface first assigns itself a link-local address from the
fe80::/64range. - It sends a Router Solicitation (RS) to discover local routers.
- Routers respond with a Router Advertisement (RA) that includes usable network prefixes.
- If autoconfiguration is enabled, the device combines the advertised prefix with its EUI-64 host ID to form a global address.
This allows devices to join a network with zero manual configuration. However, SLAAC doesn’t handle DNS settings, so DHCPv6 is often used alongside it.
IPv6 Tunneling: Bridging the IPv4 Gap
To ease the transition from IPv4 to IPv6, tunneling technologies allow IPv6 traffic to traverse IPv4 infrastructure:
- 6to4: Automatically encapsulates IPv6 packets within IPv4.
These transitional tools are useful in networks lacking full native IPv6 support.
Further Resources
To learn more about IPv6:
- RFC4291 – IPv6 Addressing Architecture
- RFC5952 – IPv6 Text Representation
- worldipv6launch.org - A variety of IPv6 propaganda
IPv6 has grown into much more than just a larger address space, IPv6 is leveraged to improve routing efficiency, support mobile networks, and enable better locality of reference across the internet.