No relevant resource is found in the selected language.

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Read our privacy policy>Search


To have a better experience, please upgrade your IE browser.

Configuration Guide - IP Service
S1720, S2700, S5700, and S6720 V200R011C10

This document describes the configurations of IP Service, including IP address, ARP, DHCP, DHCP policy VLAN, DNS, mDNS gateway, mDNS relay, UDP Helper, IP performance optimization, IPv6, DHCPv6, IPv6 DNS, IPv6 over IPv4 tunnel, and IPv4 over IPv6 tunnel.

Rate and give feedback:
Huawei uses machine translation combined with human proofreading to translate this document to different languages in order to help you better understand the content of this document. Note: Even the most advanced machine translation cannot match the quality of professional translators. Huawei shall not bear any responsibility for translation accuracy and it is recommended that you refer to the English document (a link for which has been provided).
Neighbor Discovery

Neighbor Discovery

The Neighbor Discovery Protocol (NDP) is an enhancement of Address Resolution Protocol (ARP) and Internet Control Management Protocol (ICMP) router discovery in IPv4. In addition to ICMPv6 address resolution, NDP also provides the neighbor unreachable detection, duplicate address detection, router discovery, and redirection functions.

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 11-10 shows the process of address resolution.

Figure 11-10  IPv6 address resolution

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.

Neighbor Unreachable Detection

A neighbor state can transit from one to another. Hardware faults interrupt communication with neighboring devices. Communication cannot be restored if the destination of a neighboring device becomes invalid, but it can be restored if the path fails. Nodes need to maintain a neighbor table to monitor the state of each neighboring device.

There are five neighbor states: Incomplete, Reachable, Stale, Delay, and Probe.

Figure 11-11 shows the transition of neighbor states. The Empty state indicates that the neighbor table is empty.

Figure 11-11  Neighbor state transition

The following example describes changes in neighbor state of node A during its first communication with node B.

  1. Node A sends an NS message and generates a cache entry. The neighbor state of node A is Incomplete.
  2. If node B replies with an NA message, the neighbor state of node A changes from Incomplete to Reachable. Otherwise, the neighbor state changes from Incomplete to Empty after a certain period of time, and node A deletes this entry.
  3. After the neighbor reachable time times out, the neighbor state changes from Reachable to Stale, indicating that the neighbor reachable state is unknown.
  4. If node A in the Reachable state receives a non-NA Request message from node B, and the link-layer address of node B carried in the message is different from that learned by node A, the neighbor state of node A changes to Stale.
  5. Node A sends data to node B. The state of node A changes from Stale to Delay. Node A then sends an NS Request message.
  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.

Duplicate Address Detection

Before an IPv6 unicast address is assigned to an interface, duplicate address detection (DAD) is performed to check whether another node uses the address. DAD is required if IP addresses are configured automatically. An IPv6 unicast address assigned to an interface but not verified by DAD is called a tentative address. An interface cannot use the tentative address for unicast communication but will join two multicast groups: ALL-nodes multicast group and Solicited-node multicast group.

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.

Figure 11-12 shows an example of DAD.

Figure 11-12  DAD example

The IPv6 address FC00::1 is assigned to Host A as a tentative IPv6 address. To check the validity of this address, Host A sends an NS message containing the requested address FC00::1 to the Solicited-node multicast group to which FC00::1 belongs. Since FC00::1 is not specified, the source address of the NS message is an unspecified address. After receiving the NS message, Host B processes the message in one of the following ways:

  • 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 11-13 shows the router discovery function.

Figure 11-13  Router discovery example

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:

  1. A host automatically configures the link-local address based on the interface ID.
  2. The host sends an NS message for duplicate address detection.
  3. If address conflict occurs, the host stops address autoconfiguration. Then addresses need to be configured manually.
  4. If addresses do not conflict, the link-local address takes effect. The host then connects to the network and communicates with the local node.
  5. The host either sends an RS message or receives RA messages devices periodically send.
  6. The host obtains the IPv6 address based on the prefixes carried in the RA message and the interface ID.
Default Router Priority and Route Information Discovery

If there are multiple devices on the network where hosts reside, hosts need to select forwarding devices based on the destination address of the packet. In such a case, devices advertise default router priorities and route information, which allows hosts to select the optimal forwarding device based on the packet destination address.

The fields of default router priority and route information are defined in an RA message. These two fields enable hosts to select the optimal forwarding device.

After receiving an RA message containing route information, hosts update their routing tables. When sending packets to other devices, hosts check the routing table and select the optimal route.

When receiving an RA message carrying default router priorities, hosts update their default router lists. When sending packets to other devices, hosts select the device with the highest priority to forward packets from the router list. If the selected router does not work, hosts select the subsequent device in descending order of priority.


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 11-14 shows an example of packet redirection.

Figure 11-14  Packet redirection example

Host A needs to communicate with Host B. By default, Switch A sends packets from Host A to Host B. After receiving packets from Host A, Switch A discovers that sending packets directly to Switch B is more efficient. Switch A sends a Redirection message carrying the destination address of Host B to Host A to notify Host A that Switch B is a better next hop address. After receiving the Redirection message, Host A adds a host route to the default routing table. Packets sent to Host B will be sent directly to Switch B.

A device sends a Redirection message in the following situations:

  • The destination address of the packet is not a multicast address.
  • Packets are not forwarded to the device through routing.
  • After route calculation, the outbound interface of the next hop is the interface that receives the packets.
  • The device discovers that a better next hop IP address of the packet is on the same network segment as the source IP address of the packet.
  • After checking the source address of the packet, the device discovers a neighboring device in the neighbor entries using this address as the global unicast address or the link-local unicast address.

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.

Updated: 2020-02-26

Document ID: EDOC1000178170

Views: 272134

Downloads: 1028

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Previous Next