How does the Internet work?

Sourasish Chakraborty
5 min readJun 23, 2020

--

The Internet is the backbone of the web. The technical infrastructure that makes the web possible. It makes our life faster, smoother, and easier.

What is the Internet?

According to Wikipedia, “The Internet is the global system of interconnected computer networks that uses the Internet protocol suite (TCP/IP) to communicate between networks and devices. It is a network of networks that consists of private, public, academic, business, and government networks of local to global scope, linked by a broad array of electronic, wireless, and optical networking technologies. The Internet carries a vast range of information resources and services, such as the inter-linked hypertext documents and applications of the World Wide Web (WWW), electronic mail, telephony, and file sharing.”(Source: https://en.wikipedia.org/wiki/Internet)

The term Internet means Interconnected Network. In short, It is a large network of computers which are connected all together. Some of these computers are web servers, which are just specialized computers that contain and serve content from your favorite websites, and others are just the client devices we use every day, like our laptops, tablets, and mobile phones.

What is a Web server?

A web server is a software or hardware that uses HTTP(Hypertext transfer protocol) and other protocols to respond to client requests made over the world wide web(WWW).

It’s a computer program that distributes web pages as they are requisitioned. The basic objective of the web server is to store, process, and deliver web pages to the users.

The 5 Web servers leading in the market are:

  1. Apache HTTP Server
  2. Microsoft Internet Information Services
  3. Lighttpd
  4. Nginx Web Server
  5. Sun Java System Web Server

What is the Application Server and Database server?

An Application Server is a server specifically designed to run applications. Whereas, a Database Server provides other computers with service related to accessing and retrieving data from databases.

What is Internet Protocol?

The Internet Protocol (IP) is the method or protocol by which data is sent from one computer to another on the Internet. Basically, it is a set of rules for routing and addressing the packets of data so that they can travel across networks. A Packet is basically a unit of data flowing from an origin to a destination address(from a sender to a receiver)within the internet.

IP information is attached to each packet, and this information helps routers to send packets to the right place. Every device or domain that connects to the Internet is assigned an IP address, and as packets are directed to the IP address attached to them, data arrives where it is needed.

What is an IP address? What are IPv4 & IPv6?

An IP address is a unique identifier assigned to a device or domain that connects to the Internet. Each IP address is a series of characters, such as ‘192.168.1.1’. There are four types of IP address: Public, Private, Static & Dynamic.

There are two standards for IP addresses: IP Version 4 (IPv4) and IP Version 6 (IPv6). All computers with IP addresses have an IPv4 address, and many are starting to use the new IPv6 address system as well.

IPv4 uses 32 binary bits to create a single unique address on the network. An IPv4 address is expressed by four numbers separated by dots. Each number is the decimal (base-10) representation for an eight-digit binary (base-2) number, also called an octet. For example 216.27.61.137

IPv6 uses 128 binary bits to create a single unique address on the network. An IPv6 address is expressed by eight groups of hexadecimal (base-16) numbers separated by colons, as in 2001:cdba:0000:0000:0000:0000:3257:9652

What is DNS Server?

Domain Name Server (DNS) is a standard protocol that helps Internet users discover websites using human-readable addresses. Like a phonebook that lets you look up the name of a person and discover their number, DNS lets you type the address of a website and automatically discover the Internet Protocol (IP) address for that website.

Now, let's take a simple example to see how exactly internet works :

Now that we have a (very) high-level sense of what the internet is, how exactly does it work? This is where our browser comes into play.

Our browser is what we call a “client application” and what this simply means is that its a program that allows us to make requests to different web sites and respond to the data that those web sites send back.

  1. let's say the web server of the website that we want to search has its own IP Address, let's assume 216.27.61.137(IPv4)
  2. When we type our desired website URL into our browser, our browser somehow needs to know that this URL (i.e. uniform resource locator) actually means the IP address 216.27.61.137. So what the browser does is that it contacts the DNS (domain name service) and looks up the IP address for that URL.
  3. Once the IP address is retrieved, our browser attempts to connect to the web server by opening up a socket connection.
  4. Now that our browser and the server have an open connection with each other, our request to a specific article on the Website can be made. But before our request can be sent over the internet, it has to follow a set of rules that describe how the request must be formatted. These sets of rules are known as TCP/IP and the HTTP protocol.
  5. Now the request for the article is chopped up into packets and sent along the highway and roads. Along the way, there are routers (and other similar devices) that basically act as traffic cops and direct the packets to the correct path leading to the IP address.
  6. Once all the packets of data arrive at the web server, the web server will look for the specific article. Once the file has been located, the web server will chop up the response into data packets again, and send them back to our browser.
  7. Finally, when all the data packets arrive back at your browser, our browser will reassemble all packets into the HTML, CSS, JavaScript, and image files that represent the article. And once these files are processed, We will see the actual result on the screen.

In a nutshell, that’s what the Internet is and how it works!

Thanks for reading. Comments/corrections are welcome. Feel free to leave them below.

--

--