Autoconfig
IPv6 hosts can use stateless or stateful autoconfiguration. Stateless address autoconfiguration (SLAAC) uses IPv6 prefixes from Router Advertisement (RA) messages; stateful autoconfiguration uses DHCPv6.
- Managed-Config-Flag tells the end-host to use DHCPv6 exclusively;
- Other-Config-Flag tells the end-host to use SLAAC to get IPv6 address and DHCPv6 to get other parameters (DNS server address, for example).
- Absence of both flags tells the end-host to use only SLAAC.
One might assume that setting managed-config-flag in RA messages forces IPv6 hosts to use DHCPv6. Wrong, the two flags are just a polite suggestion.
Address types
Address | Purpose |
---|---|
FF00::/8 | Multicast |
FF70::/12 | Embedded RP |
FE80::/10 | Link Local Unicast |
FF02::1:FF00:0000/104 | Solicited node address |
2000::/3 | Global Unicast |
2001::/32 | Teredo |
2001:DB8::/32 | Documentation rezerved |
2002::/16 | Automatic 6to4 |
FC00::/7 | Unique Local |
Solicited node address
In addition, IPv6 multicast uses a solicited-node group that each router must join for all of its unicast and anycast addresses. The format for solicited-node multicast addresses is
FF02::1:FF00:0000/104
Solicited-node addresses are built from this prefix concatenated with the low-order 24 bits (128 – 104 = 24) of the corresponding unicast or anycast address. For example, a unicast address of
2001:1AB:2003:1::CBAC:DF01
has a corresponding solicited-node multicast address of
FF02::1:FFAC:DF01
Multicast address
Bits | 8 | 4 | 4 | 112 |
---|---|---|---|---|
Field | prefix | flags | scope | group ID |
Multicast addresses in IPv6 always begin with FF as the first octet in the address, or FF00::/8. The second octet specifies the lifetime and scope of the multicast group. Lifetime can be permanent (0000) or temporary (0001). Scope can be local to any of the following:
- Node – 0001
- Link – 0010
- Site – 0101
- Organization – 1000
- Global – 1110
EUI-64 Address Format
Ethernet hosts and Cisco routers with Ethernet interfaces use their 48-bit MAC addresses as a seed for EUI-64 addressing. But because the MAC address is 48 bits long and the EUI-64 process makes up the last 64 bits of an IPv6 address, the host needs to derive the other 16 bits from another source. The IEEE EUI-64 standard places the hex value FFFE into the center of the MAC address for this purpose. Finally, EUI-64 sets the universal/local bit, which is the 7th bit in the Interface ID field of the address, to indicate global scope.
Here is an example. Given the IPv6 prefix 2001:128:1F:633 and a MAC address of 00:07:85:80:71:B8, the resulting EUI-64 address is
2001:128:1F:633:207:85FF:FE80:71B8/64
ND Functions in IPv6
Message Type | Information Sought or Sent | Source Address | Destination Address | ICMP Type, Code |
Router Advertisement (RA) | Routers advertise their presence and link prefixes, MTU, and hop limits | Router’s link-local address | FF02::1 for periodic broadcasts; address of querying host for responses to an RS | 134, 0 |
Router Solicitation (RS) | Hosts query for the presence of routers on the link. | Address assigned to querying interface, if assigned, or :: if not assigned | FF02::2 | 133, 0 |
Neighbor Solicitation (NS) | Hosts query for other nodes’ link-layer addresses. Used for duplicate address detection and to verify neighbor reachability. | Address assigned to querying interface, if assigned, or :: if not assigned | Solicited-node multicast address or the target node’s address, if known | 135, 0 |
Neighbor Advertisement (NA) | Sent in response to NS messages and periodically to provide information to neighbors. | Configured or automatically assigned address of originating interface | Address of node requesting the NA or FF02::1 for periodic advertisements | 136, 0 |
Redirect | Sent by routers to inform nodes of better next-hop routers. | Link-local address of originating node | Source address of requesting node | 137, 0 |
ICMPv6
- two groups: error reporting messages and informational messages
- RFC mandates configurable rate limiting of ICMPv6 error messages (ipv6 icmp error-interval – default 100 ms + 10 token buckets)
DHCPv6
To use stateful autoconfiguration, a host sends a DHCP request to one of two well-known IPv6 multicast addresses on UDP port 547:
- FF02::1:2, all DHCP relay agents and servers
- FF05::1:3, all DHCP servers