Ping process
A source sends an Internet Control Message Protocol (ICMP) Echo Request message to a specified IP address (the destination). Upon receipt, the destination replies with an ICMP Echo Reply message. If the source receives the ICMP Echo Reply message within a specified period, the destination is reachable. Otherwise, the source considers the destination unreachable and displays a message indicating that the ping operation timed out.
In a ping operation, the identifier of an ICMP message is used as the ping process ID. Each ICMP Echo Reply message is mapped to a ping process.
The ping command labels each ICMP Echo Request message with a sequence number that starts from 1 and increases by 1 for each subsequent message. The number of ICMP Echo Request messages to be sent varies in different processes. By default, a device sends five ICMP Echo Request messages at a time. If the destination is reachable, the source can receive five ICMP Echo Reply messages whose sequence numbers correspond to those of the sent ICMP Echo Request messages. The number of ICMP Echo Request messages can be set. If the TTL value of a message is reduced to 0 when the message reaches the Device other than the destination, this Device replies with an ICMP Time Exceeded message, indicating that the destination is unreachable.
Ping operation on trunk member interfaces
A ping operation can be performed on Layer 3 trunk interfaces (logical interfaces) in addition to physical interfaces.
A trunk interface is a logical interface comprised of multiple physical interfaces, called members, bundled together. The transmission path of each trunk member interface varies and consequently the delay, jitter, and packet loss rate of member interfaces also vary. As a result, if service performance of a trunk interface deteriorates, you need to check whether a member interface is faulty. To do so, you can use the ping operation on trunk member interfaces. The implementation is as follows:
To monitor the end-to-end link status of a trunk member interface, ensure that ICMP Echo Request and Reply messages traverse the link of this trunk member interface. This means that on the destination, an ICMP Echo Reply message is sent to the source through the interface that receives the ICMP Echo Request message.
Ping operation on a TCP connection
A ping operation can be performed to check whether the client and the TCP server can communicate with each other. It can also check the time taken to set up a TCP connection through a three-way handshake.
The client initiates a ping operation, in which the IP address and port number of the TCP server is specified. The client sends a TCP SYN message to establish a connection with the TCP server. Upon receipt, the TCP server accepts the request and responds to the client with a TCP SYN ACK message. After receiving the TCP SYN ACK message, the client returns an ACK message to the TCP server, which indicates that a TCP connection has been successfully set up.
After a TCP connection is established, the client calculates the time taken to establish it with the TCP server through a three-way handshake. To perform the calculation, the client calculates the time difference between sending a TCP SYN message and receiving a TCP SYN ACK message and between receiving a TCP SYN ACK and sending an ACK message. This information helps you learn the running performance of the TCP protocol on the network.
Tracert process
The source device first sends three UDP packets with the TTL value of 1 to a target device. By default, the first packet uses port 33434 as the receive port on the target device. For each successive packet, the port number increases by one. For example, the second packet uses port 33435 as the receive port, and the third packet uses port 33436 as the receive port. The TTL value of 1 causes the UDP packets to "timeout" as soon as they reach the first router along the path. The router then responds with an ICMP Time Exceeded message indicating that the UDP packets have expired. The source device sends another three UDP messages, each with the TTL value of 2, which causes the second router to reply with ICMP Time Exceeded messages. This process repeats until the UDP packets reach the destination of the path.
If these UDP packets are sent to an invalid port at the destination, ICMP Port Unreachable messages are returned. Such a message indicates that the port is unreachable and the tracert process has stopped. The tracert process collects information about the path along which packets travel to the destination.
The maximum TTL value for a UDP packet is 30. Each time no response is received within the configured timeout period, the source node displays a prompt indicating that the UDP packets expired. If TTL values in UDP packets expire, the destination is unreachable, and the tracert test fails.