Configuring IPv6 Neighbor Discovery
IPv6 neighbor discovery (ND) uses a group of messages and processes that identify relationships between neighboring nodes. IPv6 ND contains the same functions of ARP and ICMP router discovery, as well as the additional neighbor reachability detection function.
Pre-configuration Tasks
Before configuring IPv6 neighbor discovery, complete the following tasks:
Connect interfaces and configure physical parameters for the interfaces to ensure that the physical status of the interfaces is Up.
Configure link layer protocol parameters for the interfaces to ensure that the link layer protocol status of the interfaces is Up.
Enable IPv6 in the interface view.
Configure IPv6 addresses for interfaces.
- Configuring Static Neighbors
- (Optional) Setting the Aging Time for Neighbor Entries in the Stale State
- (Optional) Setting the Neighbor Reachability Detection Interval
- (Optional) Configuring the Maximum Number of Dynamic Neighbor Entries
- (Optional) Configuring Strict Prefix Learning for Dynamic Neighbor Entries
- (Optional) Configuring Probe Parameters for ND Entries in the PROBE State
- (Optional) Configuring Generation of Neighbor Entries Upon Receipt of NA Packets
- (Optional) Configuring Rate Limit of Sending NS Messages for Address Resolution or Probing
- (Optional) Setting a Limit on the Rate at Which NA Messages Are Sent
- (Optional) Setting a Limit on the Rate at Which RA Messages Are Sent
- (Optional) Setting a Limit on the Rate at Which RS Messages Are Sent
- (Optional) Configuring Manually Triggered Dual-Device ND Hot Backup
- (Optional) Configuring MAC Address Check for ND
- Verifying the Configuration of IPv6 Neighbor Discovery
Configuring Static Neighbors
You can obtain the mappings between IPv6 addresses and MAC addresses of neighbors after configuring static neighbors. Neighbor entries represent the mappings between IPv6 addresses and MAC addresses of neighbors. If a device is not enabled to send ND protocol packets, it cannot obtain neighbor entries. In this case, you can configure static neighbors on the device to obtain neighbor entries.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run any of the following commands:
To configure a static neighbor on a common Layer 3 interface, run the ipv6 neighbor ipv6-address mac-address command.
To configure a static neighbor on a VLANIF interface, run the ipv6 neighbor ipv6-address mac-address vid vlan-id interface-type interface-number command.
To configure a static neighbor on a sub-interface for QinQ VLAN tag termination or dot1q VLAN tag termination, run the ipv6 neighbor ipv6-address mac-address vid vid[ cevid cevid ] command.
After the function of sending ND protocol packets is enabled on a device, a common interface like a GE interface either automatically sends multicast NS packets to learn ND entries actively or respond to NS packets to learn ND entries passively. However, a sub-interface for QinQ VLAN tag termination or dot1q VLAN tag termination cannot send multicast NS packets but discards the multicast NS packets instead. Therefore, to enable a sub-interface for QinQ VLAN tag termination or dot1q VLAN tag termination to send multicast NS packets, run the ipv6 nd ns multicast-enable command on the sub-interface for QinQ VLAN tag termination or dot1q VLAN tag termination. This configuration enables the sub-interface for QinQ VLAN tag termination or dot1q VLAN tag termination to learn ND entries.
- Run commit
The configuration is committed.
(Optional) Setting the Aging Time for Neighbor Entries in the Stale State
You can set a shorter aging time for neighbor entries in the Stale state to speed up the aging of neighbor entries.
Procedure
- Run system-view
The system view is displayed.
- Run ipv6 nd stale-timeout seconds
The aging time is set for the neighbor entries in the Stale state.
- Run interface interface-type interface-number
The interface view is displayed.
- Run ipv6 nd stale-timeout seconds
The aging time is set for neighbor entries in the Stale state on the interface.
- Run commit
The configuration is committed.
(Optional) Setting the Neighbor Reachability Detection Interval
A device can send NS messages to detect whether its neighbors are reachable. Therefore, you can set the NS message transmission interval to control the neighbor reachability detection frequency. Frequent NS message transmissions help rapidly determine whether neighbors are reachable, but also affect system performance. Therefore, it is recommended that the interval not be set too short.
Procedure
- Run system-view
The system view is displayed.
- (Optional) Run ipv6 nd pre-detect
The neighbor reachability detection interval is set.
- (Optional) Run ipv6 nd auto-detect enable
The neighbor reachability detection interval is set.
- Run interface interface-type interface-number
The interface view is displayed.
- Run ipv6 nd ns retrans-timer interval
The neighbor reachability detection interval is set.
- Run commit
The configuration is committed.
(Optional) Configuring the Maximum Number of Dynamic Neighbor Entries
Configuring the maximum number of dynamic neighbor entries defends against RA flooding attacks.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run ipv6 nd neighbor-limit max-number
The maximum number of dynamic neighbor entries allowed by an interface is configured.
- Run commit
The configuration is committed.
(Optional) Configuring Strict Prefix Learning for Dynamic Neighbor Entries
You can configure the strict prefix learning function for dynamic neighbor entries to determine whether an interface learns valid NS messages carrying different network prefixes.
Context
- If the strict prefix learning function for dynamic neighbor entries is enabled on the interface, the device simply discards the NS message and does not generate dynamic neighbor entries.
- If the strict prefix learning function for dynamic neighbor entries is disabled on the interface, the device replies with an NA message and generates dynamic neighbor entries.
In the system view, the strict prefix learning function works on all device interfaces. In the interface view, the strict prefix learning function works only for the specified interface. The configuration of this function in the interface view has a higher priority than that in the system view.
By default, an interface is not enabled with the strict prefix learning function for dynamic neighbor entries. The interface behavior is consistent with the configuration in the system view.
Perform the following operations as required:
(Optional) Configuring Probe Parameters for ND Entries in the PROBE State
This section describes how to configure probe parameters for ND entries in the PROBE state to enhance probe reliability.
Context
If an ND entry is in the PROBE state, the neighbor is no longer known to be reachable. The device sends unicast NS messages to detect the validity of the ND entry. If a response is received from the neighbor, the ND entry enters the REACH state, indicating that the neighbor is known to have been reachable. If no response is received from the neighbor, the ND entry is deleted.
- The link reliability on the network is poor, and packet loss may occur during packet transmission.
- The peer device is busy processing services and cannot process NS messages in time.
This prevents ND entries from being mistakenly deleted, hence negatively affecting packet forwarding efficiency if no response is received from the neighbor within the specified period (calculated as Default number of probe retransmissions x Default interval of probe retransmissions).
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run ipv6 nd nud attempts attempts
The number of probe retransmissions for ND entries in the PROBE state is set.
- Run ipv6 nd nud interval interval
The probe interval for ND entries in the PROBE state is set.
- Run commit
The configuration is committed.
(Optional) Configuring Generation of Neighbor Entries Upon Receipt of NA Packets
The generation of neighbor entries upon receipt of NA packets enhances network reliability.
Context
- When an interface where neighbor entries exist receives legitimate NS packets, the values of neighbor entries are updated. When an interface where neighbor entries do not exist receives legitimate NS packets, neighbor entries are generated on the interface.
- When an interface where neighbor entries exist receives legitimate NA packets, the values of neighbor entries are updated. When an interface where neighbor entries do not exist receives legitimate NA packets, the NA packets are simply discarded.
When an interface has no neighbor entries configured, to avoid the device from simply discarding legitimate NA packets and prevent packet loss, configure the interface to generate neighbor entries upon receipt of NA packets.
Procedure
- Run system-view
The system view is displayed.
- Run interface interface-type interface-number
The interface view is displayed.
- Run ipv6 nd na glean
The interface is configured to generate neighbor entries upon receipt of legitimate NA packets when neighbor entries do not exist on the interface.
- Run commit
The configuration is committed.
(Optional) Configuring Rate Limit of Sending NS Messages for Address Resolution or Probing
This section describes how to configure rate limit of sending NS messages for address resolution or probing in order to enhance network reliability.
Context
If the peer device is limited by the capability of receiving NS messages or the local device is limited by the capability of processing NA response messages, run the ipv6 nd ns send rate-limit command to configure the rate limit of sending NS messages for address resolution or parsing. This prevents a failure to learn ND entries or incorrect deletion of ND entries due to discarding of NA packets.
(Optional) Setting a Limit on the Rate at Which NA Messages Are Sent
To improve network reliability, set a limit on the rate at which NA messages are sent.
Context
If the remote device has a limited capability of receiving NA messages or the local device has a limited capability of processing neighbor solicitation (NS) messages, run the ipv6 nd na send rate-limit command on the local device to set a limit on the rate at which NA messages are sent. This prevents a failure to learn ND entries or incorrect deletion of ND entries caused by NA message discarding.
(Optional) Setting a Limit on the Rate at Which RA Messages Are Sent
To improve network reliability, set a limit on the rate at which RA messages are sent.
Context
If the remote device has a limited capability of receiving RA messages or the local device has a limited capability of processing router solicitation (RS) messages, run the ipv6 nd ra send rate-limit command on the local device to set a limit on the rate at which RA messages are sent. This prevents a host from failing to update the default routing information.
(Optional) Setting a Limit on the Rate at Which RS Messages Are Sent
To improve network reliability, set a limit on the rate at which RS messages are sent.
Context
If the remote device has a limited capability of receiving RS messages, run the ipv6 nd rs send rate-limit command on the local device to set a limit on the rate at which RS messages are sent. This prevents the remote device from discarding RS messages due to its limited processing capability.
(Optional) Configuring Manually Triggered Dual-Device ND Hot Backup
Dual-device ND hot backup can be enabled to achieve backup of ND entries between devices. This allows fast service switching in case of a network node or link failure, enhancing service reliability.
Prerequisites
Before configuring manually triggered dual-device ND hot backup, ensure that the same ND configuration has been performed on both the master and backup devices. Otherwise, downstream traffic may be interrupted after a master/backup switchover.
Background
As shown in Figure 13-1, a user device is connected to Device A and Device B over a switch. A VRRP6 backup group is configured between Device A and Device B to establish the master/backup relationship, with Device A as the master device and Device B as the backup device.
In normal circumstances, Device A forwards both upstream and downstream traffic. If Device A or the link between Device A and the switch fails, a master/backup VRRP6 switchover is triggered and Device B becomes the master device. Then, Device B needs to advertise network segment routes to devices on the network side so that downstream traffic is directed from the network side to Device B. If Device B has not learned ND entries from user-side devices, the downstream traffic is interrupted. Device B can properly forward downstream traffic only after it learns ND entries from user-side devices.
If ND entries are not synchronized from Device A to Device B and a master/backup switchover occurs, downstream traffic may be interrupted because Device B does not learn ND entries from users-side devices in time. To address this problem, deploy dual-device ND hot backup on Device A and Device B.
Perform the following steps on the devices that back up ND entries from each other:
(Optional) Configuring MAC Address Check for ND
Context
To enable the system to proactively detect source MAC address consistency to improve network reliability, run the ipv6 nd mac-check enable command to enable MAC address check for ND so that MAC address consistency is performed on four different types of ICMPv6 packets.
NS: The system checks whether the source MAC address is the same as the MAC address in the SLLA. If not, the NS message is discarded.
NA: The system checks whether the source MAC address is the same as the MAC address in the TLLA. If not, the NA message is discarded.
RS: The system checks whether the source MAC address is the same as the MAC address in the SLLA. If not, the RS message is discarded.
RA: The system checks whether the source MAC address is the same as the MAC address in the SLLA. If not, the RA message is discarded.
Procedure
Run system-view
The system view is displayed.
Run ipv6 nd mac-check enable
MAC address check for ND is enabled.
Run commit
The configuration is committed.
Verifying the Configuration of IPv6 Neighbor Discovery
After configuring IPv6 neighbor discovery, verify the configuration.
Procedure
- Run the display ipv6 neighbors [ interface-type interface-number | ipv6-address | vid vlan-id interface-type interface-number | vpn-instance vpn-instance-name ] command to check IPv6 neighbor entries.
- Run the display ipv6 interface [ interface-type interface-number | brief ] command to check IPv6 configurations on an interface.
- Run the display ipv6 nd packet statistics [ slot slot-id | interface interface-type interface-number ] command display statistics about ND messages.
- Configuring Static Neighbors
- (Optional) Setting the Aging Time for Neighbor Entries in the Stale State
- (Optional) Setting the Neighbor Reachability Detection Interval
- (Optional) Configuring the Maximum Number of Dynamic Neighbor Entries
- (Optional) Configuring Strict Prefix Learning for Dynamic Neighbor Entries
- (Optional) Configuring Probe Parameters for ND Entries in the PROBE State
- (Optional) Configuring Generation of Neighbor Entries Upon Receipt of NA Packets
- (Optional) Configuring Rate Limit of Sending NS Messages for Address Resolution or Probing
- (Optional) Setting a Limit on the Rate at Which NA Messages Are Sent
- (Optional) Setting a Limit on the Rate at Which RA Messages Are Sent
- (Optional) Setting a Limit on the Rate at Which RS Messages Are Sent
- (Optional) Configuring Manually Triggered Dual-Device ND Hot Backup
- (Optional) Configuring MAC Address Check for ND
- Verifying the Configuration of IPv6 Neighbor Discovery