Network Fieldwork: ping

This exercise uses a command-line tool to investigate the physical and logical structure of the internet. Use the Terminal app on Mac (Applications → Utilities → Terminal).

If you live off campus, try each command from both on-campus (via VPN or in class) and off-campus. The results will differ, and that difference is itself interesting.

Important: ping can be blocked.

A few hosts in the Q1 list may show 100% packet loss, that's the host (or a firewall in front of it) ignoring ICMP, not a problem with your setup. If a host doesn't respond, note that as a finding rather than assuming something's wrong.

Do not target sensitive infrastructure. Only use educational institutions and media/public outlets.





1. ping: measuring round-trip time

ping sends a small request to a host asking for a response ("are you there?"). It uses ICMP echo request/reply messages. It is commonly used to check if a host is reachable and to measure latency.

% ping www.mit.edu
Hit Control-C to stop. ping will print statistics when you quit.
% ping www.mit.edu
PING www.mit.edu (92.122.15.121): 56 data bytes
64 bytes from 92.122.15.121: icmp_seq=0 ttl=58 time=91.203 ms
64 bytes from 92.122.15.121: icmp_seq=1 ttl=58 time=88.417 ms
64 bytes from 92.122.15.121: icmp_seq=2 ttl=58 time=89.552 ms
^C
--- www.mit.edu ping statistics ---
3 packets transmitted, 3 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 88.417/89.724/91.203/1.146 ms
For the man pages: % man ping


Q1. ping the following hosts. Pay attention to the minimum round-trip times.
oregonstate.edu
www.pdx.edu
www.mit.edu
www.sfc.keio.ac.jp
www.nmmu.ac.za
www.nast.gov.np
cuni.cz
www.uni-heidelberg.de
www.unifiji.ac.fj
www.amazon.com
www.apple.com
What do the differences in minimum round-trip time tell you about where these servers are physically located? Why might a server with a geographically close name have a surprisingly high latency?

Q2. Why is the response time for ping to Apple or Amazon so low, even though their servers must be far from Portland? (Hint: CDN, anycast)

Can you find sites whose response time is counterintuitive: a geographically nearby site that is slower than a geographically distant one, or vice versa?




Additional tools and references: