Tuesday, August 08, 2006

Internet routing explanation, tracers

With apologies to the Internet Tourbus e-mail newsletter, here's a (lengthy) excerpt from a recent column explaining how internet traffic is routed, with a couple links to allow folks to see how the information they're seeing got to them.

Back in September 1981, Vint Cerf and Robert Kahn wrote that

The internet protocol treats each internet datagram as an
independent entity unrelated to any other internet datagram.
There are no connections or logical circuits (virtual or
otherwise). Source: http://www.ietf.org/rfc/rfc0791.txt

What does this mean in English? Well, in all deference to Alaska
Senator Ted Stevens, the internet is neither like a dump truck nor
like a series of tubes. Rather, the internet is a lot like the United
States Interstate highway system with one major addition: there are
weigh stations at every major junction.

--------------
Interstate 101
--------------

To travel from point A to point B on the United States Interstate
Highway System, you get on the Interstate via an on-ramp and then head
in a certain direction until you reach either a junction or your
destination's off ramp. For example, if we want to get from Irvine,
California [Symbol: Q], to Universal Studios in Hollywood, we'll take
the following route:

I-405 north to
I-605 north to
I-5 north to
US-101 north to
Universal Studios Blvd exit
[See http://tinyurl.com/jfgw3 ]

Now imagine if you had to make that same trip without anyone behind
the wheel. You'd hop on I-405 north, put a brick on the gas pedal,
and hope for the best ... much like the way I drive to work each
morning. [If you are from the California Department of Motor
Vehicles, the California Highway Patrol, or Mercury Insurance, I
assure you that I am KIDDING! Please don't arrest me.] Actually, you
wouldn't have to hope for the best because at each junction on our
pretend Interstate there is a weigh station where each vehicle pulls
over, is inspected, and then is automatically put back on the
Interstate headed in the right direction [or at least in the direction
that has the least amount of traffic.]

So, in reality [or at least in augmented reality], our trip from
Irvine to Hollywood will be a little more like:

I-405 north to the first weigh station at the junction of I-405
and CA-55

The weigh station will inspect our car and then put us back on I-
405 north headed towards the next weigh station at the junction
of I-405 and CA-22

The next weigh station will inspect our car and ... yadda yadda
yadda.

On a really long trip, our car could pass through dozens or even
hundreds of weigh stations before it reached its final destination.
On a cross-country trip, some of these weigh stations may be owned by
California, some by Arizona, some by New Mexico, and so on.

By the way, what are the weigh stations inspecting for? They really
only care to see that your car isn't missing a wheel or two and that
your car knows its final destination. The weigh stations don't care
one bit, though, about what is inside of your car [as long as what's
inside of your car isn't damaged beyond all recognition] or who owns
your car. In the eyes of the weigh stations, Patrick Crispen's car,
Bill Gates' car, and the Popemobile are absolutely identical.

Got it? Now, let's apply this analogy to the internet.

------------
Internet 101
------------

To send an email or a web page or any sort of information from point A
to point B on the internet, you connect to the internet through an
Internet Service Provider [an "on ramp."] The Internet Service
Provider puts the text of your email into an internet packet called a
datagram [a "car"] and pushes the datagram onto the internet [the
"Interstate"] in the correct direction. At the first network junction
your datagram encounters, the datagram is pulled of the internet by a
router [a "weigh station,"] and inspected. The router doesn't care
what your datagram contains or who sent it. It only checks to see
that your datagram isn't broken or improperly addressed. If your
datagram passes inspection, it is placed back on the internet headed
either in the right direction or in the direction that has the least
traffic. At the next router, the process repeats itself. Yadda yadda
yadda.

Your datagram passes through dozens of routers along the way, each
potentially owned by different companies. Eventually, though, your
datagram makes it to its final destination, usually within a few
seconds of your sending it. [Did I mention your "car" was fast?]

You can actually see the whole routing process happen right before
your eyes. Just point your web browser to

http://visualroute.visualware.com/

You have to have Sun's free Java tool to be able to use this, but if
you type in a web address in the Enter Host/URL box and then click on
Start Trace, you'll see the route your datagram[s] takes as it goes
from your computer to the final destination. If you are in the United
States, try a trace to the Vatican at www.vatican.va just for grins.

---------------------
Old School Traceroute
---------------------

By the way, if you don't have Java, you can still run a text-based
traceroute on your PC or Mac [if your firewall will let you.] In
Windows 95, 98, 98 SE or ME,

1. Go to Start > Programs > DOS Prompt
2. Type TRACERT WWW.VATICAN.VA and then press the Enter key on
your keyboard
3. Close the window when you are finished.

In Windows 2000 or XP,

1. Go to Start > Run
2. In the Open: box key in CMD and click the OK button
3. Type TRACERT WWW.VATICAN.VA and then press the Enter key on
your keyboard
4. Behold the magic that is traceroute.
5. Close the window when you are finished.

In MacOS X

1. Open Hard Drive > Applications > Utilities > Terminal. [You
can also use the Network Utility program instead.]
2. Type TRACEROUTE WWW.VATICAN.VA and then press the Enter key on
your keyboard