Troubleshoot internet connection problems with the ping command
The ping command
Ping is a command line network utility tool to test network connectivity. It tests the connection between a sender and a receiver node. It reports whether the receiver node responds by sending an echo request. The receiving node responds with an echo reply.
Ping simply sends a signal to another computer and waits for a response.
dribbit@ubuntu-dribbit:~$ ping dribbit.eu -c 5 PING dribbit.eu (188.8.131.52) 56(84) bytes of data. 64 bytes from web-001 (184.108.40.206): icmp_seq=1 ttl=53 time=20.9 ms 64 bytes from web-001 (220.127.116.11): icmp_seq=2 ttl=53 time=19.0 ms 64 bytes from web-001 (18.104.22.168): icmp_seq=3 ttl=53 time=19.5 ms 64 bytes from web-001 (22.214.171.124): icmp_seq=4 ttl=53 time=21.0 ms 64 bytes from web-001 (126.96.36.199): icmp_seq=5 ttl=53 time=21.8 ms --- dribbit.eu ping statistics --- 8 packets transmitted, 8 received, 0% packet loss, time 7010ms rtt min/avg/max/mdev = 18.954/20.252/21.825/1.017 ms
A -c (count) argument is added to stop the command after 5 requests. When omiting the count argunent on a Linux system, control + c is used to stop the ping command.
How to troubleshoot connectivity problems in 5 steps
|Can you ping 127.0.0.1||Next question||There is a problem with the TCP/IP software on the computer.|
|Can you ping to your local IP||Next question||Badly configured local IP address or problems with the network adaptor.|
|Can you ping the default gateway||Next question||The computer can't communicate with the local subnet. Could be a problem with the cables, wifi, router, switch or hub.|
|Can you ping an external IP address||Next question||No connection beyond the local network segment. Could be a problem with the internet modem or the router.|
|Can you ping an external hostname||Network connection should be fine.||There is a DNS problem. Could be that the computer can't reach the DNS server or there is a fault is the host file.|