Exercise: P2P Network Latency Tests
As we discussed in Week Three, "How The Internet Works?", while we can talk about what protocols the internet uses, its history, and approximately how it works, there is still some degree of mystery to it, in the sense that its composed of billions of actors in a decentralized system. Scientists and network engineers may try to quantify it, but there are still a lot of open questions. Here is a quote from the Week Three Network Topology presentation that is pointing to some of these limits of understanding:
The idea behind this exercise is to do some "citizen science" / direct observation, and empirically measure the speed, route and latency of internet connection between all of our different servers in this class.
This is definitely not necessary for anything, and it just out of nerdy curiosity for anyone who wants to participate. To participate, you can follow the test outlined below via terminal, and then enter your results onto this wiki page.
As a sidequest, it would be interesting to create a bash script which could automate all the tests below between all the different servers in the class and output one simple result. (note: after making this wiki page, and testing some things out…. I actually think the test won't really be able to give interesting results until a script like this is made, which would make tests more consistent and reproducible… but still feel free to check out this wiki and try out the commands and records what happens, if inspired)
⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘
Test 1. ping
First lets ssh into our server, via ssh yourusername@youripaddress
Now here are some tests we can run about the connection between your server and our class server where this wiki is running (we can use the domain of the wiki o.commoninternet.net for this):
First lets install a command-line tool for testing the latency of a connection:
sudo apt-get install iputils-ping
Then lets use ping to test our network connection to different locations.
This command runs ping 5 times, and returns the average request time:
ping -c 5 o.commoninternet.net
And should return something like this:
--- o.commoninternet.net ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4001ms
rtt min/avg/max/mdev = 26.601/29.783/34.953/2.823 ms
In the above output, 29.783 ms is the average time.
We can then record our different ping results in the table below.
If you are on your server, and your server is connected to the tailscale network, you should also be able to test pinging other classmates servers via their tailscale tunnel IP, and theoretically with tailscale this should actually test the speed of a direct connection from your server to their server.
| Source | Destination | Result |
|---|---|---|
| max's laptop on cafe phinista (Boston, MA) | o.commoninternet.net | 29.783 ms average\n--- o.commoninternet.net ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4001ms |
| rtt min/avg/max/mdev = 26.601/29.783/34.953/2.823 ms | ||
| max's laptop | meag (100.95.98.39) | 5 packets transmitted, 5 received, 0% packet loss, time 4005msrtt min/avg/max/mdev = 48.364/116.279/335.396/110.665 ms |
| max's laptop | miriam (100.91.247.20) | 5 packets transmitted, 5 received, 0% packet loss, time 4005msrtt min/avg/max/mdev = 45.328/75.591/178.971/51.789 ms |
| max's laptop | ontology.rodeo (100.84.204.3) | --- 100.84.204.3 ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4007msrtt min/avg/max/mdev = 29.296/52.519/89.735/25.449 ms |
| class server (newport, RI) | o.commoninternet.net | --- o.commoninternet.net ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4081msrtt min/avg/max/mdev = 0.036/0.062/0.085/0.021 ms |
| class server (newport, RI) | meag (100.95.98.39) | --- 100.95.98.39 ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4004msrtt min/avg/max/mdev = 53.697/90.123/234.678/72.277 ms |
| class server (newport, RI) | ontology.rodeo (100.84.204.3) | --- 100.84.204.3 ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4007msrtt min/avg/max/mdev = 24.693/31.412/55.160/11.894 ms |
| class server (newport, RI) | miriam (100.91.247.20) | --- 100.91.247.20 ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4005msrtt min/avg/max/mdev = 41.682/68.794/173.710/52.461 ms |
| cookies rp3 (toronto canada) | o.commoninternet.net | --- o.commoninternet.net ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4006msrtt min/avg/max/mdev = 26.483/29.211/35.661/3.350 ms |
| cookies thinkpad (toronto canada) | ontology.rodeo (100.84.204.3) | --- ontology.rodeo ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4007msrtt min/avg/max/mdev = 27.815/30.889/35.442/3.327 ms |
| cookies thinkpad (toronto canada) | mshamsrainey.commoninternet.net | --- mshamsrainey.commoninternet.net ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4009msrtt min/avg/max/mdev = 27.216/31.214/36.985/3.652 ms |
| cookies thinkpad (toronto canada) | hypercyberspider.commoninternet.net | --- hypercyberspider.commoninternet.net ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4005msrtt min/avg/max/mdev = 28.668/31.204/35.557/2.349 ms |
| class server (newport, RI) | beepbeep.commoninternet.net | --- beepbeep.commoninternet.net ping statistics ---5 packets transmitted, 5 received, 0% packet loss, time 4007msrtt min/avg/max/mdev = 10.726/13.447/17.038/2.283 ms |
Here is a table of some of the current tailscale tunnel IP of participants of the class (which can be looked up at https://gateway.commoninternet.net):
| mshamsrainey.commoninternet.net | 100.91.247.20 |
|---|---|
| solitest.commoninternet.net | 100.117.251.31 |
| fsserver.commoninternet.net | 100.65.173.2 |
| cookielink.commoninternet.net | 100.106.146.98 |
| ontology.rodeo | 100.84.204.3 |
| junelikethemonth.commoninternet.net | 100.92.68.68 |
| beck.commoninternet.net | 100.71.179.116 |
| yazz.cool.commoninternet.net | 100.92.48.68 |
| newtest55.commoninternet.net | 100.117.251.31 |
| stayhomo.commoninternet.net | 100.89.193.71 |
| passecables.commoninternet.net | 100.77.109.7 |
| hypercyberspider.commoninternet.net | 100.90.180.10 |
| artforage.commoninternet.net | 100.95.98.39 |
⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘
Test 2. wget
First lets ssh into our server again.
For this second test, lets install a command-line tool for downloading things from the internet.
sudo apt-get install wget
Then lets use wget to download the network-topology pdf (34MB in size) from the class server and see how long it takes:
wget --report-speed=bits https://lm.commoninternet.net/assets/network-topology.pdf
Some part of the output should look like this:
network-topology.pd 100%[===================>] 34.46M 35.9Mb/s in 8.8s
2025-03-11 17:19:59 (32.9 Mb/s) - 'network-topology.pdf' saved [36129034/36129034]
For a second example:
wget --report-speed=bits https://lm.commoninternet.net/assets/luigi.jpeg
Result:
luigi.jpeg 100%[===================>] 114.08K --.-KB/s in 0.1s
2025-03-11 17:19:21 (7.37 Mb/s) - 'luigi.jpeg' saved [116813/116813]
We can then enter the results in the table below:
| Source | URL | Time |
|---|---|---|
| max's laptop at cafe phinista (Boston, MA) | https://lm.commoninternet.net/assets/network-topology.pdf | 8.8s (32.9 MB/s) |
| max's laptop at cafe phinista (Boston, MA) | https://lm.commoninternet.net/assets/luigi.jpeg | 0.1s (7.37 MB/s) |
| cookies rp3 (toronto canada) | https://lm.commoninternet.net/assets/network-topology.pdf | 9.9s (29.3 MB/s) |
| cookies rp3 (toronto canada) | https://lm.commoninternet.net/assets/network-topology.pdf | 0.06s (15.9 MB/s) |
⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘⚘
Test 3. traceroute
First lets install a tool to find the route from your server to the class server.
sudo apt-get install traceroute
Then we can use traceroute to test the route via this command:
traceroute -n o.commoninternet.net
This will output all of the intermediary IP addresses that request passed through on the way to o.commoninternet.net. For the test, we won't record all the stops, but just the number of stops, in the table below.
For some reason when I (max) was testing this out, it wasn't working, but I wasn't sure why.
| Source | Destination | Number Of Stops |
|---|---|---|
| max's laptop (Boston, MA) | o.commoninternet.net | ? |
| cookies rp3 (toronto canada) | o.commoninternet.net | 8 |