04-Layer 3 Configuration Guide

HomeSupportConfigure & DeployConfiguration GuidesH3C Access Controllers Configuration Guides(E3703P61 R2509P61 R3709P61 R2609P61 R3509P61)-6W10204-Layer 3 Configuration Guide
10-IPv6 Basics Configuration
Title Size Download
10-IPv6 Basics Configuration 328.04 KB

Configuring IPv6 basics

The term "router" in this document refers to both routers and routing-capable access controllers.

Overview

IPv6, also called IP next generation (IPng), was designed by the IETF as the successor to IPv4. The significant difference between IPv6 and IPv4 is that IPv6 increases the IP address size from 32 bits to 128 bits.

IPv6 features

Simplified header format

IPv6 removes several IPv4 header fields or moves them to the IPv6 extension headers to reduce the length of the basic IPv6 packet header. The basic IPv6 packet header has a fixed length of 40 bytes to simplify IPv6 packet handling and to improve forwarding efficiency. Although the IPv6 address size is four times larger than the IPv4 address size, the basic IPv6 packet header size is only twice the size of the option-less IPv4 packet header.

Figure 1 IPv4 packet header format and basic IPv6 packet header format

 

Larger address space

The source and destination IPv6 addresses are 128 bits (16 bytes) long. IPv6 can provide 3.4 x 1038 addresses to meet the requirements of hierarchical address division and the allocation of public and private addresses.

Hierarchical address structure

IPv6 uses the hierarchical address structure to speed up route lookups and reduce the IPv6 routing table size through route aggregation.

Address autoconfiguration

To simplify host configuration, IPv6 supports stateful and stateless address autoconfiguration:

·     Stateful address autoconfiguration enables a host to acquire an IPv6 address and other configuration information from a server (for example, a DHCP server).

·     Stateless address autoconfiguration enables a host to automatically generate an IPv6 address and other configuration information by using its link-layer address and the prefix information advertised by a router.

To communicate with other hosts on the same link, a host automatically generates a link-local address based on its link-layer address and the link-local address prefix (FE80::/10).

Built-in security

IPv6 defines extension headers to support IPsec. IPsec provides end-to-end security for network security solutions and enhances interoperability among different IPv6 applications.

QoS support

The Flow Label field in the IPv6 header allows the device to label the packets and facilitates the special handling of a flow.

Enhanced neighbor discovery mechanism

The IPv6 neighbor discovery protocol is implemented through a group of Internet Control Message Protocol version 6 (ICMPv6) messages to manage the information exchange among neighboring nodes on the same link. The group of ICMPv6 messages replaces Address Resolution Protocol (ARP) messages, Internet Control Message Protocol version 4 (ICMPv4) Router Discovery messages, and ICMPv4 Redirect messages and provides a series of other functions.

Flexible extension headers

IPv6 eliminates the Options field in the header and introduces optional extension headers to provide scalability and improve efficiency. The Options field in the IPv4 packet header contains up to 40 bytes, whereas the IPv6 extension headers are restricted to the maximum size of IPv6 packets.

IPv6 addresses

IPv6 address format

An IPv6 address is represented as a set of 16-bit hexadecimals separated by colons. An IPv6 address is divided into eight groups, and each 16-bit group is represented by four hexadecimal numbers, for example, 2001:0000:130F:0000:0000:09C0:876A:130B.

To simplify the representation of IPv6 addresses, you can handle zeros in IPv6 addresses by using the following methods:

·     The leading zeros in each group can be removed. For example, the above address can be represented in a shorter format as 2001:0:130F:0:0:9C0:876A:130B.

·     If an IPv6 address contains two or more consecutive groups of zeros, they can be replaced by a double colon (::). For example, the above address can be represented in the shortest format as 2001:0:130F::9C0:876A:130B.

 

CAUTION

CAUTION:

A double colon can appear once or not at all in an IPv6 address. This limit allows the device to determine how many zeros the double colon represents, and correctly convert it to zeros to restore a 128-bit IPv6 address.

 

An IPv6 address consists of an address prefix and an interface ID, which are equivalent to the network ID and the host ID of an IPv4 address respectively.

An IPv6 address prefix is written in IPv6-address/prefix-length notation, where the IPv6-address is represented in any of the formats previously mentioned and the prefix-length is a decimal number indicating how many leftmost bits of the IPv6 address comprises the address prefix.

IPv6 address types

IPv6 addresses include the following types:

·     Unicast addressAn identifier for a single interface, similar to an IPv4 unicast address. A packet sent to a unicast address is delivered to the interface identified by that address.

·     Multicast addressAn identifier for a set of interfaces (typically belonging to different nodes), similar to an IPv4 multicast address. A packet sent to a multicast address is delivered to all interfaces identified by that address.

There are no broadcast addresses in IPv6. Their function is replaced by multicast addresses.

·     Anycast addressAn identifier for a set of interfaces (typically belonging to different nodes). A packet sent to an anycast address is delivered to the nearest interface identified by that address. The nearest interface is chosen according to the routing protocols' measure of distance.

The type of an IPv6 address is designated by the first several bits, called the format prefix. Table 1 lists the mappings between address types and format prefixes.

Table 1 Mappings between address types and format prefixes

Type

Format prefix (binary)

IPv6 prefix ID

Unicast address

Unspecified address

00...0 (128 bits)

::/128

Loopback address

00...1 (128 bits)

::1/128

Link-local address

1111111010

FE80::/10

Site-local address

1111111011

FEC0::/10

Global unicast address

Other forms

N/A

Multicast address

11111111

FF00::/8

Anycast address

Anycast addresses use the unicast address space and have the identical structure of unicast addresses.

 

Unicast addresses

Unicast addresses comprise global unicast addresses, link-local unicast addresses, site-local unicast addresses, the loopback address, and the unspecified address:

·     Global unicast addresses, equivalent to public IPv4 addresses, are provided for network service providers. This type of address allows efficient prefix aggregation to restrict the number of global routing entries.

·     Link-local addresses are used for communication among link-local nodes for neighbor discovery and stateless autoconfiguration. Packets with link-local source or destination addresses are not forwarded to other links.

·     Site-local unicast addresses are similar to private IPv4 addresses. Packets with site-local source or destination addresses are not forwarded out of the local site (or a private network).

·     A loopback address is 0:0:0:0:0:0:0:1 (or ::1). It cannot be assigned to any physical interface and can be used by a node to send an IPv6 packet to itself in the same way as the loopback address in IPv4.

·     An unspecified address is 0:0:0:0:0:0:0:0 (or ::). It cannot be assigned to any node. Before acquiring a valid IPv6 address, a node fills this address in the source address field of IPv6 packets. The unspecified address cannot be used as a destination IPv6 address.

Multicast addresses

IPv6 multicast addresses listed in Table 2 are reserved for special purposes.

Table 2 Reserved IPv6 multicast addresses

Address

Application

FF01::1

Node-local scope all-nodes multicast address.

FF02::1

Link-local scope all-nodes multicast address.

FF01::2

Node-local scope all-routers multicast address.

FF02::2

Link-local scope all-routers multicast address.

FF05::2

Site-local scope all-routers multicast address.

 

Multicast addresses also include solicited-node addresses. A node uses a solicited-node multicast address to acquire the link-layer address of a neighboring node on the same link and to detect duplicate addresses. Each IPv6 unicast or anycast address has a corresponding solicited-node address. The format of a solicited-node multicast address is FF02:0:0:0:0:1:FFXX:XXXX. FF02:0:0:0:0:1:FF is fixed and consists of 104 bits, and XX:XXXX is the last 24 bits of an IPv6 unicast address or anycast address.

EUI-64 address-based interface identifiers

An interface identifier is 64 bits and uniquely identifies an interface on a link.

Interfaces generate EUI-64 (64-bit Extended Unique Identifier) address-based interface identifiers differently.

For an IEEE 802 interface (such as an Ethernet interface and a VLAN interface), the interface identifier is derived from the link-layer address (typically a MAC address) of the interface. The MAC address is 48 bits long.

To obtain an EUI-64 address-based interface identifier, follow these steps:

1.     Insert the hexadecimal number FFFE (16 bits of 1111111111111110) behind the 24th high-order bit of the MAC address.

2.     Invert the universal/local (U/L) bit (the seventh high-order bit). This operation makes the interface identifier have the same local or global significance as the MAC address.

Figure 2 Converting a MAC address into an EUI-64 address-based interface identifier

 

IPv6 neighbor discovery protocol

The IPv6 Neighbor Discovery (ND) protocol uses the following types of ICMPv6 messages to implement the following functions:

·     Address resolution

·     Neighbor reachability detection

·     Duplicate address detection

·     Router/prefix discovery and stateless address autoconfiguration

·     Redirection

Table 3 lists the types and functions of ICMPv6 messages used by the ND protocol.

Table 3 ICMPv6 messages used by ND

ICMPv6 message

Type

Function

Neighbor Solicitation (NS) message

135

Acquires the link-layer address of a neighbor.

Verifies whether a neighbor is reachable.

Detects duplicate addresses.

Neighbor Advertisement (NA) message

136

Responds to an NS message.

Notifies the neighboring nodes of link layer changes.

Router Solicitation (RS) message

133

Requests an address prefix and other configuration information for autoconfiguration after startup.

Router Advertisement (RA) message

134

Responds to an RS message.

Advertises information, such as the Prefix Information options and flag bits.

Redirect message

137

Informs the source host of a better next hop on the path to a particular destination when certain conditions are met.

 

Address resolution

This function is similar to the ARP function in IPv4. An IPv6 node acquires the link-layer addresses of neighboring nodes on the same link through NS and NA message exchanges. Figure 3 shows how Host A acquires the link-layer address of Host B on a single link.

Figure 3 Address resolution

 

The address resolution operates as follows:

1.     Host A multicasts an NS message. The source address of the NS message is the IPv6 address of the sending interface of Host A and the destination address is the solicited-node multicast address of Host B. The NS message contains the link-layer address of Host A.

2.     After receiving the NS message, Host B determines whether the destination address of the packet is its solicited-node multicast address. If yes, Host B learns the link-layer address of Host A, and then unicasts an NA message containing its link-layer address.

3.     Host A acquires the link-layer address of Host B from the NA message.

Neighbor reachability detection

After Host A acquires the link-layer address of its neighbor Host B, Host A can use NS and NA messages to check whether Host B is reachable.

1.     Host A sends an NS message whose destination address is the IPv6 address of Host B.

2.     If Host A receives an NA message from Host B, Host A decides that Host B is reachable. Otherwise, Host B is unreachable.

Duplicate address detection

After Host A acquires an IPv6 address, it performs Duplicate Address Detection (DAD) to check whether the address is being used by any other node (similar to the gratuitous ARP function in IPv4). DAD is accomplished through NS and NA message exchanges. Figure 4 shows the DAD process.

Figure 4 Duplicate address detection

 

1.     Host A sends an NS message whose source address is the unspecified address and whose destination address is the corresponding solicited-node multicast address of the IPv6 address to be detected. The NS message contains the IPv6 address.

2.     If Host B uses this IPv6 address, Host B returns an NA message. The NA message contains the IPv6 address of Host B.

3.     Host A learns that the IPv6 address is being used by Host B after receiving the NA message from Host B. If receiving no NA message, Host A decides that the IPv6 address is not in use and uses this address.

Router/prefix discovery and stateless address autoconfiguration

A node performs router/prefix discovery and stateless address autoconfiguration as follows:

1.     At startup, a node sends an RS message to request the configuration information from a router.

2.     The router returns an RA message containing the Prefix Information option and other configuration information. (The router also periodically sends an RA message.)

3.     The node automatically generates an IPv6 address and other configuration parameters according to the configuration information in the RA message.

The Prefix Information option contains an address prefix, and the preferred lifetime and valid lifetime of the address prefix. A node updates the preferred lifetime and valid lifetime upon receiving a periodic RA message.

The generated IPv6 address is valid within the valid lifetime and becomes invalid when the valid lifetime expires.

After the preferred lifetime expires, the node cannot use the generated IPv6 address to establish new connections, but can receive packets destined for the IPv6 address. The preferred lifetime cannot be greater than the valid lifetime.

Redirection

Upon receiving a packet from a host, the gateway sends an ICMPv6 Redirect message to inform a better next hop to the host when the following conditions are met (similar to the ICMP redirection function in IPv4):

·     The receiving interface is the forwarding interface.

·     The selected route is not created or modified by an ICMPv6 Redirect message.

·     The selected route is not the default route.

IPv6 path MTU discovery

The links that a packet passes from a source to a destination might have different MTUs. In IPv6, when the packet size exceeds the path MTU of a link, the packet is fragmented at the source end of the link to reduce the processing pressure on intermediate devices and to use network resources effectively.

The path MTU discovery mechanism is designed to find the minimum MTU of all links in the path between a source and a destination. Figure 5 shows how a source host discovers the path MTU to a destination host.

Figure 5 Path MTU discovery process

 

1.     The source host compares its MTU with the packet to be sent, performs necessary fragmentation, and sends the resulting packet to the destination host.

2.     If the MTU supported by a forwarding interface is smaller than the packet, the device discards the packet and returns an ICMPv6 error message containing the interface MTU to the source host.

3.     After receiving the ICMPv6 error message, the source host uses the returned MTU to limit the packet size, performs fragmentation, and sends the resulting packet to the destination host.

4.     Step 2 and step 3 are repeated until the destination host receives the packet. In this way, the source host discovers the minimum MTU of all links in the path to the destination host.

IPv6 transition technologies

IPv6 transition technologies enable communication between IPv4 and IPv6 networks.

Dual stack is the most direct transition method. A network node that supports both IPv4 and IPv6 is a dual stack node. A dual stack node configured with an IPv4 address and an IPv6 address can forward both IPv4 and IPv6 packets. For an upper layer application that supports both IPv4 and IPv6, either TCP or UDP can be selected at the transport layer, whereas the IPv6 stack is preferred at the network layer. Dual stack is suitable for communication between IPv4 nodes or between IPv6 nodes. It is the basis of all transition technologies. However, it does not solve the IPv4 address depletion issue because each dual stack node must have a globally unique IP address.

Protocols and standards

Protocols and standards related to IPv6 include:

·     RFC 1881, IPv6 Address Allocation Management

·     RFC 1887, An Architecture for IPv6 Unicast Address Allocation

·     RFC 1981, Path MTU Discovery for IP version 6

·     RFC 2375, IPv6 Multicast Address Assignments

·     RFC 2460, Internet Protocol, Version 6 (IPv6) Specification

·     RFC 2464, Transmission of IPv6 Packets over Ethernet Networks

·     RFC 2526, Reserved IPv6 Subnet Anycast Addresses

·     RFC 2894, Router Renumbering for IPv6

·     RFC 3307, Allocation Guidelines for IPv6 Multicast Addresses

·     RFC 3513, Internet Protocol Version 6 (IPv6) Addressing Architecture

·     RFC 4191, Default Router Preferences and More-Specific Routes

·     RFC 4443, Internet Control Message Protocol (ICMPv6) for the Internet Protocol Version 6 (IPv6) Specification

·     RFC 4861, Neighbor Discovery for IP Version 6 (IPv6)

·     RFC 4862, IPv6 Stateless Address Autoconfiguration

IPv6 basics configuration task list

Task

Remarks

Configuring basic IPv6 functions

Enabling IPv6

Required.

Configuring an IPv6 global unicast address

Required to configure one.

Configuring an IPv6 link-local address

Configure an IPv6 anycast address

Configuring IPv6 ND

Configuring a static neighbor entry

Optional.

Setting the maximum number of dynamic neighbor entries

Optional.

Setting the aging timer for ND entries in stale state

Optional.

Configuring parameters related to RA messages

Optional.

Configuring the maximum number of attempts to send an NS message for DAD

Optional.

Configuring a static path MTU for a specific IPv6 address

Optional.

Configuring the aging time for dynamic path MTUs

Optional.

Configuring IPv6 TCP properties

Optional.

Configuring IPv6 FIB load sharing

Optional.

Configuring ICMPv6 message sending

Configuring the maximum ICMPv6 error messages sent in an interval

Optional.

Enabling replying to multicast echo requests

Optional.

Enabling sending ICMPv6 time exceeded messages

Optional.

Enabling sending ICMPv6 destination unreachable messages

Optional.

Enabling sending ICMPv6 redirect messages

Optional.

 

Configuring basic IPv6 functions

Enabling IPv6

Enable IPv6 before you perform any IPv6-related configuration. Without IPv6 enabled, an interface cannot forward IPv6 packets even if it has an IPv6 address configured.

To enable IPv6:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable IPv6.

ipv6

Disabled by default.

 

Configuring an IPv6 global unicast address

Configure an IPv6 global unicast address in either of the following ways:

·     EUI-64 IPv6 addressingThe IPv6 address prefix of an interface is manually configured, and the interface identifier is generated automatically by the interface.

·     Manual configurationThe IPv6 global unicast address is configured manually.

·     Prefix-generated addressThe IPv6 global unicast address is generated automatically based on the applied IPv6 prefix, specified sub-prefix bit, and host bit information.

You can configure multiple IPv6 global unicast addresses with different prefixes on an interface.

A manually configured global unicast address takes precedence over an automatically generated one. If a global unicast address has been automatically generated on an interface when you manually configure another one with the same address prefix, the latter overwrites the previous. The overwritten automatic global unicast address is not restored even if the manual one is removed. Alternatively, a new global unicast address is automatically generated based on the address prefix information in the RA message that the interface receives next time.

EUI-64 IPv6 addressing

To configure an interface to generate an EUI-64 IPv6 address:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure the interface to generate an EUI-64 IPv6 address.

ipv6 address ipv6-address/prefix-length eui-64

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

 

Manual configuration

To specify an IPv6 address manually for an interface:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure an IPv6 address manually.

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

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

 

Applying a prefix to generate an IPv6 address

Before you apply a prefix to an interface to generate an IPv6 address, create an IPv6 prefix with one of the following methods:

·     Use the ipv6 prefix command to create a static IPv6 prefix.

·     Configure the device to use DHCPv6 for prefix acquisition. The client generates an IPv6 prefix with a specific ID based on the prefix obtained from the DHCPv6 server. For more information, see the ipv6 dhcp client pd command in Layer 3 Command Reference.

To apply an IPv6 prefix to an interface to generate an IPv6 address:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Create an IPv6 prefix.

·     Specify a static IPv6 prefix:
ipv6 prefix
prefix-number ipv6-prefix/prefix-length

·     Configure the device to obtain an IPv6 prefix from the DHCPv6 server, and generate an IPv6 prefix with a specific ID:
See "Configuring
the DHCPv6 client."

By default, no IPv6 prefix is configured on the device.

3.     Enter interface view.

interface interface-type interface-number

N/A

4.     Apply a prefix to generate an IPv6 address.

ipv6 address prefix-number sub-prefix/prefix-length

By default, no prefix is applied for IPv6 address generation on an interface.

 

Configuring an IPv6 link-local address

IPv6 link-local addresses can be configured in either of the following ways:

·     Automatic generation—The device automatically generates a link-local address for an interface according to the link-local address prefix (FE80::/10) and the link-layer address of the interface.

·     Manual assignment—IPv6 link-local addresses can be assigned manually.

An interface can have only one link-local address. To avoid link-local address conflicts, use the automatic generation method.

Manual assignment takes precedence over automatic generation.

·     If you first use automatic generation and then manual assignment, the manually assigned link-local address overwrites the automatically generated one.

·     If you first use manual assignment and then automatic generation, the automatically generated link-local address does not take effect and the link-local address is still the manually assigned one. If you delete the manually assigned address, the automatically generated link-local address is becomes effective.

To configure automatic generation of an IPv6 link-local address for an interface:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure the interface to automatically generate an IPv6 link-local address.

ipv6 address auto link-local

Optional.

By default, no link-local address is configured on an interface.

After an IPv6 global unicast address is configured on the interface, a link-local address is generated automatically.

 

To manually configure an IPv6 link-local address:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure an IPv6 link-local address manually.

ipv6 address ipv6-address link-local

Optional.

By default, no link-local address is configured on an interface.

After an IPv6 global unicast address is configured on the interface, a link-local address is generated automatically.

 

After an IPv6 global unicast address is configured for an interface, a link-local address is generated automatically. The automatically generated link-local address is the same as the one generated by using the ipv6 address auto link-local command. If a link-local address is manually assigned to an interface, this manual link-local address takes effect. If the manually assigned link-local address is removed, the automatically generated link-local address takes effect.

The undo ipv6 address auto link-local command only removes the link-local addresses generated through the ipv6 address auto link-local command. However, if an IPv6 global unicast address is already configured for an interface, the interface still has a link-local address because the system automatically generates one for the interface. If no IPv6 global unicast address is configured, the interface has no link-local address.

Configure an IPv6 anycast address

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure an IPv6 anycast address.

ipv6 address ipv6-address/prefix-length anycast

Optional.

By default, no IPv6 anycast address is configured on an interface.

 

Configuring IPv6 ND

Configuring a static neighbor entry

The IPv6 address of a neighboring node can be resolved into a link-layer address dynamically through NS and NA messages or through a manually configured static neighbor entry.

The device uniquely identifies a static neighbor entry by the neighbor's IPv6 address and the local Layer 3 interface number. You can configure a static neighbor entry by using either of the following methods.

·     Method 1Associate a neighbor IPv6 address and link-layer address with the Layer 3 interface of the local node.

If you use Method 1, the device automatically finds the Layer 2 port connected to the neighbor.

·     Method 2Associate a neighbor IPv6 address and link-layer address with a port in a VLAN containing the local node.

If you use Method 2, make sure the corresponding VLAN interface exists and that the Layer 2 port specified by port-type port-number belongs to the VLAN specified by vlan-id. The device associates the VLAN interface with the neighbor IPv6 address to identify the static neighbor entry.

To configure a static neighbor entry:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure a static neighbor entry.

ipv6 neighbor ipv6-address mac-address { vlan-id port-type port-number | interface interface-type interface-number }

By default, no static neighbor entry exists on the device.

 

Setting the maximum number of dynamic neighbor entries

The device can dynamically acquire the link-layer address of a neighboring node through NS and NA messages and add it into the neighbor table. When the number of dynamically learned neighbors reaches the threshold, the interface stops learning neighbor information. To prevent the interface from occupying too many neighbor table resources, you can set the maximum number of dynamic neighbor entries that an interface can learn.

To configure the maximum number of dynamic neighbor entries:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure the maximum number of dynamic neighbor entries that an interface can learn.

ipv6 neighbors max-learning-num number

Optional.

By default, a Layer 2 interface does not limit the number of dynamic neighbor entries. The maximum number of dynamic neighbor entries that a Layer 3 interface can learn varies with devices. For more information, see About the H3C Access Controllers Command References.

 

Setting the aging timer for ND entries in stale state

ND entries in stale state have an aging timer. If an ND entry in stale state is not refreshed before the timer expires, it transits to the delay state. If it is still not refreshed in five seconds, the ND entry transits to the probe state, and the device sends an NS message for detection. If no response is received, the device removes the ND entry.

To set the aging timer for ND entries in stale state:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Set the aging timer for ND entries in stale state.

ipv6 neighbor stale-aging aging-time

Optional.

Four hours by default.

 

Configuring parameters related to RA messages

You can enable an interface to send RA messages, and configure the interval for sending RA messages and parameters in RA messages. After receiving an RA message, a host can use these parameters to perform corresponding operations. Table 4 lists and describes the configurable parameters in an RA message.

Table 4 Parameters in an RA message and their descriptions

Parameters

Description

Cur Hop Limit

When sending an IPv6 packet, a host uses the value to fill the Hop Limit field in IPv6 headers. The value is also filled into the Hop Limit field in the response packet of a device.

Prefix Information options

After receiving the prefix information, the hosts on the same link can perform stateless autoconfiguration.

MTU

Guarantees that all nodes on a link use the same MTU value.

M flag

Determines whether hosts use stateful autoconfiguration to acquire IPv6 addresses.

If the M flag is set to 1, hosts use stateful autoconfiguration (for example, through a DHCP server) to acquire IPv6 addresses. Otherwise, hosts use stateless autoconfiguration to acquire IPv6 addresses and generate IPv6 addresses according to their own link-layer addresses and the obtained prefix information.

O flag

Determines whether hosts use stateful autoconfiguration to acquire other configuration information.

If the O flag is set to 1, hosts use stateful autoconfiguration (for example, through a DHCP server) to acquire other configuration information. Otherwise, hosts use stateless autoconfiguration to acquire other configuration information.

Router Lifetime

This field tells the receiving hosts how long the advertising device can live.

Retrans Timer

If the device fails to receive a response message within the specified time after sending an NS message, it retransmits the NS message.

Reachable Time

If the neighbor reachability detection shows that a neighbor is reachable, the device considers the neighbor reachable within the specified reachable time. If the device must send a packet to the neighbor after the specified reachable time expires, the device reconfirms whether the neighbor is reachable.

 

The maximum interval for sending RA messages should be less than or equal to the router lifetime in RA messages, so the router can be updated through an RA message before expiration.

The values of the NS retransmission timer and the reachable time configured for an interface are sent to hosts through RA messages. Furthermore, this interface sends NS messages at the interval of the NS retransmission timer and considers a neighbor reachable within the reachable time.

Enabling sending of RA messages

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Disable RA message suppression.

undo ipv6 nd ra halt

By default, RA messages are suppressed.

4.     Configure the maximum and minimum intervals for sending RA messages.

ipv6 nd ra interval max-interval-value min-interval-value

Optional.

By default, the maximum interval for sending RA messages is 600 seconds, and the minimum interval is 200 seconds.

The device sends RA messages at random intervals between the maximum interval and the minimum interval.

The minimum interval should be less than or equal to 0.75 times the maximum interval.

 

Configuring parameters related to RA messages

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure the hop limit.

ipv6 nd hop-limit value

Optional.

64 by default.

3.     Enter interface view.

interface interface-type interface-number

N/A

4.     Configure the prefix information in RA messages.

ipv6 nd ra prefix { ipv6-prefix prefix-length | ipv6-prefix/prefix-length } valid-lifetime preferred-lifetime [ no-autoconfig | off-link ] *

Optional.

By default, no prefix information is configured for RA messages, and the IPv6 address of the interface sending RA messages is used as the prefix information with valid lifetime 2592000 seconds (30 days) and preferred lifetime 604800 seconds (seven days).

5.     Turn off the MTU option in RA messages.

ipv6 nd ra no-advlinkmtu

Optional.

By default, RA messages contain the MTU option.

6.     Set the M flag bit to 1.

ipv6 nd autoconfig managed-address-flag

Optional.

By default, the M flag bit is set to 0 and hosts acquire IPv6 addresses through stateless autoconfiguration.

7.     Set the O flag bit to 1.

ipv6 nd autoconfig other-flag

Optional.

By default, the O flag bit is set to 0 and hosts acquire other configuration information through stateless autoconfiguration.

8.     Configure the router lifetime in RA messages.

ipv6 nd ra router-lifetime value

Optional.

The default setting is 1800 seconds.

9.     Set the NS retransmission timer.

ipv6 nd ns retrans-timer value

Optional.

By default, the local interface sends NS messages at 1000 millisecond intervals, and the value of the Retrans Timer field in RA messages sent by the local interface is 0. The interval for retransmitting an NS message is determined by the receiving device.

10.     Set the reachable time.

ipv6 nd nud reachable-time value

Optional.

By default, the neighbor reachable time on the local interface is 30000 milliseconds, and the value of the Reachable Time field in the RA messages sent by the local interface is 0. The neighbor reachable time is determined by the receiving device.

 

Configuring the maximum number of attempts to send an NS message for DAD

An interface sends an NS message for DAD after acquiring an IPv6 address. If the interface does not receive a response within a specific time (determined by the ipv6 nd ns retrans-timer command), it continues to send an NS message. If the interface still does not receive a response after the number of sent attempts reaches the threshold (specified with the ipv6 nd dad attempts command), the acquired address is considered usable.

To configure the attempts to send an NS message for DAD:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enter interface view.

interface interface-type interface-number

N/A

3.     Configure the number of attempts to send an NS message for DAD.

ipv6 nd dad attempts value

Optional.

1 by default. When the value argument is set to 0, DAD is disabled.

 

Configuring path MTU discovery

This section describes how to configure path MTU discovery.

Configuring a static path MTU for a specific IPv6 address

You can configure a static path MTU for a specific destination IPv6 address. When a source host sends a packet through an interface, it compares the interface MTU with the static path MTU of the specified destination IPv6 address. If the packet size is larger than the smaller of the two values, the host fragments the packet according to the smaller value.

To configure a static path MTU for a specific IPv6 address:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure a static path MTU for a specific IPv6 address.

ipv6 pathmtu ipv6-address [ value ]

Not configured by default.

 

Configuring the aging time for dynamic path MTUs

After the path MTU from a source host to a destination host is dynamically determined (see "Configuring path MTU discovery"), the source host sends subsequent packets to the destination host based on this MTU. After the aging time expires, the dynamic path MTU is removed and the source host re-determines a dynamic path MTU through the path MTU mechanism.

The aging time is invalid for a static path MTU.

To configure the aging time for dynamic path MTUs:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure the aging time for dynamic path MTUs.

ipv6 pathmtu age age-time

Optional.

10 minutes by default.

 

Configuring IPv6 TCP properties

You can configure the following IPv6 TCP properties:

·     synwait timerWhen a SYN packet is sent, the synwait timer is triggered. If no response packet is received before the synwait timer expires, the IPv6 TCP connection establishment fails.

·     finwait timerWhen the IPv6 TCP connection status is FIN_WAIT_2, the finwait timer is triggered. If no packet is received before the finwait timer expires, the IPv6 TCP connection is terminated. If a FIN packet is received, the IPv6 TCP connection status becomes TIME_WAIT. If non-FIN packets are received, the finwait timer is reset upon receipt of the last non-FIN packet and the connection is terminated after the finwait timer expires.

·     Size of the IPv6 TCP sending/receiving buffer.

To configure IPv6 TCP properties:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Set the synwait timer.

tcp ipv6 timer syn-timeout wait-time

Optional.

75 seconds by default.

3.     Set the finwait timer.

tcp ipv6 timer fin-timeout wait-time

Optional.

675 seconds by default.

4.     Set the size of the IPv6 TCP sending/receiving buffer.

tcp ipv6 window size

Optional.

8 KB by default.

 

Configuring IPv6 FIB load sharing

In the IPv6 FIB load sharing mode, the device can decide how to select equal cost multi-paths (ECMP) to forward packets. The device supports the following load sharing modes:

·     Load sharing based on the HASH algorithmAn algorithm based on the source IPv6 address and destination IPv6 address is adopted to select an ECMP route to forward packets.

·     Load sharing based on pollingEach ECMP route is used in turn to forward packets.

To configure the IPv6 FIB load sharing:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure the IPv6 FIB load sharing mode.

·     Configure load sharing based on the hash algorithm:
ipv6 fib-loadbalance-type hash-based

·     Configure load sharing based on polling:
undo ipv6 fib-loadbalance-type hash-based

Optional.

By default, load sharing based on polling is adopted and ECMP routes are used in turn to forward packets.

 

Configuring ICMPv6 message sending

This section describes how to configure ICMPv6 message sending.

Configuring the maximum ICMPv6 error messages sent in an interval

If too many ICMPv6 error messages are sent within a short period in a network, network congestion might occur. To avoid network congestion, you can control the maximum number of ICMPv6 error messages sent within a specific time by adopting the token bucket algorithm.

You can set the capacity of a token bucket to determine the number of tokens in the bucket. In addition, you can set the update interval of the token bucket, that is, the interval for restoring the configured capacity. One token allows one ICMPv6 error message to be sent. Each time an ICMPv6 error message is sent, the number of tokens in a token bucket decreases by one. If the number of ICMPv6 error messages successively sent exceeds the capacity of the token bucket, the additional ICMPv6 error messages cannot be sent out until the capacity of the token bucket is restored.

To configure the capacity and update interval of the token bucket:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Configure the capacity and update interval of the token bucket.

ipv6 icmp-error { bucket bucket-size | ratelimit interval } *

Optional.

By default, the capacity of a token bucket is 10 and the update interval is 100 milliseconds. A maximum of 10 ICMPv6 error messages can be sent within 100 milliseconds.

The update interval "0" indicates that the number of ICMPv6 error messages sent is not restricted.

 

Enabling replying to multicast echo requests

If hosts are configured to answer multicast echo requests, an attacker might use this mechanism to attack a host. For example, if Host A (an attacker) sends an echo request with the source being Host B to a multicast address, all the hosts in the multicast group send echo replies to Host B. To prevent such an attack, disable a device from answering multicast echo requests by default. In some application scenarios, however, you need to enable the device to answer multicast echo requests.

To enable replying to multicast echo requests:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable replying to multicast echo requests.

ipv6 icmpv6 multicast-echo-reply enable

The device is disabled from replying to multicast echo requests.

 

Enabling sending ICMPv6 time exceeded messages

A device sends out an ICMPv6 Time Exceeded message in the following cases:

·     If a received IPv6 packet's destination IP address is not a local address and its hop limit is 1, the device sends an ICMPv6 Hop Limit Exceeded message to the source.

·     Upon receiving the first fragment of an IPv6 datagram with the destination IP address being the local address, the device starts a timer. If the timer expires before all the fragments arrive, an ICMPv6 Fragment Reassembly Timeout message is sent to the source.

If large quantities of malicious packets are received, the performance of a device degrades greatly because it must send back ICMP Time Exceeded messages. You can disable sending ICMPv6 Time Exceeded messages.

To enable sending ICMPv6 time exceeded messages:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable sending ICMPv6 Time Exceeded messages.

ipv6 hoplimit-expires enable

Optional.

Enabled by default.

 

Enabling sending ICMPv6 destination unreachable messages

If the device fails to forward a received IPv6 packet because of one of the following reasons, it drops the packet and sends a corresponding ICMPv6 Destination Unreachable error message to the source.

·     If no route is available for forwarding the packet, the device sends a "no route to destination" ICMPv6 error message to the source.

·     If the device fails to forward the packet because of an administrative prohibition (such as a firewall filter or an ACL), the device sends the source a "destination network administratively prohibited" ICMPv6 error message.

·     If the device fails to deliver the packet because the destination is beyond the scope of the source IPv6 address (for example, the source IPv6 address of the packet is a link-local address whereas the destination IPv6 address of the packet is a global unicast address), the device sends the source a "beyond scope of source address" ICMPv6 error message.

·     If the device fails to resolve the corresponding link layer address of the destination IPv6 address, the device sends the source an "address unreachable" ICMPv6 error message.

·     If the packet with the destination being local and transport layer protocol being UDP and the packet's destination port number does not match the running process, the device sends the source a "port unreachable" ICMPv6 error message.

If an attacker sends abnormal traffic that causes the device to generate ICMPv6 destination unreachable messages, end users might be affected. To prevent such attacks, you can disable the device from sending ICMPv6 destination unreachable messages.

To enable sending ICMPv6 destination unreachable messages:

 

Step

Command

Remarks

1.     Enter system view.

system-view

N/A

2.     Enable sending ICMPv6 destination unreachable messages.

ipv6 unreachables enable

Disabled by default.

 

Enabling sending ICMPv6 redirect messages

When a device receives a large number of attack packets that require the device to send ICMPv6 redirect packets, the device's performance is degraded for processing these packets. To protect the device from such attacks, you can use the undo form of the following command to disable sending ICMPV6 redirect messages.

To enable sending ICMPv6 redirect messages:

 

Step

Command

Remarks

1.     Enter system view

system-view

N/A

2.     Enable sending ICMPv6 redirect messages

ipv6 redirects enable

Optional.

By default, this function is disabled.

 

Displaying and maintaining IPv6 basics configuration

Task

Command

Remarks

Display IPv6 FIB entries.

display ipv6 fib [ acl6 acl6-number | ipv6-prefix ipv6-prefix-name ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display the IPv6 FIB entry of a specific destination IPv6 address.

display ipv6 fib ipv6-address [ prefix-length ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display IPv6 information about an interface.

display ipv6 interface [ interface-type [ interface-number ] ] [ brief ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display IPv6 prefixes information.

display ipv6 prefix [ prefix-number ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display neighbor information.

display ipv6 neighbors { ipv6-address | all | dynamic | interface interface-type interface-number | static | vlan vlan-id } [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display the total number of neighbor entries meeting the specified conditions.

display ipv6 neighbors { all | dynamic | interface interface-type interface-number | static | vlan vlan-id } count [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display the IPv6 path MTU information.

display ipv6 pathmtu { ipv6-address | all | dynamic | static } [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display socket information.

display ipv6 socket [ socktype socket-type ] [ task-id socket-id ] [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display the statistics of IPv6 packets and ICMPv6 packets.

display ipv6 statistics [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display IPv6 TCP connection statistics.

display tcp ipv6 statistics [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display IPv6 TCP connection status information.

display tcp ipv6 status [ | { begin | exclude | include } regular-expression ]

Available in any view.

Display the statistics of IPv6 UDP packets.

display udp ipv6 statistics [ | { begin | exclude | include } regular-expression ]

Available in any view.

Clear IPv6 neighbor information.

reset ipv6 neighbors { all | dynamic | interface interface-type interface-number | static }

Available in user view.

Clear the path MTU values.

reset ipv6 pathmtu { all | static | dynamic}

Available in user view.

Clear the statistics of IPv6 and ICMPv6 packets.

reset ipv6 statistics

Available in user view.

Clear all IPv6 TCP connection statistics.

reset tcp ipv6 statistics

Available in user view.

Clear the statistics of all IPv6 UDP packets.

reset udp ipv6 statistics

Available in user view.

 

IPv6 basics configuration example

Network requirements

·     Add the Ethernet ports of AP and AC to corresponding VLANs, configure IPv6 addresses for the VLAN interfaces, and verify the connectivity between them.

·     The global unicast address of VLAN-interface 1 on AC is 2001::1/64.

·     IPv6 is enabled for the client to automatically get an IPv6 address through IPv6 ND.

Figure 6 Network diagram

 

 

NOTE:

The VLAN interfaces have been created on the AC.

 

Configuration procedure

1.     Configure the AC:

# Configure basic functions of the AC. For more information, see WLAN Configuration Guide. (Details not shown.)

# Enable IPv6.

<AC> system-view

[AC] ipv6

# Specify a global unicast address for VLAN-interface 1, and allow it to advertise RA messages (no interface advertises RA messages by default).

[AC] interface vlan-interface 1

[AC-Vlan-interface1] ipv6 address 2001::1/64

[AC-Vlan-interface1] undo ipv6 nd ra halt

2.     Enable IPv6 on the client to automatically get an IPv6 address through IPv6 NDP.

[AC-Vlan-interface1] display ipv6 neighbors interface gigabitEthernet 1/0/2

                Type: S-Static    D-Dynamic

IPv6 Address               Link-layer      VID  Interface    State T Age

FE80::215:E9FF:FEA6:7D14   0015-e9a6-7d14  1    GE1/0/2      STALE D 1238

2001::15B:E0EA:3524:E791   0015-e9a6-7d14  1    GE1/0/2      STALE D 1248

The output shows that the IPv6 global unicast address that the client obtained is 2001::15B:E0EA:3524:E791.

Verifying the configuration

# Display the IPv6 interface settings on the AC.

[AC-Vlan-interface1] display ipv6 interface vlan-interface 1

Vlan-interface1 current state :UP

Line protocol current state :UP

IPv6 is enabled, link-local address is FE80::20F:E2FF:FE00:1C0

  Global unicast address(es):

    2001::1, subnet is 2001::/64

  Joined group address(es):

    FF02::1:FF00:0

    FF02::1:FF00:1

    FF02::1:FF00:1C0

    FF02::2

    FF02::1

  MTU is 1500 bytes

  ND DAD is enabled, number of DAD attempts: 1

  ND reachable time is 30000 milliseconds

  ND retransmit interval is 1000 milliseconds

  ND advertised reachable time is 0 milliseconds

  ND advertised retransmit interval is 0 milliseconds

  ND router advertisements are sent every 600 seconds

  ND router advertisements live for 1800 seconds

  Hosts use stateless autoconfig for addresses

IPv6 Packet statistics:

  InReceives:                    272

  InTooShorts:                   0

  InTruncatedPkts:               0

  InHopLimitExceeds:             0

  InBadHeaders:                  0

  InBadOptions:                  0

  ReasmReqds:                    0

  ReasmOKs:                      0

  InFragDrops:                   0

  InFragTimeouts:                0

  OutFragFails:                  0

  InUnknownProtos:               0

  InDelivers:                    159

  OutRequests:                   1012

  OutForwDatagrams:              35

  InNoRoutes:                    0

  InTooBigErrors:                0

  OutFragOKs:                    0

  OutFragCreates:                0

  InMcastPkts:                   79

  InMcastNotMembers:             65

  OutMcastPkts:                  938

  InAddrErrors:                  0

  InDiscards:                    0

  OutDiscards:                   0

# Ping the AC on the client, and ping the client on the AC to verify the connectivity between them.

 

 

NOTE:

To ping a link-local address, use the –i parameter to specify an interface for the link-local address.

 

 [AC-Vlan-interface1] ping ipv6 -c 1 2001::15B:E0EA:3524:E791

  PING 2001::15B:E0EA:3524:E791 : 56  data bytes, press CTRL_C to break

    Reply from 2001::15B:E0EA:3524:E791

    bytes=56 Sequence=1 hop limit=63  time = 3 ms

 

  --- 2001::15B:E0EA:3524:E791 ping statistics ---

    1 packet(s) transmitted

    1 packet(s) received

    0.00% packet loss

    round-trip min/avg/max = 3/3/3 ms

The output shows that the ping operation from the client is successful.

Troubleshooting IPv6 basics configuration

Symptom

The peer IPv6 address cannot be pinged.

Solution

1.     Use the display current-configuration command in any view or the display this command in system view to verify that IPv6 is enabled. For more information about the display current-configuration command, see Fundamentals Configuration Guide.

2.     Use the display ipv6 interface command in any view to verify that the IPv6 address of the interface is correct and the interface is up.

3.     Use the debugging ipv6 packet command in user view to enable the debugging for IPv6 packets to help locate the cause.

 

  • Cloud & AI
  • InterConnect
  • Intelligent Computing
  • Intelligent Storage
  • Security
  • SMB Products
  • Intelligent Terminal Products
  • Product Support Services
  • Technical Service Solutions
All Services
  • Resource Center
  • Policy
  • Online Help
  • Technical Blogs
All Support
  • Become A Partner
  • Partner Policy & Program
  • Global Learning
  • Partner Sales Resources
  • Partner Business Management
  • Service Business
All Partners
  • Profile
  • News & Events
  • Online Exhibition Center
  • Contact Us
All About Us
新华三官网