The ipv6 address anycast command configures an anycast IPv6 address.
The undo ipv6 address anycast command deletes an anycast IPv6 address.
By default, anycast IPv6 addresses are not configured.
Parameter | Description | Value |
---|---|---|
ipv6-address |
Specifies the IPv6 address to be configured for the interface. |
The address is a 32-digit hexadecimal number, in the format of X:X:X:X:X:X:X:X. |
prefix-length |
Specifies the prefix length of the IPv6 address. |
The value is an integer that ranges from 1 to 128. In the EUI-64 address format, the prefix length must be less than 64. |
ipv6-address/prefix-length |
Specifies the IPv6 address and prefix length of an interface. |
The value is the IPv6 address/IPv6 address prefix length. |
100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, Loopback interface view, PW-VE sub-interface view, PW-VE interface view, Tunnel interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view, Management interface view
Usage Scenario
An anycast address is used to identify a group of interfaces that are configured on different nodes. The packets that are sent to an anycast address are transmitted to an interface that is in the interface group identified by the anycast address and is closest to the source node. (The distance between an interface and the source node is calculated based on a routing protocol).
When the 6to4 tunnel is used for communication between the 6to4 network and the native IPv6 network, you can configure an anycast address whose prefix is 2002:c058:6301/48 on the tunnel interface of the 6to4 relay router. If an anycast address is used, you need to configure the same address for the tunnel interfaces of all devices. In this manner, the number of addresses is reduced.Prerequisites
Before running this command, run the ipv6 enable command on the interface view to enable the IPv6 function of the tunnel interface.
Configuration Impact
When the undo command is run, if no parameter is specified, all IPv6 addresses (including anycast addresses but excluding the link-local address that is configured automatically) are deleted.
Precautions
<HUAWEI> system-view [~HUAWEI] interface GigabitEthernet 0/1/1 [~HUAWEI-GigabitEthernet0/1/1] ipv6 enable [*HUAWEI-GigabitEthernet0/1/1] ipv6 address 2001:db8:5::10 124 anycast
<HUAWEI> system-view [~HUAWEI] interface Tunnel 10 [*HUAWEI-Tunnel10] tunnel-protocol ipv6-ipv4 6to4 [*HUAWEI-Tunnel10] ipv6 enable [*HUAWEI-Tunnel10] ipv6 address 2001:db8:1:: 64 anycast