How Does the Internet Work

How Does the Internet Work

@chrisbhoffman
February 20, 2018, 6:40am EDT

Everyone’s talking about the internet and whether, or how, it should be regulated. But not enough people know how the internet actually works—or what exactly the internet is.

What Is the Internet, Exactly?

You probably have your own “local area network” at home, and it’s made up of all the devices connected to your router, which connects to the internet. The word “internet” refers to a worldwide system of “interconnected computer networks”.

That’s all the internet really is—a large number of computer networks all over the world, connected together. Of course, there’s a lot of physical hardware—from the cables under your city streets to the massive cables on the ocean floors to satellites in orbit around the planet—that makes this communication possible. There’s also a lot of software at work in the background, allowing you to type in a website address like “google.com” and have your computer to send information to the physical location where that website is located in the fastest way possible.

Even when you’re just connecting to a single website, there’s a lot more going on under the hood. Your computer can’t directly send a piece of information, or “packet” of data, to the computer hosting the website. Instead, it passes a packet to your home router with information about where it’s going and where the web server should reply. Your router then sends it to the routers at your internet service provider (Comcast, Time Warner, or whoever else you use), where it’s sent to another router at another internet service provider, and so on, until it reaches its destination. Any packets sent back to your system from the remote server make the reverse journey.

To use an imperfect analogy, it’s a bit like sending a letter in the mail. Your local postal employee can’t just grab the letter and take it directly across the country or continent to its destination address. Instead, the letter goes to your local post office, where it’s sent to another post office, and then another one, and so on, until it gets to its destination. It takes longer for a letter to get to the other side of the world than the other side of the country because it has to make more stops, and that’s generally true for the internet as well. It will take a bit longer for packets to go longer distances with more transfers, or “hops”, as they’re called.

Unlike with physical mail, sending data packets is still very fast, though, and it happens many times a second. Each packet is very small, and large numbers of packets are sent back and forth when computers communicate—even if one is just loading a website from another one. A packet’s travel time is measured in milliseconds.

Data Can Take Many Paths

This network of networks is a little more interesting and complex than it might seem. With all these networks connected together, there isn’t just a single path data takes. Because networks are connected to multiple other networks, there’s a whole web of connections stretching out around the globe. This means that those packets (small pieces of data sent between devices) can take multiple paths to get where they’re going.

In other words, even if a network between you and a website goes down, there’s usually another path the data can take. The routers along the path use something called the Border Gateway Protocol, or BGP, to communicate information about whether a network is down and the optimal path for data to take.

Creating this interconnected network (or internet) isn’t just as simple as plugging each network into a nearby one, one by one. Networks are connected in many different ways along many different paths, and the software running on these routers (so named because they route traffic along the network) is always working to find the optimal paths for data to take.

You can actually see the path your packets take to a destination address by using the traceroute command, which tells routers along the path the packet travels to report back.

For example, in the screenshot below, we traced the route to howtogeek.com from a Comcast internet connection in Eugene, Oregon. The packets traveled to our router, through Comcast’s network north to Seattle, before being routed onto a Tata Communications (as6453.net) backbone network through Chicago, New York, and Newark before making their way to a Linode data center in Newark, New Jersey where the website is hosted.

We speak of packets “traveling”, but of course, they’re just pieces of data. A router contacts another router and communicates the data in the packet. The next router uses the information on the packet to figure out where it’s going and transmits the data to the next router along its the path. The packet is just a signal on the wire.

Alexander Ross
Author

Alexander Ross

Alexander Ross has covered the video game industry for a decade, writing deep dives on game design, esports tournaments, VR developments, and gaming culture.