IPv6 uses five IPMPv6 packets to implement Neighbor Discovery protocol, which is more efficient than ARP in IPv4. The IPv6 Neighbor Discovery Protocol solves multiple node problems on the same link.
The IPv6 Neighbor Discovery Protocol provides the following functions: automatic configuration without servers, router discovery, prefix discovery, address resolution, neighbor inaccessibility detection, link MTU discovery, Next Hop decision, and duplicate address detection.
The IPv6 Neighbor Discovery Protocol defines five ICMPv6 packages:
Router request RS)-When the node does not want to wait for the next periodic vro announcement, it wants the vro to send the multicast package immediately. An initialized node can send a router request so that it can immediately obtain the configuration parameters of the router on the link.
RS is an ICMP packet of Type 133. The source address is the address allocated to the sending host. If no address has been allocated, 0: 0: 0: 0: 0: 0: 0: 0: 0: 0: 0. The destination address is the multicast address FF02: 2) of all routers)
Router declaration RA) -- periodically sends or responds to requests. Vrouters report their existence and provide the information required for node configuration.
RA is an ICMP packet of Type 134. The source address is the local link address of the sender router, and the destination address is the node address that sends the router request or the multicast address FF02: 1) of all nodes in the Link range ). The number of hops must be set to 255. The number of hops is limited to 255, so that devices not on this link cannot try to interfere with the communication flow by sending vro announcements. If the local device sends RA packets to the local device, the number of hops after the router is reduced by 1, making the packet illegal. The accept node only considers the RA with a hop limit of 255 as valid.
RA contains the router survival time. The router survival time tells the nodes how long they can use the router as the default router. The value 0 indicates that the router is not a candidate default router and cannot appear in the default router table of the node. The node that receives RA constructs a default router table. All routers that send RA and have a lifetime of less than 0 appear in this list.
Neighbor request NS)-allows the node to determine the neighbor's link layer address, or determine whether the neighbor can still be reached from the cached link layer address. Nodes are also allowed to determine whether duplicate IP addresses exist on the link.
The neighbor resolution message is used to obtain the neighbor's link layer address, provide the local link layer address, and verify the neighbor's accessibility. It is an ICMP message of Type 135. The source address of the IP package is the unicast address of the requesting node. When used to obtain the link layer address, the destination address is the multicast address of the requested node associated with the target IP address; when used for accessibility confirmation, the destination address is the unicast address. The maximum number of hops is 255. As in RA, 255 hops are received in NS to ensure that the packet does not pass through the router.
Neighbor declaring NA)-the response to the neighbor request or the link layer address is changed without sending the request.
The neighbor declares to be used as a response NS or immediately transmits new messages such as link layer address changes when the request is not sent. NA is an ICMP packet of Type 136. The source address is any valid unicast address assigned to the sending interface. When responding to NS, the destination address is the source address of the Request package, or if the source address is not specified, the destination address is all node addresses FF02: 1 ). The unrequested target address is also the address of all nodes. The hop count limit is 255.
Redirection-the route sends the traffic to a better first hop address on the two routes.
Replace ARP with RS and RA
In IPv6, RS (ICMPv6Type135), RA (ICMPv6Type136), and FF02: 1: FFxx: xxxx are used to determine the node link layer address.
IPv6 Neighbor Discovery protocol is more efficient than ARP in IPv4:
In IPv6, only the neighboring nodes concerned with this mechanism process the announcement messages of RS and RA in their protocol stacks. In IPv4, ARP broadcast enables all nodes on the link to send ARP messages to the IPv4 protocol stack.
In IPv6, nodes exchange link layer addresses in the same request. In IPv4, two ARP broadcast messages are required to obtain the same result.
Verify the accessibility of the IPv6 address and link layer address in the neighbor cache. In IPv4 ARP, table items are deleted after they expire.