Command Window / Terminal Prompt
Under Window XP, get up a (black) DOS window via Start -> All Programs -> Accessories -> Command prompt. (If for some reason you can't find it there, you can also select Start -> Run and type cmd in the box.) This is the DOS core of Windows, which was modeled on Unix, and we can run several Unix commands here, including ping.
On a Mac running OS X, you can get a command prompt by selecting Find in the Finder, and then searching for the Terminal application. Note that the DOS -n option becomes -c in Unix/Mac).
Ping exploration
Issue the command
> ping -n 5 sophia.smith.edu(remember to use -c instead on Mac/Unix.) This will send five tiny packets to sophia and back, recording the time in milliseconds (ms=thousandths of a second). [The "-n 5" stands for "count 5," i.e., repeat it ten times.] It should then print summary statistics: the best (min), the worst (max), and the average (avg) round-trip time in ms (milliseconds -- thousandths of a second). Try a number of other host machines around the world (but no need to try them all!); the information in parentheses is not part of the host name. Note any "packet loss." (Warning: There is no guarantee that all of these will respond. Many host names change, and increasingly hosts are denying pings.)
- cs.umass.edu (Amherst)
- cs.harvard.edu (Boston)
- csail.mit.edu (Boston)
- berkeley.edu (U. Calif. Berkeley)
- cs.uchicago.edu (Chicago)
- math.nsc.ru (Moscow?)
- anekdot.ru (Russia, near Moscow)
- www.mars.dti.ne.jp (Japan, Tokyo)
- mpi-sb.mpg.de (Germany)
- hello.it (Italy)
- www.uoa.gr (Greece)
- mousse.ens.fr (France)
- www.univ-paris1.fr (France)
- lanczos.maths.tcd.ie (Ireland)
- libero.it (Italy)
- www.sfi.ie (Ireland)
- ida.liu.se (Sweden)
- alunos.ufv.br (Brazil)
- www.unb.br (Brazil)
- www.unsw.edu.au (Australia)
- math.toronoto.edu (Toronto, Canada)
- mail.iis.sinica.edu.tw (Taiwan)
- rrzmta2.rz.uni-regensburg.de (Germany)
Timing Experiment
If you have time, try out this timing experiment. (This is a version of one of the exercises you will be asked to do on the homework.) Select one responding site (preferably not too close) for a timing experiment. Ping it, record the minimum roundtrip time, and compare against how long it would take the speed of light to reach there. Estimate the distance between here and where you are pinging. (The estimate does not have to be very precise -- see below.)
Light (and all electromagnetic signals) travels at 186,000 miles per second (in a vacuum). So if you divide the round-trip distance (twice the one-way distance) by 186000, you will get the time in seconds. Multiplying by 1,000 gives the time in milliseconds. (Dividing by 186000 and then multiplying by 1000 is the same as dividing by 186, in case you are interested in a shortcut.) Compare the minimum time found by ping to the theoretical minimum time. The theoretical min should be smaller (otherwise your packets went faster than light!).
Example: You ping Berkeley, a 6,000 mile roundtrip (very roughly). The fastest it can be done in this universe is 6,000 mi / 186,000 mi/sec = 0.032 sec = 32 ms (or 6,000 mi / 186 mi/ms = 32 ms).
Tips:
- A calculator should be available on a Windows PC under Start -> All Programs -> Accessories -> Calculator.
- Distances between cities can be found using the Xerox PARC Map Server. Pick a major city in the same country and assume that is close enough. (Or find the distance some other way.)