CONNECT WITH US

Next

How the Internet Works

Jason Brooks
Systems Administrator

Throughout my entire life I have had a better time understanding how things worked if I could peek under the cover and watch it in action. I started taking things apart when I was two years old, and began to put them back together when I was five.  I was around nine years old when I began to limit myself to things that were broken.  Mostly.

In our homes, if we wish to draw a bath, we plug the tub and open a water faucet.  However, behind all of that is a network of pipes delivering the water to our house.  At the other end is a sequence of pumps and valves to direct the water to our house.  The most important fact to bear in mind is that if something breaks, we don’t get our bath. And then the trouble starts.
keep calm and call a sysadmin
On the Internet, there are routers and cable pathways that carry information to and from your computer.  Routers are similar to the pumps pushing, and valves altering the flow of water directing the data down different paths.   Clearly if a wire or router breaks, data stops moving: Not unlike a pipe breaking, but you don’t get data packets flooding your crawl space…  In this kind of case,  the first thing I usually hear is “the internet is broken”.  More often than not, the trouble is not the internet connection itself, but that the computer can’t find the server you are looking for.  It is one thing to get a response message that says “Hey, I looked, and the site isn’t there”, as opposed to “Hi, I have no clue.  Call your sysadmin”.

WHEN WE GO TO YOUTUBE.COM, WE START A SERIES OF TASKS THAT DEPENDS ON INTERNET INFRASTRUCTURE.   DON’T WORRY, I WON’T BORE YOU WITH DRY DICTIONARY-ESQUE DEFINITIONS OR PROVIDE A BUNCH OF DISTRACTING LINKS.

I do recommend Wikipedia: they are spot-on with this terminology.  For this blog post we will assume all of the routers and paths work correctly.  The first thing that must happen is the computer must have an address, except it’s been given a name.   Computers use numbers: only humans use names.  When we give our browser a name, it must find an address (number) to go to.  The computer uses the DNS system to find an address.  DNS is like a phone book: look up a name, get a number. This has to happen quickly, or “the internet is slow”.

Each and every device on the internet has a unique address called an IP address.  There are  4,294,967,296 total ip addresses out there, but almost all of them are used.  The new system has 340,282,366,920,938,463,463,374,607,431,768,211,456 ip addresses.  Three points to the person that can pronounce that number.

How about names?  The entire name cannot be more than 256 characters long and is composed of lower case a-z, 0-9, and a hyphen (-).  The total possible combination of names is: 7,788,245,576,201,841,665,227,675,288,295,967,981,049,465,429,882,009,414,779,256,810,415,681,440,755,567,097,824,572 ,647,758,948,426,775,830,935,614,253,233,712,425,657,853,021,528,782,440,251,124,366,980,641,722,860,087,353,676,794, 894,161,860,812,309,412,527,821,135,301,125,846,983,730,848,255,104,628,054,356,352,216,541,705,414,621,779,385,494, 278,526,353,660,159,463,679,796,874,186,619,925,987,472,647,240,147,884,793,299,426,937,163,171,072,378,794,153,676, 219,890,022,799,554,315,418,599,925,723,168,193,819,992,671,717,293, give-or-take.  Can anyone pronounce this number?

So, we enter “www.youtube.com” into our brower.  The computer’s configuration already contains a link to a dns server, so the computer sends its query there.  If the dns server doesn’t know the answer,  it queries the registrar for  the authoritative name server.  When the authoritative name server replies with the ip address, the computer may connect directly with www.youtube.com.  As an added bonus, each dns server that was queried also keeps a copy in its cache to speed things along for the next query.

  1. Where is youtube.com
  2. DNS server checks markmonitor registrar for dns authority server
  3. Markmonitor returns domain server address to ISP
  4. ISP DNS server requests name from youtube DNS authority server
  5. DNS authority server returns IP address for youtube.com
  6. ISP a DNS server returns IP address to client
  7. Client computer makes first connection to youtube.com
  8. YouTube server responds to client computer with data

Once we have the address, our browser can then connect to the youtube server. Oh, but wait: what if there are photos, and other items linked on the page to other sites? For each of those, the entire process must be started over.

The Internet dns system doesn’t really translate well to plumbing: the faucet in my bathtub doesn’t need to know which upstream pump will actually deliver the water.  Instead, I look at the dns system as part of the piping itself: if dns isn’t configured correctly, data doesn’t flow.  Exactly as if a pipe stopped working.

What other kinds of problems might affect our use of the internet?  How about congestion?  Back to the plumbing analogy: the pipe feeding our house can fill a bathtub pretty quickly.  But not while watering the garden, or running the washing machine.  If you are in the shower, and someone flushes a toilet, the water from the shower head becomes a trickle. (In Sit-coms, this is hilarious.)  If your housemate begins a 50 gigabit download while you are playing World of Warcraft online, it’s not long until you need to have their head on a platter.  You can pay to have a larger water pipe run to your house, just like you can to have a larger internet connection.

AFTER 40 SOME-ODD YEARS OF DISASSEMBLY AND REASSEMBLY, I ALWAYS FEEL A SENSE OF WONDER WHEN I FIND SOMETHING WELL-MADE.    DNS OPERATES LIKE WELL-OILED MACHINERY, THERE’S NOT TOO MANY SURPRISES IN IT, AND IT GENERALLY WORKS WELL.  WHEN SOMETHING STOPS, IT’S PRETTY EASY TO FIGURE OUT AND MAKE REPAIRS.

Jason Brooks
Jason Brooks, Systems Administrator at eROI.