共用方式為


IPv6 Address Autoconfiguration

A version of this page is also available for

Windows Embedded CE 6.0 R3

4/8/2010

IPv6 can automatically configure itself without the use of a protocol that configures stateful addresses, such as Dynamic Host Configuration Protocol for IPv6 (DHCPv6). Address autoconfiguration can only be performed on multicast-capable interfaces. By default, an IPv6 host configures a link-local address for each interface.

By using router discovery, a host can determine the addresses of routers, additional addresses, and other parameters. An indication of whether a stateful address configuration protocol should be used is included in the Router Advertisement message.

Note

The IPv6 protocol for Windows Embedded CE does not support configuring stateful addresses.

Address autoconfiguration is described in RFC 2462.

Note

With the exception of link-local addresses, address autoconfiguration is only specified for hosts. Routers must obtain addresses and parameters for configuration through another means (for example, through configuring address manually).

Types of Autoconfiguration

Windows CE .NET 4.1 and later supports the stateless autoconfiguration type. When configuring stateless addresses, based on the receipt of Router Advertisement messages, link-local addresses are configured automatically. These messages include stateless address prefixes and require that hosts not use a protocol that configures stateful addresses.

Autoconfigured Address States

Autoconfigured addresses are in one or more of the states shown in the following illustration. The relationship between the states of an autoconfigured address and the preferred and valid lifetimes are also shown.

Aa917171.522416ee-0eef-4157-b611-d5c6deaef04b(en-us,MSDN.10).gif

The following table shows the states and their descriptions.

State Description

Tentative

The address is in the process of being verified as unique. Verification occurs through duplicate address detection. The Router Advertisement message specifies the period of time that an address can remain in this state.

Preferred

The address has been verified as unique. A node can send and receive unicast traffic to and from a preferred address. The Router Advertisement message specifies the period of time that an address can remain in this state.

Deprecated

The address is still valid, but using it for new communication is discouraged. Existing communication sessions can continue to use a deprecated address. A node can send and receive unicast traffic to and from a deprecated address.

Valid

The address can send and receive unicast traffic. This state covers both the preferred and deprecated states. The Router Advertisement message specifies the period of time that an address can remain in this state. The valid lifetime must be greater than or equal to the preferred lifetime.

Invalid

The address can no longer send unicast traffic to or receive it from a node. An address enters this state after the valid lifetime expires.

Autoconfiguration Process

The following list shows the address autoconfiguration process for an IPv6 node:

  1. A tentative link-local address is derived, based on the link-local prefix of FE80::/64 and the 64-bit interface identifier.
  2. Duplicate address detection is performed to verify the uniqueness of the tentative link-local address.
  3. If duplicate address detection fails, you must manually configure the node.
    - or -
    If duplicate address detection succeeds, the tentative address is assumed to be valid and unique. The link-local address is initialized for the interface. The corresponding solicited-node multicast link-layer address is registered with the network adapter.

For an IPv6 host, address autoconfiguration continues as shown in the following list:

  1. The host sends a Router Solicitation message.
  2. If a Router Advertisement message is received, the routing information is set on the host.
  3. For each stateless autoconfiguration address prefix that is included, the following processes occurs:
    • The address prefix and the appropriate 64-bit 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 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 information included in the Router Advertisement message.

See Also

Concepts

Methods for Configuring IPv6 Addresses
Manually Configuring IPv6 Addresses

Other Resources