Tips for using Ping commands

Source: Internet
Author: User

Ping is a frequently used utility used to determine whether the local host can exchange, send, and receive data packets with another host. Based on the returned information, we can infer whether the TCP/IP parameter is set correctly and whether the operation is normal. Note that successfully performing one or two exchanges with another host does not indicate that the TCP/IP configuration is correct, we must exchange data between a large number of local hosts and remote hosts to ensure the correctness of TCP/IP.

To put it simply, Ping is a test program. If Ping runs correctly, we can basically eliminate faults in the network access layer, Nic, MODEM input/output lines, cables, and routers, this reduces the scope of the problem. However, Ping can be used as a tool for DDOS denial-of-service attacks because of the ability to customize the size of the sent data packets and the endless high-speed transmission, for example, many large websites are paralyzed by hackers who use hundreds of computers that can access the Internet at high speed to send a large number of Ping data packets.

According to the default settings, the Ping command on Windows sends four ICMP inter-network control packet protocols) Send back requests, each 32 bytes of data, if everything is normal, we should be able to get four send back responses. Ping can display the time between sending a return request and returning a return response in milliseconds. If the response time is short, the datagram does not have to pass through too many routers or network connections. Ping can also display the TTLTime To Live time) value. We can use the TTL value To estimate how many routers the data packet has passed: the start value of TTL at the source location is a two-byte number that is slightly greater than the returned TTL. For example, if the returned TTL value is 119, the initial TTL value of the outbound data packet from the source address is 128, and the source point to the target location must pass the 128-119 of the 9 vro CIDR blocks ); if the returned TTL value is 246, the start value of TTL is 256, and the source and target locations must pass through nine vro network segments.

1. Typical order of network faults detected by Ping

Under normal circumstances, when we use the Ping command to find the problem or check the network running status, we need to use many Ping commands. If all of them are running correctly, we can believe that the basic connectivity and configuration parameters are correct. If some Ping commands fail, it can also specify where to locate the problem. The following describes a typical detection sequence and possible faults:

· Ping 127.0.0.1

The Ping Command is sent to the IP address software of the local computer, which never exits. If this is not done, it indicates that the installation or running of TCP/IP has some basic problems.

· Ping the local IP Address

This command is sent to the IP address configured by our computer. Our computer should always respond to this Ping command. If it does not exist, it indicates that there is a problem with the local configuration or installation. When this problem occurs, the LAN user must disconnect the network cable and then resend the command. If this command is correct after the network cable is disconnected, it indicates that the same IP address may be configured on the other computer.

· Ping other IP addresses in the LAN

This command should leave our computer, go through the nic and network cable to other computers, and then return. If you receive a response, the NIC and carrier in the local network are running correctly. However, if you receive 0 replies, it indicates the code that separates the network part of the IP address from the host part when the subnet mask is used for subnet splitting) incorrect or the NIC configuration is incorrect or the cable system is faulty.

· Ping the gateway IP Address

If the command is correct, it indicates that the Gateway Router in the LAN is running and can respond.

· Ping a remote IP Address

If you receive four responses, the default gateway is successfully used. A dial-up Internet user indicates that the Internet access is successful, but the ISP's DNS is not ruled out ).

· Ping localhost

Localhost is a reserved network name for the system. It is an alias of 127.0.0.1. Every computer that is too computer can convert the name to this address. If this is not done, it indicates there is a problem in the host file/Windows/host.

· Ping www.xxx.com for example, www.yesky.com)

Ping www.xxx.com for this domain name. If the DNS server fails, the IP address of the DNS server is incorrectly configured or the DNS server fails, some ISPs do not need to set DNS servers ). By the way, we can also use this command to convert domain names to IP addresses.

If all the Ping commands listed above can run properly, we can basically rest assured that the local and remote communication functions of our computers can be implemented. However, the success of these commands does not mean that all our network configurations are normal. For example, some subnet mask errors may not be detected using these methods.

2. Ping Command Parameters

· Ping IP-t

Run the Ping command on the IP address until the IP address is interrupted by Ctrl + C.

· Ping IP-l 3000

The Data Length in the Ping command is 3000 bytes instead of the default 32 bytes.

· Ping IP-n

Run the Ping command for a specified number of times.

Related Articles]

  • Use the ping command to detect network layer protocols and hardware
  • Do not underestimate the ping command
  • Use four PING commands to determine network faults

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.