Basics of networking
15. Basic tests of computer networks
15.1. ping
The ping programme is used to diagnose network connections. We use it to check the quality of the connection between the computers sending requests and sending back a reply.
Ping will answer the following questions:
- Is there a connection between the computers?
- What is the response time for a sent packet?
Run the program at the MS Windows command line (Linux/Mac terminal). At the command line type: ping [IP or name] and confirm by pressing Enter.
An example of how the ping program works in Linux:
ping 10.10.10.1
PING 10.10.10.1 (10.10.10.1) 56(84) bytes of data.
64 bytes from 10.10.10.1: icmp_seq=1 ttl=64 time=0.364 ms
64 bytes from 10.10.10.1: icmp_seq=2 ttl=64 time=0.274 ms
64 bytes from 10.10.10.1: icmp_seq=3 ttl=64 time=0.433 ms
64 bytes from 10.10.10.1: icmp_seq=4 ttl=64 time=0.545 ms
64 bytes from 10.10.10.1: icmp_seq=5 ttl=64 time=0.380 ms
64 bytes from 10.10.10.1: icmp_seq=6 ttl=64 time=0.284 ms
64 bytes from 10.10.10.1: icmp_seq=7 ttl=64 time=0.477 ms
64 bytes from 10.10.10.1: icmp_seq=8 ttl=64 time=0.257 ms
^C
--- 10.10.10.1 ping statistics ---
8 packets transmitted, 8 received, 0% packet loss, time 7154ms
rtt min/avg/max/mdev = 0.257/0.376/0.545/0.099 ms
In the example above, an ICMP Echo Request packet was sent 8 times and the same number of replies (ICMP Echo Reply) were received. The packets were sent from the computer with IP 10.10.10.2 to the computer with IP 10.10.10.1. The average response time is 0.376 milliseconds.