Neighbor Discovery Protocol (NDP) is an essential component of the IPv6 Internet protocol. It was designed to facilitate the automatic configuration and maintenance of IPv6 addresses, as well as to discover and maintain information about neighbors on a network.
At the end of the article you will find a small test that will allow you assess the knowledge acquired in this reading
The Neighbor Discovery (ND) Protocol in IPv6 uses several types of messages to carry out its functions. The message types used by the ND are listed below:
Router Solicitation
Nodes send multicast Router Solicitation messages to request network configuration information from routers present on the network. These messages are used to obtain Router Advertisement messages from routers to obtain information about network configuration parameters, such as available prefixes and routing options.
Router Advertisement
Routers send Router Advertisement messages to inform network nodes of their presence and provide them with information about the network configuration. These messages contain, for example, the IPv6 address of the router and network configuration parameters, such as prefix options and address renewal time intervals. Nodes use this information to automatically configure their IPv6 addresses to adapt to the network configuration.
Neighbor Solicitation
This ICMPv6 message is used to obtain information about a specific IPv6 address. A node sends a multicast Neighbor Solicitation to discover the MAC address associated with a known IPv6 address.
Neighbor Advertisement
In addition to the Neighbor Advertisement messages used to respond to Neighbor Solicitations, nodes can also send periodic Neighbor Advertisements to keep information about their status and availability up to date. These messages are used to inform other nodes on the network that they are still active and available for communication.
Redirect
This ICMPv6 message is used when a node needs to inform other nodes in the network about a best path to a specific destination over a different interface. The sending node sends a redirect message containing the destination IP address and the next hop IP address.
Neighbor Unreachability Detection
The ND also includes a mechanism to detect unreachability of neighbors in the network. When a node stops receiving messages from a neighbor for a given period of time, it sends neighborhood removal messages to inform other nodes of the neighbor's unreachability. This allows nodes to update their neighbor table and avoid sending packets to an unreachable destination.
The ND consists of various messages and processes that allow nodes in an IPv6 network to discover and communicate with other neighboring nodes. The Neighbor Discovery Protocol in IPv6 has several key functions that it plays in a network. These features include:
Address resolution
Address resolution in IPv6 is the process by which a node determines the link layer address (MAC address) corresponding to a specific IPv6 address. This is accomplished using the Neighbor Discovery protocol, which consists of two types of messages: Neighbor Solicitation and Neighbor Advertisement.
Below is a detailed explanation of the address resolution process in IPv6:
Neighbor Solicitation
- When a node needs to know the MAC address corresponding to an IPv6 address, it sends a Neighbor Solicitation (NS) message to the destination IPv6 address. The NS message is sent as an IPv6 multicast packet requesting address resolution.
- The NS message contains the destination IPv6 address and the source MAC address of the sending node is used.
Neighbor Advertisement
- When the destination node receives the NS message, it checks whether its IPv6 address matches the destination address in the message.
- If there is a match, the destination node responds with a Neighbor Advertisement (NA) message containing its MAC address.
- The NA message is sent as an IPv6 unicast packet to the sender node, and the sender node uses the received MAC address to establish communication with the destination node.
Neighbor table update
- Each node maintains a neighbor table where the IPv6 addresses and MAC addresses of known neighbors are stored.
- When an NA message is received, the sending node updates its neighbor table with the IPv6 address and MAC address of the destination node.
This neighbor table is used to streamline future address resolutions, avoiding the need to send repetitive NS messages.
It is relevant to take into consideration that the address resolution procedure in IPv6 has similarities with the Address Resolution Protocol (ARP) in IPv4, although there are some differences between the two.
Address Duplication Detection
Address duplication detection in IPv6 is a process used to ensure that a specific IPv6 address is not being used by another node on the network. This avoids conflicts and ensures the uniqueness of addresses on the network. Below is a comprehensive description of how the address duplication detection process is carried out in IPv6, explaining in detail how it works:
Generation of a new IPv6 address
- When a node needs to configure a new IPv6 address, either manually or through auto-configuration, it generates a new address based on certain parameters such as network prefix and interface identifier.
- The node ensures that the new address generated is not currently in use on the network.
Neighbors request
- Once the node has configured the new IPv6 address, it sends a multicast Neighbor Solicitation message to the IPv6 address it wants to verify.
- The Neighbor Request contains the IPv6 address being verified and is sent using the source link layer address of the sending node.
Neighbors response
- If there is another node on the network using the same IPv6 address, it will respond to the Neighbor Request message with a Neighbor Advertisement message indicating that the address is already in use.
- The node that performed the verification receives the Neighbor Announcement response and detects that there is a duplicate address.
Selecting a new address
- Once address duplication is detected, the node that performed the verification must select a new IPv6 address to avoid conflicts.
- You can generate a new address using a different method, such as a change to the interface identifier, or using another autoconfiguration option if available.
Neighbor table update
- After selecting a new address, the node updates its neighbor table with the new IPv6 address and the corresponding MAC address.
- This ensures that the neighbor table is updated with the correct information for future communications on the network.
The IPv6 address duplication detection process allows nodes to verify the uniqueness of IPv6 addresses before use. By sending a Neighbor Request and receiving a Neighbor Advertisement response, nodes can detect and avoid potential address conflicts in the network. This contributes to stable and uninterrupted operation of the IPv6 network.
Router Discovery
Router discovery in IPv6 is a process by which nodes on a local network identify and obtain information about the routers available on the network. This allows nodes to determine the optimal route for sending packets and configure relevant network parameters.
Router discovery works as follows:
Router Advertisements
- Routers on the network periodically send messages called “Router Advertisements” using the “All-Routers” multicast address.
- These messages contain essential information for node configuration, such as network prefixes, address renewal time interval, and other configuration parameters.
Router Solicitations
- Nodes can send “Router Solicitations” messages to the “All-Routers” multicast address to request configuration information from available routers on the network.
- This can be useful, for example, when a node has just joined the network or when it needs configuration updates.
Processing Router Announcement Messages
- When a node receives a Router Announcement message, it examines its contents and extracts relevant information.
- This may include advertised network prefixes, which specify the scope and configuration of the IPv6 address that the node can use.
Configuring addresses and network parameters
- Nodes use the information obtained from Router Advertisement messages to configure their IPv6 addresses and other network parameters.
- For example, a node can assign an IPv6 address based on advertised network prefixes and set the address renewal time interval based on the information provided by the routers.
Neighbor table update
- Each node maintains a neighbor table where the IPv6 addresses and MAC addresses of known routers are stored.
- When a node receives a Router Advertisement message, it updates its neighbor table with the IPv6 address and MAC address of the advertising router.
- This allows the node to select the optimal route to send packets and establish communication with routers efficiently.
Brief knowledge quiz
What do you think of this article?
Do you dare to evaluate your learned knowledge?
Recommended book for this article
IPv6 book with MikroTik, RouterOS v7
Study material for the MTCIPv6E Certification Course updated to RouterOS v7