The command to test network connectivity is: ping command. Ping is a program used to test network connections. It is a service command working at the application layer in the TCP/IP network architecture. It mainly sends ICMP (Internet Message Control Protocol) Echo request messages to a specific destination host to test Check whether the destination station is reachable and understand its status.
The command to test network connectivity is: ping command.
Ping is a frequently used utility, mainly used to determine network connectivity.
PING (Packet Internet Groper), Internet packet explorer, a program used to test network connection volume. Ping is a service command that works at the application layer in the TCP/IP network architecture. It mainly sends ICMP (Internet Control Message Protocol) Echo request messages to a specific destination host to test whether the destination station is reachable and Learn about its status.
This is very useful to determine whether the network is connected correctly and the condition of the network connection. Simply put, ping is a test program. If ping runs correctly, it can generally eliminate faults in the network access layer, network card, Modem input and output lines, cables and routers, thereby narrowing the scope of the problem.
Ping can display the amount of time in milliseconds between sending a request and returning a response. If the response time is short, it means that the datagram does not have to pass through too many routers or networks, and the connection speed is faster.
(1) Command format
ping host name; ping domain name; ping IP address. All three formats are available.
(2) Basic application of ping command
Generally, users can use a series of ping commands to find out where the problem lies, or to check the operation of the network.
The following is a typical detection sequence and corresponding possible faults:
① ping 127.0.0.1
If the test is successful, it indicates that the network card and TCP/IP protocol are The installation, IP address, and subnet mask settings are normal. If the test is unsuccessful, it means there is a problem with the TCP/IP installation or settings.
② Ping the local IP address
If the test is unsuccessful, it means there is a problem with the local configuration or installation, and the network equipment and communication media should be tested, inspected and eliminated.
③ Ping other IPs in the LAN
If the test is successful, it means that the network card and carrier in the local network are running correctly. But if you receive 0 echo replies, it means that the subnet mask is incorrect or the network card is misconfigured or there is a problem with the cable system.
④ ping gateway IP
If the response to this command is correct, it means that the gateway router in the LAN is running and can respond.
⑤ Ping remote IP
If a correct response is received, it means the default gateway is used successfully. For dial-up Internet users, it means that they can successfully access the Internet.
If all the ping commands listed above can run normally, then there will basically be no problem for the computer to communicate locally and remotely.
(3) Common parameter options of the ping command
ping IP -t: Continuously execute the ping command on the IP address until interrupted by the user with Ctrl C.
ping IP -l 2000: Specify the specific data length in the ping command (here is 2000 bytes) instead of the default 32 bytes.
ping IP -n 20: Execute the ping command a specific number of times (20 here).
For more related knowledge, please visit: PHP Chinese website!
The above is the detailed content of What is the command to test network connectivity?. For more information, please follow other related articles on the PHP Chinese website!