One of the most useful aspects of IPv6 is its ability to automatically configure itself, even without the use of a stateful address autoconfiguration protocol such as DHCPv6. By default, an IPv6 host can configure a link-local address for each interface. By using router discovery, a host can also determine the addresses of routers, other configuration parameters, additional addresses, and on-link prefixes. Included in the Router Advertisement message is an indication of whether a stateful address autoconfiguration protocol should be used.
DHCPv6 standards are in progress and are not discussed in this chapter.
Autoconfigured addresses are in one or more of the following states:
The address is in the process of being verified as unique. Verification occurs through duplicate address detection. A node cannot receive unicast traffic to a tentative address. It can, however, receive and process multicast Neighbor Advertisement messages sent in response to the Neighbor Solicitation message that has been sent during duplicate address detection.
The address can be used for sending and receiving unicast traffic. The valid state includes both the preferred and deprecated states. The sum of the times that an address remains in the tentative, preferred, and deprecated states is determined by the Valid Lifetime field in the Prefix Information option of a Router Advertisement message.
The address is valid, its uniqueness has been verified, and it can be used for unlimited communications. A node can send and receive unicast traffic to and from a preferred address. The period of time that an address can remain in the tentative and preferred states is determined by the Preferred Lifetime field in the Prefix Information option of a Router Advertisement message.
The address is valid, its uniqueness has been verified, but its use is discouraged for new communication. Existing communication sessions can still use a deprecated address. A node can send and receive unicast traffic to and from a deprecated address.
The address can no longer be used to send or receive unicast traffic. An address enters the invalid state after the valid lifetime expires.
Figure 8-1 shows the states of an autoconfigured address and their relationship to the preferred and valid lifetimes.
Figure 8-1. The states of an autoconfigured address
With the exception of autoconfiguration for link-local addresses, address autoconfiguration is specified only for hosts. Routers must obtain address and configuration parameters through another means, such as manual configuration.
There are three types of autoconfiguration:
Configuration of addresses is based on the receipt of Router Advertisement messages. These messages have the Managed Address Configuration and Other Stateful Configuration flags set to 0 and include one or more Prefix Information options, each with its Autonomous flag set to 1.
Configuration is based on the use of a stateful address autoconfiguration protocol, such as DHCPv6, to obtain addresses and other configuration options. A host uses stateful address autoconfiguration when it receives a Router Advertisement message with no Prefix Information options and either the Managed Address Configuration flag or the Other Stateful Configuration flag is set to 1. A host will also use stateful address autoconfiguration when there are no routers present on the local link.
Configuration is based on the receipt of Router Advertisement messages that include Prefix Information options, each with its Autonomous flag set to 1, and have the Managed Address Configuration or Other Stateful Configuration flags set to 1.
For all types of autoconfiguration, a link-local address is always configured automatically.