Brendan Gasparin's Tech Blog

How Does The Internet Work?

The Earth at night, illuminated by a network of lights.

Photo by NASA on Unsplash

In the last thirty years, the Internet has become ubiquitous in our society. We use it for our jobs, study, shopping, entertainment, and communication. But how does the Internet work?

What is the Internet?

The Internet is a global communication network of computers and other devices.

The technology and protocols that make the Internet work were developed by the Defense Advanced Research Projects Agency (DARPA) of the United States Department of Defense in the 1970s with the help of universities and researchers in the United Kingdom and France.

The initial Internet, called ARPANET, was used to share academic and military information across the United States.

In the 1980s, corporate and scientific funding allowed for new networking technologies, and the expansion of the Internet to private organizations.

Tim Berners-Lee invented the technology necessary for the World Wide Web in the early 1990s, paving the way for the popularization of the Internet and its use in homes and private enterprises.

The 1990s saw the rise of home Internet, but what really put it in everyone’s pockets was the increasing prevalence of mobile technology and smart phones in the early 21st Century.

While the Internet was once the domain of nerds, geeks, and scientists, everybody now has access the global network of information.

How Does the Internet Work?

So now the Internet is part of our daily lives. But how does it work?

The Internet is a giant network of interconnected computers, but it is not the only type of computer network. Any time two computing devices are connected, a network is created. This may be done physically (e.g. with Ethernet cables) or wirelessly (e.g. through Wi-Fi or Bluetooth).

We can connect as many computers as we want to a network. Without networking devices, this would require individual connections between each and every device on a network.

Networking devices, like routers, switches, and hubs, can be used to simplify network architecture by accepting multiple (wired or wireless) connections from devices. So instead of individually connecting each computer on a network to every other computer, we simply connect them all to a router, switch, or hub.

The networking device is then responsible for forwarding traffic from source devices to destination devices.

Connecting Networks To Each Other: The Router

Routers are capable of connecting separate networks to each other. So, by connecting networks to routers, and then connecting routers to other routers, we create networks of networks. This interconnectivity is the foundation of the Internet.

Networks require mediums for transmission, e.g. Ethernet cables or wireless signals. A home or office network might be connected using these technologies. But how do we connect all of these individual networks into the network of networks we call the Internet?

Fortunately, at the dawn of the Internet, we already had the necessary infrastructure: homes and businesses all over the world were already connected by a global telephone network.

The digital signals used by computers cannot be carried over conventional telephone wires, which use analogue signals. This necessitates the use of modems. The word modem is short for modulator-demodulator, and they convert data back and forth from digital to analogue signals, allowing transmission of computer data over telephone lines.

Most homes and businesses nowadays have routers that also serve as modems, allowing for communication between devices on the home or business network (the local network), as well as for transmission of data over the Internet.

Communication Protocols: TCP/IP

In order for two devices to communicate, they must first establish protocols for communication. This is similar to communication between humans. In order for two people to communicate, they must find common ground and speak using the same language.

The Internet runs on the TCP/IP protocols, which stand for Transmission Control Protocol and Internet Protocol. The TCP/IP suite also includes the UDP (or User Datagram Protocol).

When data is sent over the Internet, it is divided into small units called packets that can easily be sent over a network and reassembled at the destination.

Transmission Control Protocol allows for the reliable, ordered, error-checked delivery of packets. It is used for purposes that require a stable connection and reliable data delivery, such as web browsing, email, and file transfer. If packets are lost during TCP transmission, then TCP’s error-checking allows for these packets to be resent so no data is lost.

User Datagram Protocol is less reliable than TCP. It simply sends packets (called datagrams) from source to destination without regard for whether those packets are received or lost. UDP is used for purposes where fast, stateless connection are required and the loss of occasional packets is unimportant, such as video streaming.

IP Addresses

IP addresses (or Internet Protocol addresses) are the Internet’s addressing system. When routers receive a packet they check the destination IP address and then forward the packet either to its destination, or to another router on the path to the destination.

Version 4 of IP addresses (IPv4) are sets of four numbers separated by periods (.). Each individual number is called an octet because they are represented by eight bits of data, giving a number from 0 to 255.

There are a limited range of version 4 IP addresses available to the world. Because IP addresses are represented by 32 bit numbers there are only 2^32 available addresses (or 4,294,967,296 addresses).

There are 8 billion people on Earth and just over 4 billion IPv4 addresses. Because of the potential exhaustion of addresses, IPv6 was developed. IPv6 addresses are represented by 128 bits, giving approximately 3.4×10^38 addresses, or 340 undecillion addresses.

Although devices are occasionally assigned IPv6 addresses, it is still more common for them to use IPv4 addresses.

Another method of conserving IP addresses is that certain IP address ranges are assigned to home or business networks. The same IP addresses can then be used in multiple internal networks across the world. The routers connecting these networks to the Internet then have globally unique IP addresses, and the devices on the internal networks communicate with the Internet using these unique router IPs.

The Domain Name System

Of course, humans rarely use IP addresses. Imagine having to remember a four octet number for every website you visit on a daily basis.

Instead, the Internet uses the Domain Name System to translate numerical domain names, like google.com and facebook.com, into numerical IP addresses.

There are special servers located around the world called DNS servers (Domain Name System servers). When you type a web address like google.com into your web browser, your browser checks a local store of domain names (called a DNS cache). If it can’t locate the IP address for a given name then it requests it from a DNS server. It is then able translate your domain name into an IP address (and stores the IP address in the local cache for future use).

Clients and Servers: Requests and Responses

With your domain name translated into an IP address, your computer (the client machine) is able to request a resource from a server. Servers are computers connected to the Internet that run special software that allows them to serve documents and other resources to client machines.

So, for example, when you type google.com into your browser, your computer checks its local DNS cache for a matching IP address. If one is not found, it requests one from a DNS server. Once your computer has the IP address it sends a request to the website’s web server. This request is passed along a chain of routers to the destination. The web server checks what resource you have requested, and then sends a response back along a chain of routers to your client machine, where it is displayed in your browser or other application (e.g. Netflix or an email client).

And that is how the Internet works!

Conclusion

In this article we have examined the workings of the Internet, including:

  • Networks
  • Networking devices (e.g. routers)
  • Communication protocols (TCP/IP)
  • IP addresses
  • The Domain Name System
  • Clients and servers
  • Requests and responses

If you found value in this article, then you can subscribe to my free newsletter and get similar educational tech content sent straight to your email inbox on a weekly basis.

I wish you well on your journey of learning and discovery.

Leave a Comment

Your email address will not be published. Required fields are marked *