IPv6 Addressing
Address types:
- Unicast - Packet destined for a single interface; can be global or link-local
- Multicast - Packet destined for all interfaces in a multicast group
- Anycast - Packet destined for the nearest interface in a group
An IPv6 interface may have many addresses.
Addresses are expressed in the format 2001:0:1:2::ABCD (shorthand notation).
::1/128 is the IPv6 loopback address.
Interface Identifiers
Interface IDs make up the low-order 64 bits of an IPv6 address and are based on the data-link layer address.
IPv6 addresses for Ethernet interfaces create the interface ID from the MAC address by converting it to EUI-64 (Extended Universal Identifier 64-bit):
- First three bytes of MAC (OUI)
- Seventh bit (Universal/Local bit) of OUI set to 1
- 'FFFE'
- Last three bytes of MAC
The U/L bit determines whether the address is considered globally or locally unique; MAC addresses are assumed to be globally unique, thus the bit is set to 1 (universal).
Unicast Addressing
Global Aggregatable
Global unicast structure:
- First 48 bits: Global prefix
- Next 16 bits: Subnet ID
- Remaining 64 bits: Interface ID
Currently IANA is only assigning addresses from 2000::/3 (one eighth of the available space).
Registries receive a range (typically a /12) within 2000::/3. (Current assignments)
Link-local
Link-local addresses are used within a local network and are autoconfigured with a FE80::/10 prefix and an EUI-64 format interface ID.
- 1111 1110 10 (FE80/10)
- 54 0's
- EUI-64
Anycast Addressing
An IPv6 anycast address is a global unicast address assigned to multiple devices.
Routers forward packets destined for an anycast address to the closest interface (determined by the routing protocol's metric).
There is no reserved address space for anycast addresses; a global address becomes an anycast address when it is applied to multiple nodes.
Nodes must be appropriately configured to recognize that they have been assigned an anycast address.
All IPv6 routers must support the subnet-router anycast address (the subnet address with a zeroed interface ID) for the subnets connected to it.
Multicast Addressing
Every IPv6 interface should recognize several default multicast addresses, such as all-nodes.
Address format:
- FF
- Flags (4 bits)
- Scope (4 bits)
- Remainder: Group ID (112 bits)
Multicast addresses are prefixed with FF00::/8.
Flags:
- Undefined; 0
- R-bit; 1 if the RP address is embedded in the multicast address
- P-bit; 1 if the multicast address is assigned based on the unicast prefix
- T-bit; 1 if the address is permanently assigned
The scope determines how far the multicast traffic may travel.
- 1 = Interface-local (loopback)
- 2 = Link-local
- 4 = Admin-local
- 5 = Site-local
- 8 = Organization-local
- E = Global
All nodes automatically belong to the all-nodes group (FF01::1 for interface-local, FF02::1 for link-local).
Solicited-node multicasts serve as a replacement for ARP; FF02::1:FF00:/104 + last 24 bits of the unicast address.
Routers belong to the all-routers group (FF01::2 for interface-local, FF02::2 for link-local, FF05::2 for site-local).
Address Assignment
Addresses may be manually assigned, or assigned dynamically via DHCPv6 or stateless autoconfiguration.
Stateless Autoconfiguration
End systems receive network information advertised by a local router and automatically append a generated EUI-64 to the 64-bit network prefix.
Duplicate Address Detection (DAD) detects and avoids duplicate addresses.
DHCPv6 and Stateless DHCPv6
DHCP may still be used in the interest of security and/or privacy. (EUI-64's taken from a MAC expose a potentially sensitive address.)
Stateless DHCPv6 is defined in RFC 3736.
IPv6 Mobility
Defined in RFC 3775. An IPV6 mobile node has a home address on its home network and a care-of address on its current network. When roaming, and IPv6 node sends a binding update to a router on its home network.
