Stateless address autoconfiguration

About stateless address autoconfiguration and temporary address

Stateless address autoconfiguration enables an interface to automatically generate an IPv6 global unicast address by using the address prefix in the received RA message and the interface ID. On an IEEE 802 interface (such as an Ethernet interface or a VLAN interface), the interface ID is generated based on the interface's MAC address and is globally unique. An attacker can exploit this rule to identify the sending device easily.

To fix the vulnerability, you can configure the temporary address feature. With this feature, an IEEE 802 interface generates the following addresses:

You can also configure the interface to preferentially use the temporary IPv6 address as the source address of sent packets. When the valid lifetime of the temporary IPv6 address expires, the interface deletes the address and generates a new one. This feature enables the system to send packets with different source addresses through the same interface. If the temporary IPv6 address cannot be used because of a DAD conflict, the public IPv6 address is used.

The preferred lifetime and valid lifetime for a temporary IPv6 address are determined as follows:

Restrictions and guidelines

If the prefix in the RA message is not 64 bits long, stateless address autoconfiguration fails to generate an IPv6 global unicast address.

To generate a temporary address, an interface must be enabled with stateless address autoconfiguration. Temporary IPv6 addresses do not overwrite public IPv6 addresses, so an interface can have multiple IPv6 addresses with the same address prefix but different interface IDs.

If an interface fails to generate a public IPv6 address because of a prefix conflict or other reasons, it does not generate any temporary IPv6 address.

Executing the undo ipv6 address auto command on an interface deletes all IPv6 global unicast addresses and link-local addresses that are automatically generated on the interface.

Enabling stateless address autoconfiguration

  1. Enter system view.

    system-view

  2. Enter interface view.

    interface interface-type interface-number

  3. Enable stateless address autoconfiguration on an interface, so that the interface can automatically generate a global unicast address.

    ipv6 address auto

    By default, the stateless address autoconfiguration feature is disabled on an interface.

Configuring the temporary address feature and preferentially using the temporary IPv6 address as the source address of outgoing packets

  1. Enter system view.

    system-view

  2. Enable the temporary IPv6 address feature.

    ipv6 temporary-address [ valid-lifetime preferred-lifetime ]

    By default, the temporary IPv6 address feature is disabled.

  3. Enable the system to preferentially use the temporary IPv6 address as the source address of the outgoing packets.

    ipv6 prefer temporary-address

    By default, the system does not preferentially use the temporary IPv6 address as the source address of the outgoing packets.