Router/prefix discovery and stateless address autoconfiguration
Router/prefix discovery allows an IPv6 node to find the neighboring routers and learn the prefix and network configuration parameters of the network from receiving RA messages.
Stateless address autoconfiguration allows an IPv6 node to automatically generate an IPv6 address based on the information learned through router/prefix discovery.
A node performs router/prefix discovery and stateless address autoconfiguration as follows:
At startup, a node sends an RS message to request configuration information from a router.
The router returns an RA message containing the Prefix Information option and other configuration information. (The router also periodically sends an RA message.)
The node automatically generates an IPv6 address and other configuration parameters according to the configuration information in the RA message.
The Prefix Information option contains an address prefix and the preferred lifetime and valid lifetime of the address prefix. A node updates the preferred lifetime and valid lifetime upon receiving a periodic RA message.
The generated IPv6 address is valid within the valid lifetime and becomes invalid when the valid lifetime expires.
After the preferred lifetime expires, the node cannot use the generated IPv6 address to establish new connections, but can receive packets destined for the IPv6 address. The preferred lifetime cannot be greater than the valid lifetime.