Understanding ping
In this step, we will learn how to use ping
to test the connectivity between two nodes in the vast network of Skylarion. ping
sends out echo requests to an address and waits for a response, acting as a sonar in the etherscape, thus allowing an Air Dancer to confirm the visibility between islets in the sky.
Open your terminal and navigate to the /home/labex/project
directory. Here, let's create a reference file named ping_hosts.txt
where we'll store the names of the floating isles, or in technical terms, the hostnames that we wish to test our network against:
echo "192.168.1.1" > ~/project/ping_hosts.txt
Now, letโs execute our first ping
test. In the terminal, use the following command to send out four echo requests to the target host:
ping -c 4 $(cat ~/project/ping_hosts.txt)
The -c
flag specifies the number of echo requests to send. You should see output similar to this, indicating successful communication:
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1: icmp_seq=1 ttl=64 time=1.04 ms
64 bytes from 192.168.1.1: icmp_seq=2 ttl=64 time=0.680 ms
64 bytes from 192.168.1.1: icmp_seq=3 ttl=64 time=0.639 ms
64 bytes from 192.168.1.1: icmp_seq=4 ttl=64 time=0.588 ms
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3054ms
rtt min/avg/max/mdev = 0.588/0.736/1.040/0.173 ms
If you receive a message similar to the following, indicating a packet loss, then you can confirm that the Air Dancer is not visible from the sky:
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 0 received, 100% packet loss, time 3062ms
This indicates the echo
of your call resonating through the network and bouncing back, confirming a clear path to the destination.