< Home

ipv6 address anycast

Function

The ipv6 address anycast command configures an IPv6 anycast address.

The undo ipv6 address command deletes an IPv6 anycast address.

By default, no IPv6 anycast address is configured.

Format

ipv6 address { ipv6-address prefix-length | ipv6-address/prefix-length } anycast

undo ipv6 address [ ipv6-address prefix-length | ipv6-address/prefix-length ]

Parameters

Parameter Description Value
ipv6-address

Specifies an IPv6 address.

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.
prefix-length

Specifies the prefix length of an IPv6 address.

The value is an integer that ranges from 1 to 128.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

An anycast address identifies a group of interfaces, which usually belong to different nodes. Packets sent to an anycast address are delivered to the nearest interface that is identified by the anycast address, depending on the routing protocols.

To implement communication between a 6to4 network and a local (native) IPv6 network using a 6to4 tunnel, configure an anycast address with prefix fc00:c058:6301:: for the tunnel interface of a 6to4 relay agent. 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

The IPv6 function has been enabled on the interface using the ipv6 enable command in the interface view.

Precautions

If no parameter is specified in the undo ipv6 address command, all IPv6 addresses except link-local addresses are deleted.

An anycast address cannot be used as the source address of a packet. Therefore, a global unicast address must be configured when a device needs to send packets.

An IPv6 address with a 128-bit prefix can be configured only on a loopback interface.

Example

# Configure anycast address fc00:c058:6301::/48 for VLANIF100.

<HUAWEI> system-view
[HUAWEI] ipv6
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] ipv6 enable
[HUAWEI-Vlanif100] ipv6 address fc00:c058:6301:: 48 anycast

# Configure anycast address fc00:c058:6301::/48 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 fc00:c058:6301:: 48 anycast
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >