01-09 Basic IPv6 Configuration PDF
01-09 Basic IPv6 Configuration PDF
The IPv6 protocol stack supports routing protocols and application protocols on an
IPv6 network.
9.1 Overview of IPv6
9.2 Understanding IPv6
9.3 Licensing Requirements and Limitations for IPv6
9.4 Default Settings for IPv6
9.5 Configuring IPv6 Addresses for Interfaces
9.6 Configuring ICMPv6 Error Packet Control
9.7 Configuring IPv6 Neighbor Discovery
9.8 Disabling a Device from Packetizing ND Packets and ND Miss Messages
9.9 Configuring the Optimized ND Reply Function
9.10 Configuring the Trap Function for Hash Conflicts of ND Entries
9.11 Configuring PMTU
9.12 Configuring TCP6
9.13 Maintaining IPv6
9.14 Example for Configuring IPv6 Addresses for Interfaces
Purpose
IPv6 was developed in response to rapidly increasing Internet use. IPv4, despite
being easy to implement, simple to use, and providing good interoperability, is no
longer feasible as the dominant network layer protocol. This is mainly due to IPv4
address exhaustion.
Table 9-1 shows how IPv6 overcomes many of the deficiencies found in IPv4.
Address IPv4 addresses are 32 bits long, IPv6 addresses are 128 bits
space theoretically giving an available long. A 128 bit structure allows
IP address space that contains for an address space of 2128
about 4.3 billion IP addresses. The (4.3 billion x 4.3 billion x 4.3
currently available IP addresses billion x 4.3 billion) possible
are no longer sufficient to addresses. This vast address
continually support the rapid space makes it very unlikely
expansion of the Internet. IPv4 that IPv6 address exhaustion
address resources are allocated will ever occur.
unevenly. USA address resources
account for almost half of the
global address space, with barely
enough addresses left for Europe,
and still fewer for the Asia-Pacific
area. Furthermore, the
development of mobile IP and
broadband technologies still
requires more IP addresses. The
process of IP addresses being
used up is known as IP address
exhaustion.
While several solutions to IPv4
exhaustion are currently in place,
such as Classless Inter-domain
Routing (CIDR) and Network
Address Translator (NAT), they all
have significant disadvantages.
These disadvantages prompted
the development of IPv6.
Packet The IPv4 packet header carries Unlike the IPv4 packet header,
format the Options field, including the IPv6 packet header does
security, timestamp, and record not carry IHL, identifier, flag,
route options. The variable length fragment offset, header
of the Options field makes the checksum, option, or padding
IPv4 packet header length range fields, but it carries the flow
from 20 bytes to 60 bytes. IPv4 label field. This facilitates IPv6
packets often need to be packet processing and
forwarded by intermediate improves processing efficiency.
devices. Therefore, using the To support various options
Options field occupies a large without changing the existing
amount of resources, which packet format, the Extension
means this field is rarely used in Header information field is
practice. added to the IPv6 packet
header, improving IPv6
flexibility.
Quality of IPv4 has no native mechanism to The Flow Label field in IPv6
Service support QoS, especially when guarantees QoS for voice, data,
(QoS) regarding real-time forwarding of and video services.
support voice, data, and video services
such as network conferencing,
network telephones, and network
TVs.
NOTE
An IPv6 address can contain only one double colon (::). Otherwise, a computer cannot
determine the number of zeros in a group when restoring the compressed address to the
original 128-bit address.
If the first 3 bits of an IPv6 unicast address are not 000, the interface ID must contain 64
bits. If the first 3 bits are 000, there is no such limitation.
You can manually configure the interface ID, generate it through system software,
or generate it in IEEE 64-bit Extended Unique Identifier (EUI-64) format.
Generating an interface ID in EUI-64 format is the most common practice.
IEEE EUI-64 standards convert an interface MAC address into an IPv6 interface ID.
Figure 9-1 shows a 48-bit MAC address. When used as an interface ID, the first 24
bits (expressed by c) are a vendor identifier, and the last 24 bits (expressed by m)
are an extension identifier. If the higher seventh bit is 0, the MAC address is locally
unique. During conversion, EUI-64 inserts FFFE between the vendor identifier and
extension identifier. The higher seventh bit also changes from 0 to 1 to indicate
that the interface ID is globally unique.
MAC
address cccccc0 ccccccccccccccccc mmmmmmmmmmmmmmmmmmmmmmmm
1111111111111110
Insert FFFE
cccccc0 ccccccccccccccccc 1111111111111110m mm m. . . mmmm
Change the
seventh high bit
to 1 cccccc1 ccccccccccccccccc 1111111111111110m m m m . . . mmmm
Converting MAC addresses into IPv6 interface IDs reduces the configuration
workload. When using stateless address autoconfiguration, you only need an IPv6
network prefix to obtain an IPv6 address. One defect of this method, however, is
that an IPv6 address is easily calculable based on a MAC address, and could
therefore be used for malicious attacks.
001
0 Interface ID
1111 1110 10
FE80::/10
10 bit
1111 110
FC00::/7
● Group ID (global ID): is 112 bits long. It identifies a multicast group. RFC 2373
does not define all the 112 bits as a group ID but recommends using the low-
order 32 bits as the group ID and setting all of the remaining 80 bits to 0s. In
this case, each multicast group ID maps to a unique Ethernet multicast MAC
address (for details, see RFC 2464).
Figure 9-5 shows the IPv6 multicast address format.
IPv6 anycast addresses are allocated from the unicast address space. Mobile IPv6
applications also use anycast addresses.
NOTE
IPv6 anycast addresses can be assigned only to routing devices but not hosts. Anycast
addresses cannot be used as the source IP addresses of IPv6 packets.
● Subnet-router Anycast Address
RFC 3513 predefines a subnet-router anycast address. Packets sent to a
subnet-router anycast address are delivered to the nearest device on the
subnet identified by the anycast address, depending on the routing protocols.
All devices must support subnet-router anycast addresses. A subnet-router
anycast address is used when a node needs to communicate with any of the
devices on the subnet identified by the anycast address. For example, a
mobile node needs to communicate with one of the mobile agents on the
home subnet.
In a subnet-router anycast address, the n-bit subnet prefix identifies a subnet,
and the remaining bits are padded with 0s. Figure 9-6 shows the subnet-
router anycast address format.
Subnet prefix 0
Source 40 octets
Address Basic Header
Destination
Address
carries the flow label field. This facilitates IPv6 packet processing and improves
processing efficiency. To support various options without changing the existing
packet format, the Extension Header information field is added to the IPv6 packet
header, improving flexibility. The following paragraphs describe IPv6 extension
headers.
...
Next Header Extension Header Len
Extension Head Data(last)
... Data
Hop- 0 This header carries information that every node must examine
by- along the delivery path of a packet. This header is used in the
Hop following applications:
Optio ● Jumbo payload (if the payload length exceeds 65535 bytes)
ns
heade ● Prompting devices to check this option before the devices
r forward packets.
● Resource Reservation Protocol (RSVP)
Destin 60 This header carries information that only the destination node
ation of a packet examines. Currently, this header is used in mobile
Optio IPv6.
ns
heade
r
When a single packet uses more than one extension header, the headers must be
listed in the following order:
● IPv6 basic header
● Hop-by-Hop Options header
● Destination Options header
● Routing header
● Fragment header
● Authentication header
● Encapsulating Security Payload header
● Destination Options header
● Upper-layer header
Intermediate devices determine whether to process extension headers based on
the Next Header field value in the IPv6 basic header. The intermediate devices do
not need to examine or process all extension headers.
Each extension header can only occur once in an IPv6 packet, except for the
Destination Options header which may occur twice (once before a Routing header
and once before the upper-layer header).
9.2.3 ICMPv6
The Internet Control Message Protocol version 6 (ICMPv6) is one of the basic IPv6
protocols.
In IPv4, ICMP reports IP packet forwarding information and errors to the source
node. ICMP defines certain messages such as Destination Unreachable, Packet Too
Big, Time Exceeded, Echo Request, and Echo Reply to facilitate fault diagnosis and
information management. ICMPv6 provides additional mechanisms alongside the
current ICMPv4 functions such as Neighbor Discovery (ID), stateless address
configuration (including duplicate address detection), and Path Maximum
Transmission Unit (PMTU) discovery.
The protocol number of ICMPv6 (that is, the value of the Next Header field in an
IPv6 packet) is 58. Figure 9-9 shows the ICMPv6 packet format.
IPv6 basic
header
Next header = 58
ICMPv6 packet
ICMPv6 packet
ICMPv6 Data
Packet Too Big message to the source node. The link MTU of the outbound
interface is carried in the message. PMTU discovery is implemented based on
Packet Too Big messages.
In a Packet Too Big message, the Type field value is 2 and the Code field value
is 0.
● Time Exceeded message
During the transmission of IPv6 packets, when a device receives a packet with
a hop limit of 0 or a device reduces the hop limit to 0, it sends an ICMPv6
Time Exceeded message to the source node. During the processing of a packet
to be fragmented and reassembled, an ICMPv6 Time Exceeded message is
also generated when the reassembly time is longer than the specified period.
In a Time Exceeded message, the Type field value is 3. Depending on the
cause, the Code field value can be:
– 0: Hop limit exceeded in packet transmission.
– 1: Fragment reassembly timeout.
● Parameter Problem message
When a destination node receives an IPv6 packet, it checks the validity of the
packet. If it detects an error, it sends an ICMPv6 Parameter Problem message
to the source node.
In a Parameter Problem message, the Type field value is 4. Depending on the
cause, the Code field value can be:
– 0: A field in the IPv6 basic header or extension header is incorrect.
– 1: The Next Header field in the IPv6 basic header or extension header
cannot be identified.
– 2: Unknown options exist in the extension header.
Address Resolution
In IPv4, a host needs to obtain the link-layer address of the destination host
through the ARP protocol for communication. Similar to IPv4, the IPv6 NDP
protocol parses the IP address to obtain the link-layer address.
ARP packets are encapsulated in Ethernet packets. The Ethernet type value is
0x0806. ARP is defined as a protocol that runs between Layer 2 and Layer 3. ND is
implemented through ICMPv6 packets. The Ethernet type value is 0x86dd. The
Next Header value in the IPv6 header is 58, indicating that the packets are ICMPv6
packets. NDP packets are encapsulated in ICMPv6 packets. NDP is a Layer 3
protocol. Layer 3 address resolution has the following advantages:
● Layer 3 address resolution enables Layer 2 devices to use the same address
resolution protocol.
● Layer 3 security mechanisms are used to prevent address resolution attacks.
● Request packets can be sent in multicast mode, reducing load on Layer 2
networks.
During address resolution, Neighbor Solicitation (NS) packets and Neighbor
Advertisement (NA) packets are used.
● In NS packets, the Type field value is 135 and the Code field value is 0. NS
packets are similar to IPv4 ARP Request packets.
● In NA packets, the Type field value is 136 and the Code field value is 0. NA
packets are similar to IPv4 ARP Reply packets.
Figure 9-10 shows the process of address resolution.
Host A Host B
Host A needs to parse the link-layer address of Host B before sending packets to
Host B. Host A sends an NS message with its IPv6 address as the source address
and the solicited-node multicast address of Host B as the destination address. The
Options field in the NS message carries the link-layer address of Host A.
After receiving the NS message, Host B replies with an NA Reply message. In the
NA reply message, the source address is the IPv6 address of Host B, and the
destination address is the IPv6 address of Host A (the NS message is sent to Host
A in unicast mode using the link-layer address of Host A). The Options field carries
the link-layer address of Host B. This is the whole address resolution process.
There are five neighbor states: Incomplete, Reachable, Stale, Delay, and Probe.
Figure 9-11 shows the transition of neighbor states. The Empty state indicates
that the neighbor table is empty.
The following example describes changes in neighbor state of node A during its
first communication with node B.
6. After a period of time, the neighbor state changes from Delay to Probe.
During this time, if node A receives an NA Reply message, the neighbor state
of node A changes to Reachable.
7. Node A in the Probe state sends several unicast NS messages at the
configured interval. If node A receives a Reply message, the neighbor state of
node A changes from Probe to Reachable. Otherwise, the state changes to
Empty and node A deletes the entry.
IPv6 DAD is similar to IPv4 gratuitous ARP. A node sends an NS message that
requests the tentative address as the destination address to the Solicited-node
multicast group. If the node receives an NA Reply message, another node is using
the tentative address for communication. This node will not use this tentative
address for communication.
● If FC00::1 is a tentative address of Host B, Host B will not use this address as
an interface address and will not send an NA message.
● If FC00::1 is in use on Host B, Host B sends an NA message to FF02::1 carrying
IP address FC00::1. In this way, Host A can find and mark the duplicate
tentative address after receiving the message so it will not take effect.
Router Discovery
Router discovery is used to locate neighboring devices and learn their address
prefixes and configuration parameters for address autoconfiguration.
IPv6 supports stateless address autoconfiguration. Hosts obtain IPv6 prefixes and
automatically generate interface IDs. Router Discovery is the basis of IPv6 address
autoconfiguration and is implemented through the following two types of packets:
● Router Advertisement (RA) message: Each router periodically sends multicast
RA messages carrying network prefixes and identifiers on the network to
declare its existence to Layer 2 hosts and devices. An RA message has a Type
field value of 134.
● Router Solicitation (RS) message: After being connected to the network, a
host immediately sends an RS message to obtain network prefixes. Devices on
the network reply with RA messages. An RS message has a Type field value of
133.
Figure 9-13 shows the router discovery function.
RA RS RA
Address Autoconfiguration
IPv4 uses DHCP to automatically configure IP addresses and default gateways.
This simplifies network management. The length of an IPv6 address is increased to
128 bits. Multiple terminal nodes require the function of automatic configuration.
IPv6 allows both stateful and stateless address autoconfiguration. Stateless
autoconfiguration enables hosts to automatically generate link-local addresses.
Hosts automatically configure global unicast addresses and obtain other
information based on prefixes in the RA message.
The process of IPv6 stateless autoconfiguration is as follows:
Redirection
To choose an optimal gateway device, the gateway device sends a Redirection
message to notify the sender that another gateway device can send packets.
Redirection messages are contained within ICMPv6 messages and have a Type
field value of 137. They carry a better next hop address and destination address
for packets that need to be redirected.
Figure 9-14 shows an example of packet redirection.
IPv6 packet
If the communication target is a host, the IPv6 address of the host is used as the
destination address of the Redirection message. If the Redirection message contains
options, the link-layer address of the target host is included in the options.
forwarding it to the destination node. In IPv6, however, the source node fragments
the packets to reduce pressure on the transit device. When an interface on the
transit device receives a packet whose size exceeds the MTU, the transit device
discards the packet and sends an ICMPv6 Packet Too Big message to the source
node. The ICMPv6 Packet Too Big message contains the MTU value of the
outbound interface. The source node fragments the packet based on the MTU and
resends the packet, increasing traffic overhead. The Path MTU Discovery (PMTUD)
protocol dynamically discovers the MTU value of each link on the transmission
path, reducing excessive traffic overhead.
The PMTU protocol is implemented through ICMPv6 Packet Too Big messages. A
source node first uses the MTU of its outbound interface as the PMTU and sends a
probe packet. If a smaller PMTU exists on the transmission path, the transit device
sends a Packet Too Big message to the source node. The Packet Too Big message
contains the MTU value of the outbound interface on the transit device. After
receiving this message, the source node changes the PMTU value to the received
MTU value and sends packets based on the new MTU. This process repeats until
packets are sent to the destination address. The source node obtains the PMTU of
the destination address.
Packet received
Path MTU=1300
Packets are transmitted through four links with MTU values of 1500, 1500, 1400,
and 1300 bytes. Before sending a packet, the source node fragments the packet
based on a PMTU of 1500. When the packet is sent to the outbound interface with
MTU 1400, the device returns a Packet Too Big message carrying MTU 1400. The
source node then fragments the packet based on MTU 1400 and sends the
fragmented packet again. The process repeats when the packet based on MTU
1400 is sent to the outbound interface with MTU 1300, the device returns another
Packet Too Big message that carries MTU 1300. The source node receives the
message and fragments the packet based on MTU 1300. In this way, the source
node sends the packet to the destination address and discovers the PMTU of the
transmission path.
NOTE
IPv6 allows a minimum MTU of 1280 bytes. Therefore, the PMTU must be greater than
1280 bytes. PMTU of 1500 bytes is recommended.
Licensing Requirements
The IPv6 function is controlled by a license. By default, this function is disabled on
a new device. To use the IPv6 function, apply for and purchase the license from
the device supplier.
For details about how to apply for a license, see S Series Switch License Use
Guide.
Version Requirements
NOTE
To know details about software mappings, see Hardware Query Tool.
Feature Limitations
● IPv6 addresses cannot be assigned to the management interface.
● In V200R011C10 and later versions, the VLANIF interface of a super-VLAN on
a switch supports the IPv6 function.
● The switch can set the CPCAR values for the packets of each protocol. The
CPCAR values of some protocol packets need to be adjusted based on the
actual service scale and user network.
● If the default CPCAR value of ND packets cannot meet the packet exchange
requirements when too many IPv6 user hosts are connected to the switch, a
large number of ND packets may be lost and the switch fails to learn ND
neighbor entries. Therefore, the CPCAR value must be adjusted. To prevent the
CPU from running with a high load, the CPCAR value needs to be increased to
a proper value.
● If the CPCAR values are adjusted improperly, network services are affected. To
adjust the CPCAR values of ND packets, contact technical support personnel.
● A device can only forward ICMPv6 packets with the Option field at Layer 3.
Other IPv6 packets with the Option field will be discarded.
Context
A global unicast address is similar to an IPv4 public address and provided for the
Internet Service Provider (ISP). A global unicast address can be generated by
either of the following methods:
● You can configure an interface with multiple global unicast addresses with different
network prefixes.
● Manually configured global unicast addresses have a higher priority than automatically
generated ones. Manually configured addresses can overwrite automatically generated
ones with the same prefix. The overwritten automatically generated addresses do not
take effect even if manually configured addresses are deleted. A device needs to
generate a new global unicast address based on the IP prefix carried in the received RA
packet.
Procedure
Step 1 Run system-view
----End
● Each interface can be configured with only one link-local address. To prevent link-local
address conflict, automatically generated link-local addresses are recommended. After
an interface is configured with an IPv6 global unicast address, it automatically generates
a link-local address.
● Manually configured link-local addresses have a higher priority than automatically
generated ones. Manually configured addresses can overwrite automatically generated
ones, but automatically generated addresses cannot overwrite manually configured
ones. If manually configured addresses are deleted, the automatically generated ones
that were previously overwritten take effect again.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 6 Run either of the following commands to configure a link-local address for an
interface:
● Run ipv6 address ipv6-address link-local
A link-local address is configured for an interface.
● Run ipv6 address auto link-local
A link-local address is automatically generated.
----End
Context
IPv6 anycast addresses are allocated from the unicast address space. An anycast
address identifies a group of network interfaces, which usually belong to different
nodes. When using anycast addresses, pay attention to the following points:
Procedure
Step 1 Run system-view
----End
You can set the bucket size and interval for placing tokens into the bucket. The
bucket size indicates the maximum number of tokens that a bucket can hold. One
token represents one ICMPv6 error packet. When an ICMPv6 error packet is sent,
one token is taken out of the token bucket. When there are no tokens, ICMPv6
error packets cannot be sent until new tokens are placed into the token bucket.
Pre-configuration Tasks
Before setting rate limit for sending ICMPv6 error packets, perform the task of 9.5
Configuring IPv6 Addresses for Interfaces.
Procedure
● Control ICMPv6 error messages in the system view.
a. Run system-view
NOTE
----End
Before configuring IPv6 ND, perform the task of 9.5 Configuring IPv6 Addresses
for Interfaces.
Context
To communicate with a destination host, a host needs to obtain the destination
host's link-layer address. The link-layer address of a neighbor node can be
obtained using the neighbor discovery mechanism, or by manually configuring
static neighbor entries. A device identifies a static neighbor entry based on the
IPv6 address of this neighbor and number of the Layer 3 interface connected to
this neighbor. To filter invalid packets, you can create static neighbor entries,
binding the destination IPv6 addresses of these packets to nonexistent MAC
addresses.
Procedure
Step 1 Run system-view
Step 5 Run the following commands to configure static neighbors based on the interface
type.
● For the Ethernet interface, run the ipv6 neighbor ipv6-address mac-address
command.
● For a VLANIF interface, run the ipv6 neighbor ipv6-address mac-address vid
vlan-id interface-type interface-number
command.
----End
Context
IPv6 NDP provides address resolution, neighbor unreachability detection, DAD,
router/prefix discovery, address autoconfiguration, and redirection.
NOTE
After the IPv6 function is enabled on the switch, the switch automatically implements
address resolution, DAD, and redirection. Neighbor unreachability detection, router/prefix
discovery, and address autoconfiguration need to be manually configured. You can also
configure the switch to send RA packets to enable router/prefix discovery and address
autoconfiguration, and enable the automatic detection of ND entries to check whether
neighbors are reachable.
After the automatic detection of ND entries is enabled on the switch, the switch
can send NS packets to check whether neighbors are reachable before aging ND
entries. If neighbors are reachable, the switch updates ND entries; otherwise, the
switch ages ND entries.
You can enable the switch to send RA packets. After receiving the RA packets,
network nodes perform address autoconfiguration and router/prefix discovery
based on the prefix and other configuration information contained in RA packets.
After the preceding configurations are complete, NDP functions work properly. You
can also adjust ND parameters based on service requirements.
Procedure
Step 1 Enable NDP functions to work properly.
1. Run system-view
The system view is displayed.
2. Run ipv6
IPv6 packet forwarding is enabled.
By default, IPv6 packet forwarding is disabled.
3. Run interface interface-type interface-number
The specified interface view is displayed.
4. (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
5. Run ipv6 enable
The IPv6 function is enabled.
By default, the IPv6 function is disabled on an interface.
6. Run undo ipv6 nd ra halt
The system is enabled to send RA packets.
By default, the system is disabled from sending RA packets.
Step 2 (Optional) Adjust ND parameters to meet service requirements.
Run the following commands in the system view.
Run quit
Return to the system view.
● In the system view, run ipv6 nd hop-limit limit
The hop limit for IPv6 unicast packets initially sent by a device is set.
By default, the IPv6 unicast packets initially sent by a device can travel a
maximum of 64 hops.
● In the system view, run ipv6 nd stale-timeout timeout-value
The aging time of ND entries in STALE state is set.
By default, the aging time of ND entries in STALE state is 1200 seconds.
● In the system view, run ipv6 nd learning strict
IPv6 ND strict learning is enabled.
By default, IPv6 ND strict learning is disabled.
Run the following commands on the interface.
Run interface interface-type interface-number
The specified interface view is displayed.
● Run ipv6 nd stale-timeout seconds
The aging time of ND entries in STALE state is set.
By default, the aging time of ND entries in STALE state is 1200 seconds.
● Run ipv6 nd learning strict { force-disable | force-enable | trust }
IPv6 ND strict learning is enabled.
By default, IPv6 ND strict learning is disabled.
● Run ipv6 nd ra hop-limit limit
The hop limit for RA packets is set.
By default, the hop limit for RA packets is 64.
NOTE
Step 3 (Optional) Configure the default router priority and route information.
Run the following commands on the interface. If the current view is system view,
run the interface interface-type interface-number command to enter interface
view.
----End
If a user sends an IPv6 packet with an irresolvable destination IPv6 address to the
device (that is, if the device has a route to the destination IPv6 address of the IPv6
packet but has no ND entry matching the next hop of the route), the device
generates an ND Miss message. By default, the device packs ND Miss messages
and sends the package to the CPU. This improves the efficiency of processing the
ND Miss messages.
When the ND Miss message packetizes function is enabled, the X series cards
cannot reply to ICMPv6 host unreachable packets. To enable these cards to reply
to ICMPv6 host unreachable packets, you can disable the ND Miss message
packing function.
NOTE
Only the X series cards support disabling packetizing ND packets and ND Miss messages.
Procedure
● Disable a device from packetizing ND packets
a. Run system-view
The system view is displayed.
b. Run nd message-cache disable
The device is disabled from packetizing ND packets.
By default, devices are enabled to packetize ND packets.
● Disable a device from packetizing ND Miss messages
a. Run system-view
The system view is displayed.
b. Run nd-miss message-cache disable
The ND Miss message packing function is disabled.
By default, the ND Miss message packing function is enabled.
----End
Procedure
1. Run system-view
The system view is displayed.
2. Run undo nd optimized-reply disable
The optimized ND reply function is enabled.
By default, the optimized ND reply function is enabled.
– The optimized ND reply function takes effect for ND Request packets sent
by wireless users.
– The optimized ND reply function takes effect only for the Neighbor
Solicitation packets (a type of ND packets) received by VLANIF interfaces.
VLANIF interfaces of Group VLANs and Separate VLANs in MUX VLANs
and VLANIF interfaces of super-VLANs do not perform optimized ND
reply.
Context
After the trap function for hash conflicts of ND entries is configured, the switch
sends traps when a hash conflict of ND entries occurs so that you can obtain the
status of ND entries promptly. ND entry resources are key resources on the switch.
Monitoring the ND entry status effectively ensures proper running of the switch.
To improve the IPv6 forwarding performance, the switch saves ND entries using
hash links. When multiple ND entries obtain the same key based on the hash
algorithm, the ND entries cannot be saved. This is a hash conflict of ND entries.
When a hash conflict of ND entries occurs, the switch has available ND entry
space but cannot save ND entries. The switch cannot forward IPv6 traffic matching
the ND entries with a hash conflict.
Procedure
1. Run system-view
The system view is displayed.
2. Run nd trap hash-conflict enable
The trap function for hash conflicts of ND entries is enabled.
By default, the trap function for hash conflicts of ND entries is enabled.
3. (Optional) Run nd trap hash-conflict interval interval-time
The interval at which the switch reports traps when a hash conflict of ND
entries occurs is set.
NOTE
When the PMTU from the device to a specified destination node is set, the IPv6 MTU values for
interfaces on all intermediate devices cannot be smaller than the configured PMTU value.
Otherwise, packets are discarded.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Configure the IPv6 MTU for an interface.
1. Run interface interface-type interface-number
The specified interface view is displayed.
2. (Optional) On an Ethernet interface, run undo portswitch
The interface is switched to Layer 3 mode.
By default, an Ethernet interface works in Layer 2 mode.
3. Run ipv6 enable
The IPv6 function is enabled on the interface.
The switch supports MTU setting, so packets sent by the protocol stack are
fragmented based on the configured MTU. However, the hardware chip does not
support MTU setting, and the default MTU is 12K.
After the MTU value is changed, run the shutdown and undo shutdown commands
or the restart (interface view) command to restart the interface and allow the
changes to take effect.
5. Run quit
Return to the system view.
Step 3 Run ipv6 pathmtu ipv6-address [ vpn-instance vpn-instance-name ] [ path-mtu ]
The PMTU for a specified IPv6 address is set.
By default, the PMTU is not set.
If the parameter path-mtu is not specified, the PMTU for a specified IPv6 address
is 1500 bytes.
----End
NOTE
When both static and dynamic PMTUs are configured, only static PMTU takes effect. Static
PMTU entries never age.
The interface MTU, IPv6 interface MTU, and PMTU are valid only for packets generated on
the device, not for packets forwarded by the host.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 (Optional) Configure the IPv6 MTU for an interface.
1. Run interface interface-type interface-number
The specified interface view is displayed.
2. (Optional) On an Ethernet interface, run undo portswitch
The switch supports MTU setting, so packets sent by the protocol stack are
fragmented based on the configured MTU. However, the hardware chip does not
support MTU setting, and the default MTU is 12K.
After the MTU value is changed, run the shutdown and undo shutdown commands
or the restart (interface view) command to restart the interface and allow the
changes to take effect.
5. Run quit
Return to the system view.
----End
Procedure
● Run the display ipv6 pathmtu [ vpn-instance vpn-instance-name ] { ipv6-
address | all | dynamic | static } command to check all PMTU entries.
● Run the display ipv6 interface [ interface-type interface-number ] command
to check the current MTU on the specified interface.
Context
The following TCP6 timers need to be set:
● SYN-Wait timer: When SYN packets are sent, the SYN-Wait timer starts. If no
response packet is received after the SYN-Wait timer expires, the TCP6
connection is terminated.
● FIN-Wait timer: When the TCP connection status changes from FIN_WAIT_1 to
FIN_WAIT_2, the FIN-Wait timer starts. If no response packet is received after
the FIN-Wait timer expires, the TCP6 connection is terminated.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run tcp ipv6 timer syn-timeout interval
The SYN-Wait timer is set for TCP6 connections.
By default, the SYN-Wait timer is set to 75s.
Step 3 Run tcp ipv6 timer fin-timeout interval
The FIN-Wait timer is set for TCP6 connections.
By default, the FIN-Wait timer is set to 600s.
----End
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run tcp ipv6 window window-size
The receive or send buffer size of a TCP6 socket is set.
By default, the receive or send buffer size of a TCP6 socket is 8 KB. The receive or
send buffer size of a TCP6 socket ranges from 1 KB to 32 KB.
----End
Setting a maximum MSS value for a TCP6 connection defines the largest TCP6
packet size, allowing TCP6 packets to be successfully forwarded by intermediate
devices when no Path MTU is available.
Procedure
Step 1 Run system-view
The system view is displayed.
Step 2 Run tcp ipv6 min-mss mss-value
The minimum MSS value is set for a TCP6 connection.
By default, the minimum MSS value for a TCP6 connection is 216 bytes.
Step 3 Run tcp ipv6 max-mss mss-value
The maximum MSS value is set for a TCP6 connection.
By default, the maximum MSS value is not configured for TCP6 connections.
NOTE
The maximum MSS value configured using the tcp ipv6 max-mss command must be
greater than the minimum MSS value configured using the tcp ipv6 min-mss command.
----End
NOTICE
IPv6 statistics cannot be restored after being cleared. Therefore, exercise caution
before clearing IPv6 statistics.
Procedure
● Run the reset ipv6 attack-source overlapping-fragment command in the
user view to clear statistics on overlapping fragment attack packets.
● Run the reset ipv6 socket pktsort task-id task-id socket-id socket-id
command in the user view to clear statistics on the dual receive buffer of an
IPv6 socket.
● Run the reset rawip ipv6 statistics command in the user view to clear all
Raw IPv6 packet statistics.
● Run the reset tcp ipv6 authentication-statistics src-ip src-ip src-port src-
port dest-ip dest-ip dest-port dest-port command in the user view to clear
authentication statistics of a specified TCP6 connection.
● Run the reset ipv6 statistics command in the user view to clear IPv6 traffic
statistics.
● Run the reset tcp ipv6 statistics command in the user view to clear TCP6
statistics.
● Run the reset udp ipv6 statistics command in the user view to clear UDP6
statistics.
● Run the reset ipv6 pathmtu [ vpn-instance vpn-instance-name ] { all |
dynamic | static } command in the user view to clear PMTU entries.
● Run the reset ipv6 neighbors { all | dynamic | static | vid vlan-id [ interface-
type interface-number] | interface-type interface-number [ dynamic |
static ] } command in the user view to clear IPv6 neighbor entries.
----End
Procedure
● Run the display ipv6 interface [ interface-type interface-number | brief ]
command to check IPv6 information about a specified interface.
● Run the display ipv6 statistics command to check IPv6 traffic statistics.
● Run the display icmpv6 statistics command to check ICMPv6 traffic statistics.
● Run the display tcp ipv6 status command to check the TCP6 connection
status.
● Run the display tcp ipv6 statistics command to check TCP6 traffic statistics.
● Run the display udp ipv6 statistics command to check UDP6 statistics.
● Run the display ipv6 neighbors [ ipv6-address | [ vid vid ] interface-type
interface-number | vpn-instance vpn-instance-name ] command to check
neighbor entries.
● Run the display ipv6 socket [ socktype socket-type | task-id task-id socket-
id socket-id ] command to check information about a specified socket.
● Run the display ipv6 pathmtu [ vpn-instance vpn-instance-name ] { ipv6-
address | all | dynamic | static } command to check PMTU entries.
● Run the display default-parameter tcp6 command to check the default
values of all configurable parameters on the TCP6 module.
● Run the display ipv6 attack-source overlapping-fragment command to
check source information about overlapping fragment attacks.
● Run the display rawip ipv6 statistics command to check Raw IPv6 packet
statistics.
● Run the display tcp ipv6 authentication-statistics command to check
authentication statistics of a specified TCP6 connection.
----End
IPv6 addresses for the VLANIF interfaces are fc00:1::1/64 and fc00:1::2/64.
Figure 9-16 Networking diagram for configuring IPv6 addresses for interfaces
SwitchA SwitchB
GE1/0/1 GE1/0/1
VLANIF100 VLANIF100
fc00:1::1/64 fc00:1::2/64
Configuration Roadmap
The configuration roadmap is as follows:
1. Enable the IPv6 forwarding function on SwitchA and SwitchB.
2. Configure IPv6 addresses for the interfaces.
Procedure
Step 1 Enable the IPv6 forwarding function on switches.
# Configure SwitchA.
<HUAWEI> system-view
[HUAWEI] sysname SwitchA
[SwitchA] ipv6
# Configure SwitchB.
<HUAWEI> system-view
[HUAWEI] sysname SwitchB
[SwitchB] ipv6
# Configure SwitchB.
[SwitchB] vlan 100
[SwitchB-vlan100] quit
[SwitchB] interface gigabitethernet 1/0/1
[SwitchB-GigabitEthernet1/0/1] port link-type hybrid
[SwitchB-GigabitEthernet1/0/1] port hybrid pvid vlan 100
[SwitchB-GigabitEthernet1/0/1] port hybrid untagged vlan 100
[SwitchB-GigabitEthernet1/0/1] quit
[SwitchB] interface vlanif 100
[SwitchB-Vlanif100] ipv6 enable
[SwitchB-Vlanif100] ipv6 address fc00:1::2/64
[SwitchB-Vlanif100] quit
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 stale time is 1200 seconds
----End
Configuration File
● SwitchA configuration file
#
sysname SwitchA
#
ipv6
#
vlan batch 100
#
interface Vlanif100
ipv6 enable
ipv6 address FC00:1::1/64
#
interface GigabitEthernet1/0/1
port link-type hybrid
port hybrid pvid vlan 100
port hybrid untagged vlan 100
#
return