Ping command-test network connectivity between hosts
One, the ping command
1 Overview
-
The ping command is mainly used to test the network connectivity between hosts and can also be used. The ping command will use the ICMP transmission protocol to send a response message. If the remote host has no problems with the network function, it will respond to the message, thus knowing that the host is operating normally.
-
However, it is worth noting that the ping command under Linux system is slightly different from the ping command under Windows system. Running the ping command under Windows generally sends 4 requests to terminate the command; but under Linux, it will not terminate automatically. At this time, we need to press CTR+C to terminate or use the -c parameter to specify the number of requests sent for the ping command.
2. Format
3. Common parameters
Common parameters | Description |
---|---|
-d | Use the SO_DEBUG function of Socket |
-I | Send data packets using the specified network interface |
-l | Set the data packet to be sent out before sending the requested information |
-n | Only output values |
-p | Set the template style to fill the data packet |
-q | Do not display the instruction execution process |
-R | Record the routing process |
-s | Set the size of the data packet |
-t | Set the size of the survival value TTL |
-v | Detailed display of the execution process of instructions |
-c | Specify the number of times to send a message |
-i | Specify the interval between sending and receiving messages |
-W | Waiting timeout |
-w | How many seconds to stop the ping command operation |