ipv6 address

Function

The ipv6 address command configures a global unicast address for an interface.

The undo ipv6 address command deletes the global unicast address configured for an interface.

By default, no global unicast address is configured for an interface.

Format

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

undo ipv6 address

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

Parameters

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.

Views

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

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
interface-mgr write

Usage Guidelines

Usage Scenario

A global unicast address equals an IPv4 public network address. Global unicast addresses are for links that can be aggregated and are provided for network service providers. The structure of global unicast addresses allows route-prefix aggregation for limiting the number of global routing entries. A global unicast address is composed of a 48-bit route prefix managed by operators, a 16-bit subnet ID managed by local nodes, and a 64-bit interface ID.

Configuring an IPv6 address with the prefix length of 127 has the following advantages:

  • Avoids loops in traffic forwarding on P2P links that have no neighbor discovery mechanisms.
  • Addresses the neighbor cache exhaustion issue when network devices are attacked.
  • Saves IPv6 address resources.

Prerequisites

Before running the ipv6 address command to configure a global unicast address for an interface, you need to run the ipv6 enable command in the interface view to enable the IPv6 function on the interface.

Configuration Impact

If the ipv6 address is run to configure an IPv6 address for an interface but no link-local address is configured for the interface, the system automatically generates a link-local address for the interface.

If no parameter (IPv6 address and prefix length) is specified in the undo ipv6 address command, all the IPv6 addresses configured for the interface are deleted.

Precautions

  • A maximum of 16 global unicast addresses can be configured on an interface.
  • The following configurations are not supported on different interfaces of the same device:
  • The IPv6 addresses are the same.
  • The network prefixes corresponding to IPv6 addresses are the same. For example, the IPv6 address of interface A on the device is 2001:db8:1::1/32 and the corresponding network prefix is 2001:db8::. If the IPv6 address of interface B on the device is 2001:db8::1/16, the corresponding network prefix is 2001::. Because the network prefixes of interfaces A and B are different, the configuration is successful. If the IPv6 address of interface B is 2001:db8:2::1/32, the corresponding network prefix is 2001:db8::. Because the network prefixes of interfaces A and B are the same, the configuration fails.

    The 6to4 addresses can be configured for a 6to4 tunnel interface but not a 6in4 tunnel interface.

    The following IPv6 addresses cannot be configured for an interface:
  • Loopback address (::1/128)
  • Unspecified address (::/128)
  • Multicast address.
  • Anycast address
  • IPv4-mapped IPv6 addresses (0:0:0:0:0:FFFF:IPv4-address) can be configured on public networks but not on private networks.

    A global unicast address cannot be the same as its network prefix, because this type of address is a subnet-router anycast address reserved for a device. However, this rule does not apply to an IPv6 address with a 127-bit network prefix. For example, if the ipv6 address command is run to configure an IPv6 address as 2001:db8:5::10 with the prefix length of 124 bits, the network prefix of the IPv6 address is also 2001:db8:5::10. This IPv6 address is a subnet-router anycast address and cannot be configured as a global unicast address. To configure an anycast address, run the ipv6 address anycast command.

Example

# Configure a global unicast address 2001:db8::/127 for GE0/1/1.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[~HUAWEI-GigabitEthernet0/1/1] ipv6 enable
[*HUAWEI-GigabitEthernet0/1/1] ipv6 address 2001:db8:: 127
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >