The ipv6 address link-local command manually configures a link-local address for a specified interface.
The undo ipv6 address link-local command deletes the manually configured link-local address on an interface.
By default, no link-local address is configured for an interface.
Parameter | Description | Value |
---|---|---|
ipv6-address | Specifies the IPv6 address of an interface. | The value consists of 128 octets, which are classified into 8 groups. Each group contains 4 hexadecimal numbers in the format X:X:X:X:X:X:X:X. When a link-local address is being configured, the prefix of the specified IPv6 address must match FE80::/10. |
Usage Scenario
Link-local addresses are used for the communication between nodes on the same local link in neighbor discovery or stateless autoconfiguration. The packet with a link-local address being the source or destination address will not be forwarded to other links. That is, link-local addresses are valid only on local links.
You can run the ipv6 address link-local command to manually configure a link-local address for an interface.
Prerequisites
The IPv6 function has been enabled on the interface using the ipv6 enable command in the interface view.
Precautions
Avoid changing link-local addresses.
You can configure multiple IPv6 addresses but only one link-local address for an interface.
The link-local address configured using the ipv6 address link-local command will override the link-local address automatically generated by the system.
The undo ipv6 address link-local command deletes only the link-local address manually configured for an interface. To delete the automatically generated link-local address, run the undo ipv6 address auto link-local command.
If an interface is being unbound from the VPN instance that has IPv6 address family enabled, the system displays a message, indicating that this command cannot be run.
# Manually configure a link-local address for VLANIF 2.
<HUAWEI> system-view [HUAWEI] ipv6 [HUAWEI] interface vlanif 2 [HUAWEI-Vlanif2] ipv6 enable [HUAWEI-Vlanif2] ipv6 address fe80::1 link-local
# Manually configure a link-local address for GE0/0/1.
<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 fe80::1 link-local