We have been using the internet for a while now, around the late 1960s but do we know how it works? I mean yeah sure, we don't need to know how it works to use it and we can't care much about how it works as long as we get our daily doses of memes, but this post is for you if you did want to take a break from browsing those memes and find out how the internet works? in a simple way!
So What happens when you access a website using your device?
The software on your computer creates a message using different software languages like HTTP, TCP/IP, etc.) which requests the web page you clicked. These are called protocols. The message is then broken into packets which are routed through the internet hopping from one router to another.
- Protocols - They are rules on how information passes through the internet. Two of the most important protocols are TCP i.e. Transmission control protocol and IP i.e. Internet Protocol.
- Packets - Data that is sent across the internet is called a message but the whole message is not sent in one go. It is broken into fragments called packets. All these packets are sent independently and a packet size could range from 1000 - 3000 characters. The IP is responsible for deciding how the message is packaged.
- Router - The internet is made up of a network of specialized computers called routers. They are responsible to move packets from the source to the destination. The movement of packets from one router to another is called a hop.
Traceroute command in the picture below shows the number of hops it has taken to access Google from my laptop
So, you might be wondering do packets always arrive in order?
Uhmm nope, they don't. But yet, you never received a message and found yourself unjumbling sentences, so how does that happen? Glad you asked...it happens because even though a later packet may arrive before but the header of a packet contains information about the packet's order in relation to the entire message. The TCP uses this information in the header to rearrange the packets in order.
So, you might wonder what happens if the packet is lost?
Well, the TCP also handles this through retransmission of the lost packet. This is done by having the destination computer send an acknowledgment to the source computer and if the source computer fails to receive an acknowledgment of a particular packet it re-transmits the packet.
So...
now you have a general idea of how the internet works. Take a moment and appreciate the complexity that underlies behind something as simple as a google search.
In the next post, I will try to better explain the layers that are present in the internet model that would help you understand how the independent networks connect to provide the Internet.
If you read till here, Thank you. Much appreciated!
Top comments (0)