Network Detection Techniques for Ping Commands

  

Ping is a very frequently used utility that determines if a local host can exchange (send and receive) datagrams with another host. Based on the information returned, we can infer whether the TCP/IP parameters are set correctly and are running properly. It should be noted that successfully performing one or two datagram exchanges with another host does not mean that the TCP/IP configuration is correct. We must perform a large number of datagram exchanges between the local host and the remote host to be sure of TCP/. The correctness of IP.

In a nutshell, Ping is a test program. If the Ping is running correctly, we can generally eliminate the faults in the network access layer, network card, MODEM input and output lines, cables and routers. The scope of the problem. However, because it can customize the size of the sent datagrams and endless high-speed transmission, Ping is also used as a DDOS (denial of service attack) tool by some people with ulterior motives. For example, many large websites are hacked to use hundreds of high-speed devices. Computers connected to the Internet continue to send a large number of Ping datagrams.

According to the default setting, the Ping command running on Windows sends 4 ICMP (Internet Control Message Protocol) echo requests, each 32 bytes of data, if everything is normal, we should be able to get 4 loopbacks. Answer. Ping can display the amount of time between sending a loopback request and returning a loopback response in milliseconds. If the response time is short, it means that the datagram does not have to go through too many routers or network connections. Ping can also display the TTL (Time To Live time) value. We can use the TTL value to estimate how many routers the packet has passed: the source location TTL start value (that is, a power of 2 that is slightly larger than the return TTL). ) - The TTL value when returning. For example, if the return TTL value is 119, then the TTL start value of the datagram leaving the source address can be estimated to be 128, and the source location to the destination location should pass through 9 router network segments (128-119); if the return TTL value is 246, The TTL start value is 256, and the source location to the destination location is through 9 router segments.

1. Typical order for detecting network failures through Ping

Normally, when we use the Ping command to find the problem or verify the network operation, we need to use many Ping commands. All are running correctly, we can believe that the basic connectivity and configuration parameters are no problem; if some Ping commands fail, it can also indicate where to find the problem. The following gives a typical detection sequence and corresponding possible failures:

ping 127.0.0.1

This Ping command is sent to the local computer's IP software, which never quits the computer. . If this is not done, it means that there are some basic problems with the installation or operation of TCP/IP.

ping local IP

This command is sent to the IP address configured by our computer. Our computer should always respond to the Ping command. If not, it means local configuration or There is a problem with the installation. When this issue occurs, LAN users disconnect the network cable and resend the command. If this command is correct after the network cable is disconnected, it means that another computer may be configured with the same IP address.

ping Other IP in LAN

This command should leave our computer, go to other computers through the network card and network cable, and then return. A reply echo is received indicating that the network card and carrier in the local network are operating correctly. However, if 0 echo reply is received, it means that the subnet mask (the code separating the network part of the IP address from the host part when subnetting) is incorrect or the network card is incorrectly configured or the cable system has a problem.

ping Gateway IP

If this command is answered correctly, it means that the gateway router in the LAN is running and can respond.

ping Remote IP

If 4 replies are received, the default gateway is successfully used. For dial-up users, it means that they can successfully access the Internet (but not to rule out the ISP's DNS).

ping localhost

localhost is a network reserved name for the system. It is an alias for 127.0.0.1. Every computer should be able to convert the name to this address. If this is not done in the band, there is a problem in the host file (/Windows/host).

ping www.xxx.com

Performing a Ping www.xxx.com address for this domain name, usually through a DNS server. If there is a failure here, the IP address of the DNS server is incorrectly configured. Or the DNS server is faulty (for dial-up users, some ISPs do not need to set up the Dns server). By the way: we can also use this command to implement the conversion of domain names to IP addresses.

If all the Ping commands listed above work properly, then we can basically rest assured that our computer's local and remote communication functions. However, the success of these commands does not mean that all of our network configurations are okay. For example, some subnet mask errors may not be detected by these methods.

2. Common parameter options for the Ping command

ping IP –t

Continuously execute the Ping command on the IP address until it is interrupted by the user with Ctrl+C.

ping IP -l 3000

The data length in the specified Ping command is 3000 bytes instead of the default 32 bytes.

ping IP –n

Execute a specific number of Ping commands.

Copyright © Windows knowledge All Rights Reserved