ICMPv6 and neighbor discovery protocols

Source: Internet
Author: User

ICMPv6 and ICMPv6 include error messages and notification messages. Error message: 1. Inaccessible destination; 2. Too large data packet; 3. Timeout; 4. parameter error. Notification Message: 1. Requests are sent; 2. Echo response; 1. multicast listener query; 2. multicast listener report; 3. multicast listener completion report; 1, route request message, 2. Route message announcement; 3. Neighbor request message; 4. Neighbor message announcement; 5. Redirect message; Common Message format: type (8bit) code (8bit) checksum (16 bit) message body type: error message (0-127) notification message (128-255) the error message ICMPv6 is used to tell the device that the packets it sends cannot be transmitted correctly. ICMPv6 notification messages are required for various test, diagnosis, and support functions. Error message: 1. The destination cannot be a route to the destination (there is no default route in the routing table, and the network cannot be reached). Communication with the destination is denied by management (access control list or other packet filtering policies) beyond the original address range (the source address is the local link address and the destination address is the global unicast address), the address cannot be reached (the host cannot be reached) the port cannot reach the source address and the inbound/outbound policy conflict, and the route is denied to the destination 2. The IPv6 packet must be segmented at the source end (the remote end can be a host or a router, when the IPv6 router receives a data packet greater than the MTU of the outbound interface, it discards the data and sends an extremely large ICMPv6 data packet to the remote end. The MTU value of the link is contained in the packet's oversized message. The MTU of IPv4 is at least 68 bytes. IPv6 requires that the minimum MTU of all links be 1280 bytes. Path MTU discovery process: the PMTU is sent to 1500 first. If an error occurs, the transmission continues Based on the MTU value in the error message to know the destination. Obtain MTU. 3. Timeout: 1. The number of entries is reduced to 0. 2. The reorganization times out. 4. Parameter Error ICMPv6 announcement message; 1. Echo Request and echo response; 2. multicast. 3. The Neighbor Discovery protocol. Cause of protocol discovery using neighbors: SLAAC (automatically configured with stateless addresses), automatically confirms the network prefix, default gateway, and gas configuration information. After determining whether the local link address or global unicast address used by other devices (DAD) identifies the destination IPV6 address, determine the L2 link address (usually Ethernet, equivalent to address resolution) of the device on the network. When the router or the path to the router fails, the host takes the initiative to find an alternative device or path. Learn which neighbors are reachable and which neighbors are not reachable (NUD) 1. Route request messages and route advertised messages: route advertised messages are sent periodically and can also be used as the corresponding messages of the route request message, it mainly provides host addressing information and other configuration messages, and is an important part of SLAAC. The default gateway is the source address of the route notification message and the local link address. The route notification message can be used as the Response Message of the route request message, but is always sent to all nodes for multicast. 2. Neighbor request messages and neighbor announcement messages are also part of the following three important processes: address Resolution DAD (Duplicate address detection, Duplicate address detection) NUD (Neighbor Unreachability detection Neighbor non-Accessibility detection) a Neighbor declares a message that can be used as the corresponding message of the Neighbor request message, or can be independently sent as needed to quickly spread new messages. Before discussing neighbor message declaration and neighbor request message, we should first discuss two important data structures: neighbor cache table (neighbor cache) and destination cache table (destination cache ); the host needs to maintain two tables or cache tables for each interface: 1. The neighbor cache Table 2. The neighbor cache table of the destination cache table is equivalent to the ARP cache table in IPv4, the neighbor cache table maintains the list of information sent from the nearest traffic to the neighbor. The table items contain the Ipv6 unicast address and its corresponding L2 link address. The device maintains the cache table by receiving information in the neighbor announcement message. The destination cache table maintains the list of recently sent destinations, including other links or destinations on other networks. The table items in this table are the L2 link address of the One-hop router, the destination cache table can be a subset of the neighbor cache table. Address Resolution: similar to arp process in Ipv4. 1. PC1 sends a ping command to pc2. 2. PC1 checks the cache table based on the IP address of PC2 to obtain the corresponding L2 MAC address. If not, PC3 and PC1 pause sending the packet, instead, a neighbor request message is sent to the multicast address of the Request node. The destination address in the neighbor request message is the Ipv6 address in the ping command. 4. After receiving the neighbor request message, PC2 sends the neighbor notification message to pc1. the MAC address of the link layer is provided in the message. The neighbor notification message is sent to pc1, PC1 receives the neighbor message and updates its neighbor cache Table 6. PC1 can send frames to pc2. 7. PC2 responds to the Message response explicitly. The multicast MAC address starts with 33: 33 and is followed by the last 32 digits of the IP address. For details about the multicast address of the Request node, the device automatically creates a multicast address for each Unicast address using the ing technology. In autumn, the multicast address of the Request node is prefixed by FF02: 0: 0: 0: 0: 1: FF00:/104 create the last 24bit of the unicast address. PC2 global unicast address global route prefix subnet ID Interface ID 24bit 2001: 0DB8: AAAA 0001 0000 0000 00 00:0200 PC2 Ipv6 request node multicast address (copy the last 24bit above) FF02 0000 0000 0000 0000 FF 00 0001 request node multicast address ing to Ethernet destination MAC address 33-33 FF-00-02-00 (replicated the post 32bit of the requested multicast address) PC2 IPv6 request node multicast address FF02: 1: FF00: 200 PC2 ing request and e single ethernet address: 33-33-ff-00-02-00 although the probability is very small, however, the interface IDs of other devices may still have the same 24bit, but this will not cause problems for processing data packets and checking the ICMPv6 Destination Address, because in this process, other devices can determine that the target address does not match their Unicast address, so they do not use a neighbor to advertise a message for response. In Ipv4, arp is broadcast to the MAC as ff-ff. To send arp to all devices, IPv6 is much more efficient. Duplicate address check: The device uses the DAD mechanism to determine whether the desired address has been used by other devices. RFC4861 recommends that you assign the unicast address to the interface before, you need to execute the DAD process for each thin address (local Unicast address or global unicast address on the Link), regardless of the address configuration method (SLAAC, DHCPv6, or manual configuration ). 1. PC1 automatically creates a local Unicast address for its Ethernet interface and attaches the prefix FE80:/10 to the randomly generated 64bit Interface ID. 2. PC1 sends a neighbor request message to determine whether other devices are using the local link address. Source MAC address: MAC address of PC1 destination MAC address: 33-33 multicast address IPv6 packet header: source IPv6 address: Unspecified: Destination IPv6 address, it is the request multicast address corresponding to the local link address of PC1. The destination Ipv6 address is the local link address of pc1. If other devices are using a changed address, they must use a neighbor message to send a response. 3. Set a timer in PC1. If no response is received within the set time, you can use this address. Neighbor non-Accessibility Detection: there are many reasons for communication faults between the two Ipv6 devices, such as power failure of the host or cable failure. Therefore, the device must actively track the accessible status of data packets to be sent. There are two ways to verify the Accessibility: 1. the neighbor who responds to the neighbor request message declares the message. 2. The upper-layer process indicates that the connection is successful, for example, confirmation information in the active TCP connection. Automatic Configuration of stateless addresses: SLAAC (automatic configuration of stateless addresses) is a mechanism that allows a host to generate its own Unicast address by combining local available brainwashing information with the Information advertised by the router. The automatic configuration process includes generating the local link address and global address through SLAAC, and also the steps for duplicate address detection to verify the uniqueness of the address on the link. SLAAC completes configuration in the following four steps: Step 1: Create local unicast link: the host creates its own local link address, without manual configuration or using the DHCPv6 server. The prefix of the local link address is FE80:/10, which is attached to the 64bit Interface ID. The Interface ID is created either in EUI-64 format or in a random generation mode. Step 2: Execute DAD for the local link status address. The source address of the message is unspecified:, and the destination address is the multicast address of the Request node associated with the local address of the link. If other nodes use this address, then the message will be returned to the neighbor. Step 3: The router announcement message provides the address configuration information. The host obtains the global unicast address and other configuration information from the vro announcement message. If the host does not receive the vro announcement message, it returns the multicast address FF02 to all vrouters :: 0. Send the router request message. Step 4: Execute DAD for the global unicast address, which is the same as step 2. Redirection message: the function of ICMPv6 redirection message is to notify the device of a better next hop router, which works in the same way as Ipv4 redirection messages. For example, if the host sends data to its default router A and router A forwards the data to router B and finds that router B and router A are in the same CIDR block, then A will send A redirection message to the host, after the host receives the redirection message, the packet is sent directly to router B.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.