IPv6 Address Autoconfiguration how to install study guide
Autoconfiguration is an incredibly useful solution because it allows devices on a network to address themselves with a link-local unicast address
Types of Autoconfiguration
There are three types of autoconfiguration:
- Stateless Configuration of addresses and other settings 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 they include one or more Prefix Information options, each with its Autonomous flag set to 1.
- Stateful Configuration is based on the use of an address configuration protocol, such as DHCPv6, to obtain addresses and other configuration settings. A host uses stateful 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 can also use stateful autoconfiguration when there are no routers present on the local link.
- Both Configurations 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.
Stateful Configuration
The client detects a router; the client examines the router advertisement messages to determine whether DHCPv6 has been set up. If the router specifies that DHCPv6 is supported, or no router advertisement messages are seen, the client will begin to find a DHCPv6 server by generating a DHCP solicit message. This message is sent to the ALL-DHCP-Agents multicast address, using the link-local scope to ensure the message isn’t forwarded, by default, beyond the local link. An agent is either a DHCPv6 server or a relay, such as a router.
Stateless Autoconfiguration
Stateless autoconfiguration is an extension of DHCPv6. the client uses information in router advertisement messages to configure an IPv6 address for the interface. This is accomplished by taking the first 64 bits in the router advertisement source address (the prefix of the router’s address) and using the EUI-64 process to create the 64-bit interface ID. Stateless autoconfiguration was designed primarily for cell phones, PDAs, and home network and appliance equipment to assign addresses automatically without having to manage a DHCP server infrastructure. Normally, routers generate periodic router advertisement (RA) messages the client can listen to and then use to generate its link address automatically; however, when the client is booting up, waiting for the RA might take awhile. In this situation, the client will generate a router solicitation message, asking the router to reply with an RA so the client can generate its interface address.
Two steps to IPv6 autoconfiguration
Autoconfigured Address States
Autoconfigured addresses are in one or more of the following states:
- Tentative 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.
- Valid 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 or the Valid-Lifetime field of a DHCPv6 IA (Identity Association) Address option.
- Preferred 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 or the Preferred-Lifetime field of a DHCPv6 IA Address option.
- Deprecated The address is valid and 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.
- Invalid The address can no longer be used to send or receive unicast traffic. An address enters the invalid state after the valid lifetime expires.
Autoconfiguration Process
The address autoconfiguration process defined in RFC 4862 for the physical interface of an IPv6 node is the following:
- A tentative link-local address is derived based on the link-local prefix of FE80::/64 and a EUI-64–derived interface identifier.
- Using duplicate address detection to verify the uniqueness of the tentative link-local address, a Neighbor Solicitation message is sent with the Target Address field that is set to the tentative link-local address.
- If a Neighbor Advertisement message (sent in response to the Neighbor Solicitation message) is received, this indicates that another node on the local link is using the tentative link-local address and address autoconfiguration stops. At this point, manual configuration must be performed on the node.
- If no Neighbor Advertisement message (sent in response to the Neighbor Solicitation message) is received, the tentative link-local address is assumed to be unique and valid. The link-local address is initialized for the interface. The link-layer multicast address of the solicited-node address corresponding to the link-local address is registered with the network adapter.
For an IPv6 host, the address autoconfiguration continues as follows:
- The host sends a Router Solicitation message. While routers periodically send router advertisements, the host sends a Router Solicitation message to request an immediate router advertisement, rather than waiting until the next router advertisement. By default, up to three Router Solicitation messages are sent.
- If no Router Advertisement messages are received, the host uses an address configuration protocol to obtain addresses and other configuration parameters.
- If a Router Advertisement message is received, the hop limit, reachable time, retransmission timer, and maximum transmission unit (if that option is present) are set.
- For each Prefix Information option present, the following actions occur:
- If the On-Link flag is set to 1, the prefix is added to the prefix list.
- If the Autonomous flag is set to 1, the prefix and an appropriate interface identifier are used to derive a tentative address.
- Duplicate address detection is used to verify the uniqueness of the tentative address.
- If the tentative address is in use, the use of the address is not initialized for the interface.
- If the tentative address is not in use, the address is initialized. This includes setting the valid and preferred lifetimes based on the Valid Lifetime and Preferred Lifetime fields in the Prefix Information option. If needed, it also includes registering the link-layer multicast address of the solicited-node address corresponding to the new address with the network adapter.
- If the Managed Address Configuration flag in the Router Advertisement message is set to 1, an address configuration protocol is used to obtain additional addresses.
- If the Other Stateful Configuration flag in the Router Advertisement message is set to 1, an address configuration protocol is used to obtain additional configuration parameters.
No comments:
Post a Comment