? 1, Ping command.
? When your terminal equipment can't access the Internet, first confirm whether it is the fault of the local LAN. First of all, you need to confirm whether the network card of the device is normal. It's simple. Just ping 127.0.0. 1. If connected, the network card device is normal. Secondly, ping whether the gateway can be connected, and if so, the link to the gateway is connected; Ping other devices in the LAN again. If your device's ip address is192.168.1.10, then you can ping other devices in the same network segment, for example,192.5438+068.50089.000000000606
? To prevent attacks, many computers or servers will turn on the firewall function. The local firewall turned off the ICMP echo function. At this time, it is impossible to ping. Just turn off the firewall and test again.
Feedback information (Baidu Encyclopedia)
Request timeout
A. the other party has turned off the phone.
B The other party and himself are not in the same network segment, so they can't find each other through routing.
C the other party does exist, but ICMP packet filtering (such as firewall settings) is set.
How do I know if the other party exists? You can use the Ping command with the parameter -a to detect the other party. If you can get the NETBIOS name of the other party, it means that the other party exists and has a firewall. If you can't call, it's mostly because the other party doesn't exist or is turned off, or it's not in the same network segment.
D. The IP address is set incorrectly.
Unable to reach the destination host.
The other party is not in the same network segment as himself, and there is no default route set, or there is no such address on the network. For example, in the above example, if the default route is not set in machine A, running ping192.168.1.4 will result in "the destination host is unreachable".
The network cable is out of order.
Here, I want to explain the difference between "destination host unreachable" and "timeout". If there is a route to the destination through the router's routing table, and the destination cannot be reached for other reasons, "timeout" will occur at this time. If there is no route to the destination in the routing table, "destination host unreachable" will appear.
Incorrect IP address
This information indicates that you may not be connected to the DNS server, so you cannot resolve this IP address, or the IP address does not exist.
Source suppression received
This information is special, and the probability of its appearance is very small. Indicates that the other party or the halfway server is busy and cannot respond.
Unknown host-unknown host.
This error message means that the name of the remote host cannot be translated into an IP address by the domain name server (DNS). The reason of failure may be that the domain name server is faulty, or its name is incorrect, or the communication line between the network administrator's system and the remote host is faulty.
No answer.-No response
This failure indicates that the local system has a route to the central host, but it cannot receive any information sent to the central host. The failure may be caused by one of the following reasons: the central host does not work; The local or central host network configuration is incorrect; The local or central router is not working; The communication line is faulty; There is a routing problem in the central host.
Ping127.0.0.1:127.0.0.1is a local circular address.
If this address can't be Ping, it means that the TCP/IP protocol of the local machine can't work normally.
No route to the host: the network card is not working properly.
Transmission failed, error code: 10043 The network card driver is not normal.
Unknown host name: DNS configuration is incorrect.
2、tracert
I passed the order in the written test before I entered the company, and briefly described the working principle of traceroute.
Tracert is used for windows system and traceroute is used for linux system.
Its essential principle is the same, that is, using the time-to-live value (ttl) of ip packets and the error message of icmp to test the routing problem to the target device, and display the ip address of the router through which the packets pass in the ip network. When your computer sends the tracert command, it will send an ip packet to the destination address, which will set a lifetime value (ttl value). Every time a packet passes through a router, the lifetime is reduced by 1. When the lifetime is reduced to 0, the router will not forward the packet, but send the icmp ttl packet to the computer that originally sent the packet. Tracert program first sends a packet with ttl of 1 to the target address. When the packet reaches the destination address and passes through the first router, its lifetime will be reduced by 1, and the ttl value will become 0, so it sends an icmp ttl packet to the computer that originally sent the packet, and tracert knows the ip address of the first router on the path. Then send out the data packets with ttl 2 in turn. When passing through the second router, the ttl value has changed to 0 again. When the icmp ttl packet is sent back to the initial computer again, the computer will know the ip address of the second router, then send the packet with ttl of 3.4.5 to the target address in turn, and then check the router ip addresses of the target host one by one until it reaches the target address. Because tracert sends a packet to an uncommon port (above 30000) through UDP packet, it will receive the message "ICMP portunreachable", so it can be judged that it has reached the destination.
Tarita. The waiting time for a response (ICMP TTL expiration message) is fixed. If this time passes, it will print out a series of * symbols, indicating that the device can't send out the response of ICMP TTL expiration message within the given time on the path. Tracert then increments the TTL counter by 1 and continues.
3. Baidu search
Pathping is a routing tracking tool based on TCP/IP. This command combines the functions of ping and tracert commands and returns two parts. The first part shows the route used to reach the destination, and the second part shows the packet loss information of each router in the path. It reflects the path of packets from the source host to the target host, network delay and packet loss rate, and can effectively help us solve network problems.
It uses ICMP echo information to analyze network connections. Pathping sends a response message to all routers between the source address and the target address, and it calculates the response time of each router between the source host and the target host. With these data, we can easily measure the network delay and help find out the bandwidth bottleneck.
Provides information about the network delay and network loss of the intermediate hop between the source and the destination. Pathping sends multiple echo request messages to each router between the source and the target for a period of time, and then calculates the results according to the packets returned by each router. Because pathping can indicate the degree of packet loss of any specific router or link, users can determine the router or subnet that may have network problems. Pathping performs the same function as the tracert command by identifying the router on the path. Then, the command periodically sends a ping command to all routers within a specified period of time, and calculates the statistical results according to the non-numerical values returned by each router.