Neighbor Discovery

mhkabir1952
mhkabir1952  Diamond  (1)
7 years 10 months ago  View: 3563  Reply: 2
1F

Neighbor discovery (ND) is a group of messages and processes that identify relationships between neighboring nodes. IPv6 ND corresponds to a combination of the Address Resolution Protocol (ARP), ICMP router discovery, and ICMP Redirect of IPv4 and provides other functions.

After being configured with an IPv6 address, a node checks whether this address is available and does not conflict with other addresses. When a node is a host, a router needs to notify the host of the optimal next-hop address of a packet to a destination. When a node is a router, it needs to advertise its address, address prefix, and other configuration parameters to instruct hosts to configure parameters. When forwarding IPv6 packets, a node needs to know the link layer addresses and check reach-ability of neighboring nodes. IPv6 ND provides five types of ICMPv6 messages:

  • Router Solicitation (RS): After start-up, a host sends an RS message to a device, and waits for the device to respond with a Router Advertisement (RA) message.

  • Router Advertisement (RA): A device periodically advertises RA messages that contain prefixes and flag bits.

  • Neighbor Solicitation (NS): Through NS messages, an IPv6 node obtains the link-layer address of its neighbor, checks whether the neighbor is reachable, and performs duplicate address detection.

  • Neighbor Advertisement (NA): After receiving an NS message, an IPv6 node responds with an NA message. In addition, the IPv6 node initiatively sends NA messages when the link layer changes.

  • Redirect: When finding that the inbound interface and outbound interface of a packet are the same, a device can send Redirect messages to instruct the host that sends the packet to choose a better next hop.

IPv6 ND provides the following functions:

Duplicate Address Detection

Duplicate address detection is used to check whether an IPv6 address is available. The detailed process is as follows:

  1. When a node is configured with an IPv6 address, it immediately sends an NS message to check whether this address is used by other neighboring nodes.
  2. After receiving the NS message, a neighboring node checks whether the same IPv6 address exists. If yes, it sends an NA message with the IPv6 address to the source node.
  3. After the source node receives the NA message, it considers that this IPv6 address is used by a neighbor. Conversely, if the source node does not receive the NA message after sending an NS message, it indicates that the configured IPv6 address is available.

Neighbor Discovery

Similar to ARP in IPv4, IPv6 ND parses the addresses of neighbors and detects the reach-ability of neighbors based on NS messages and NA messages.

When a node needs to obtain the link-layer address of another node on the same local link, it sends an NS message of the type 135. The NS message is similar to an ARP Request message in IPv4 and is destined for a multicast address instead of a broadcast address. Only the node whose last 24 bits in the address are the same as the multicast address can receive the NS message. This reduces the possibility of broadcast storm. A destination node fills in its link-layer address in the NA message.

An NS message is also used to detect the reach-ability of a neighbor when the link-layer address of the neighbor is known. An NA message is the response to an NS message. After receiving an NS message, a destination node responds with an NA message of the type 136 on the local link. After receiving the NA message, the source node can communicate with the destination node. When the link-layer address of a node on the local link changes, the node actively sends an NA message.

Figure 1 shows the process of the IPv6 neighbor discovery.

Figure 1:  Process of the IPv6 neighbor discovery
Armetta
Armetta  Diamond 
7 years 10 months ago
2F
documentation very useful for my job

foisal
foisal  Gold 
7 years 10 months ago
3F
Very useful