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

Reminder

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

upgrade

Troubleshooting Guide

CloudEngine 16800, 12800, 12800E, 8800, 7800, 6800, and 5800 Series Switches

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).
What Is Ping?

What Is Ping?

Ping Overview

Ping is a common method to troubleshoot device accessibility failures. It uses a series of Internet Control Message Protocol (ICMP) packets to determine:
  • Whether a remote device is accessible.
  • Whether packets have been lost during remote access.
  • How long the round-trip delay is in communication between the local and remote devices.

Ping Implementation

The following is a sample of ping operation procedure.

In Figure 22-119, PC1 attempts to ping PC2 (11.1.1.2).

Figure 22-119 Ping implementation
  1. The ping program generates an ICMP request packet.

    1. The ICMP Echo Request packet is transmitted to the IP layer along the protocol stack. Then the IP packet header (including the source and destination IP addresses) is encapsulated in the ICMP Echo Request packet.

      During encapsulation, the IP layer determines that the source and destination IP addresses are located on different network segments according to the IP addresses and masks in the ICMP packet.

    2. The ICMP Echo Request packet is then transmitted to the link layer. The ICMP Echo Request packet cannot be encapsulated with the Ethernet frame header because the destination MAC address is unknown.

    3. PC1 searches for the next hop in the FIB table because the source and destination IP addresses are located on different network segments.
      1. If the next hop is not found, PC1 cannot obtain the IP address or MAC address of the next hop. The ICMP request packet thus cannot be encapsulated with the Ethernet frame header. The ping operation fails.
      2. If the next hop is found, PC1 obtains the IP address of the next hop. However, the MAC address of the next hop is unknown. PC1 sends an ARP request packet to request the MAC address of the next hop.
  2. After the next-hop port (port a 10.1.1.2/24) receives the ARP request packet, it finds that the destination address is a local address. Then port a responds with a unicast ARP reply packet that contains the MAC address mapping 10.1.1.2/24 to PC1.

  3. When receiving the ARP reply packet, PC1 obtains the MAC address of the next hop. Then PC1 encapsulates the ICMP Echo Request packet into an Ethernet frame and sends the Ethernet frame to the switch.

    Before sending the ARP request packet to the switch, PC1 fills the mapping between its own IP address and MAC address into the packet. When receiving the ARP request packet from PC1, the switch fills the address mapping of PC1 into the local ARP cache. This improves efficiency of subsequent communication between the switch and PC1 and reduces communication data.

  4. After receiving the ICMP Echo Request packet, the switch removes the Ethernet frame header, and sends the packet to the IP layer. The IP layer finds that the destination address 11.1.1.2/24 is not a local address, so it searches the routing table and re-encapsulates the packet.

    The switch does not know the destination MAC address (MAC address matching 11.1.1.2/24), so the switch sends a broadcast ARP request packet.

  5. PC2 receives the ARP request packet and finds that the destination address of the packet is a local address, so PC2 returns a unicast ARP reply packet that contains the MAC address matching 11.1.1.2/24.

    In addition, PC2 records the mapping between the IP address and MAC address of the switch's port b into the local ARP cache.

  6. The switch obtains the MAC address of PC2 from the ARP reply packet, encapsulates an Ethernet frame header into the packet, and sends the packet to PC2.

  7. After receiving the packet, PC2 removes the Ethernet frame header. When finding that the packet is the ICMP request packet, PC2 sends an ICMP reply packet to PC1. In this case, the source IP address becomes IP address 11.1.1.2/24 of PC2 and the destination IP address becomes 10.1.1.1/24 of PC1.

    Since the source and destination IP addresses are located on different network segments, PC2 searches the FIB table for the next hop. The next hop is the switch's port b (11.1.1.1/24). As mentioned in preceding steps, PC2 has recorded the address mapping of the switch's port b in the ARP cache, so PC2 does not need to send an ARP request packet to the switch. Instead, PC2 obtains the MAC address matching 11.1.1.1/24 from its local ARP cache, encapsulates the MAC address into the ICMP reply packet, and sends the packet to the switch.

    Similarly, the switch does not need to send an ARP request packet to PC1. The switch directly encapsulates PC1's MAC address found in the ARP cache into the ICMP reply packet. Then the switch sends the packet to PC1.

  8. After receiving the packet, PC1 decapsulates the Ethernet frame header and IP header. Finally, it learns that the packet is an ICMP reply packet and the ping operation succeeds.

Translation
Download
Updated: 2020-01-07

Document ID: EDOC1000060766

Views: 608511

Downloads: 2951

Average rating:
This Document Applies to these Products

Related Version

Related Documents

Share
Previous Next