How Does Internet Works?

How Does Internet Works?

#DAY1, Hey folks! before diving into the technologies, let's first understand how exactly internet works.

*Internet Traveling Across Oceans

internet across ocean image

  • This image depicts how optical fibre cables are connecting one country to another which helps in providing internet access across the globe.

  • These cables are laid down in oceans by big business tycoons, tech firms and other government agencies. Some of the examples are AT&T, google, meta, amazon, etc.

  • A general misconception is that internet we access is coming from satellites, for now, fibre optic cables are the cheapest and fastest means of data transfer.

  • Satellites operate at 22k miles above the earth's surface, so in total, data would travel a mega distance of 44k miles for one connection which makes it slow and costly.

  • But my phone isn't connected to any cable, then? your phone is acting like a radio it sends data in the form of waves to your nearby router or telecom tower which is a part of this huge connection of optic cables laid across oceans.

*How do messages transfer?

This whole process is well described by CS50 course, let me brief it for you all, in my way.

  • So the company we pay for our internet access is called ISP or Internet Service Provider.

  • This ISP is further connected to a device called a gateway (a combination of router and modem).

  • A modem is a box that connects your home network to your internet service provider, or ISP. A router is a box that lets all of your wired and wireless devices use that internet connection at once and allows them to talk to one another directly.

  • ISP has a Dynamic Host Configuration Protocol (DHCP), this DHCP assigns a unique IP address to your device and also connects multiple devices via the internet so this DHCP via a gateway is also responsible for providing different Private IP addresses.

  • This IP address is of two types IPV4 and IPV6. #.#.#.# each # range from (0 -255) making it a 32-bit number that uniquely identifies a network interface on a machine. It means there are a total of 2^32 unique addresses available but with the growth of technology there will be an IP address shortage to prevent that, IPV6 was introduced, 128-bit alphanumeric value which is 2^128, a very large number.

  • But we humans don't memorise any IP address, what we do is memorise words like google.com, amazon.com etc.

  • When we search these words say google.com, DNS comes to play this DNS(Domain name system) is like a big Excel sheet which contains unique words assigned to unique IP addresses.

  • Every ISP has a database of DNS names and their corresponding IP addresses.

  • So whenever we type instagram.com, our ISP looks in these DNS database matches with the correct IP address and gives back the desired result.

So we have understood how ISP, DNS, and DHCP work. Now let's see how does response come back to us.


Let us say we have IP address 1.2.3.4 and we are searching for a cat.jpeg via google and say Google IP address is 5.6.7.8.

  • When Google receives the query, in response rather than sending the whole data, an image in our case, it breaks the data into several PACKETS.

  • Each packet follows its different path via different routers to finally reach the destination.

  • These small PACKETS consist of senders IP address and the receivers IP address, i.e {to 1.2.3.4 from 5.6.7.8} also these packets have labels labelling the number of packets like 1/5, 2/5 etc. because if we lost some of the packets we can recall them automatically via a protocol name as TCP.

  • TCP or transmission control protocol ensures that all packets are received and arranged in the correct sequence.

  • And the whole process of transfer of data is governed by Internet Protocol or IP.

  • This TCP and IP work in such a harmony that sometimes we refer to it as TCP/IP.

  • To ensure more smooth communication we use some predefined numbers for the type of file. E.g 1.2.3.4:80(HTTP), :443 (HTTPS), :25(email), etc. Also, there are different types of protocols like FTP, STP, SMTP, UDP etc.

  • Sometimes like in video conferencing, we don't need some lost part of the video/audio we can directly ask the person to repeat, so in such cases where we do not need a guaranteed delivery we can go for a protocol such as UDP.

* Also whenever we request anything in internet, request and response doesn't came via fix route, in between there are a large number of routers which route the signal according to the availability, this is called traceroute.


Hope i was able to give a brief description on "How does internet Works?" #day1