The ipv6 address auto link-local command configures an interface to automatically generate a link-local address.
The undo ipv6 address auto link-local command deletes the automatically generated link-local address on a specified interface.
By default, no link-local address is automatically generated on an interface.
Usage Scenario
Link-local addresses are used for communications between link-local nodes in either the neighbor discovery or stateless auto-configuration process. A packet with a link-local address set to a source or destination address will not be forwarded to another link. That is, link-local addresses are valid only on local links.
After an interface automatically obtains a link-local address, it can implement neighbor discovery and automatically configure a global unicast address or a unique local address.
Prerequisites
Before running this command, run the ipv6 enable command in the interface view to enable the IPv6 function.
Precautions
Only a single link-local address can be assigned to each interface. If an automatically allocated link-local address has already been configured on an interface, running the ipv6 address link-local command will overwrite the existing link-local address.
The undo ipv6 address auto link-local command can only delete a link-local address that is automatically generated by an interface. To delete a manually configured link-local address, run the undo ipv6 address link-local command.
# Configure VLANIF2 to automatically generate a link-local address.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] interface vlanif 2 [HUAWEI-Vlanif2] ipv6 enable [HUAWEI-Vlanif2] ipv6 address auto link-local
# Configure GE0/0/1 to automatically generate a link-local address.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ipv6 enable [HUAWEI-GigabitEthernet0/0/1] ipv6 address auto link-local