Devices that connects the world
Lets start with the internet. What the heck is this?
It is nothing but a simple system where there are many devices that are connected together via wires or wireless networks(satellites). So one can ask that “Is my device is also connected to several devices which are there on internet.” So yes if you have plugged the ethernet cable or you are connected to your home’s WIFI, you are connected to many many devices of the world.
It sound little fascinating and yes it is. So this was a simple glimpse of what is internet.
How internet found your device?
Just have a sit on your home’s couch and think the how the heck this internet came to my house. I haven’t opened any doors for it, I haven’t told it to come then how just toggling on the WIFI button on our laptop/mobile gives me access to whole lot of data in the world. This is something very delusional.
So lets start understanding how this internet came to you house→room→laptop. This will clear everything that is needed.
So lets begin with the bottom up approach how internet found our device. So at first I am going to mention all devices that are used or helps this internet to come in our house. We are going to know the workflow along with the definitions and usage of each devices.
The first device that comes in our pyramid is your home’s Router which has several horns depending on your pocket. So If the internet had to “enter” your house, the router is the first device that meets it.
Meeting Router!!
Router is a device that manages the data transfers, connections, traffic and all those technical stuffs but inside your house only. It acts as the intermediatory between our local connections(network) to the outside internet.
It assigns private identifier to each device in our house like phone, laptops, TV, etc. All of them gets a unique number knows as IP Address which looks something like 192.168.0.172. This is IP Address is a private one which is known to your router and your devices only, just like a 19.1868.0.1 → Your phone, 19.1868.0.12→ Your laptop, and so on.
So whenever we want to send or get some data on internet we simply tells router to handle this. To understand this we have to go little bit deep inside the concept.
So whenever we send a request it replaces our local device’s ip address with a public ip address(will be discussed in the later part) and pass the request. For example we are trying to access youtube.com:
Our laptop’s local ip address assigned by router: 192.168.0.172
The public ip address provided by ISP(internet service provider): 45.89.99.0
So the final request which we send from our laptop is received by the router and there our local ip gets replaced with public ip 192.168.0.172 → 45.89.99.0 and the final request becomes 45.89.99.0→youtube.com. This is called Network Address Translation. And the reverse happened when youtibe.com replies with the data there the public ip gets converted to our laptop’s ip. So this is how router routes each device’s requests to outside and internet and then routes the outside internet’s answers to our device.
Modem: Router’s big Brother
Now lets start by understanding the use modem. This device is something that connects the router with the actual ISP. What do you think what the word model means - it actually means Modulator + Demodulator. The actual purpose of using modem lies in the way the data packets are sent through internet.
Actually our ISP providers sends data in different forms like light pulses(via fiber optic cable), electrical signal(via copper wires). But our doesn’t understand these types of signals, it only knows digital signals so to solve the problem modem came into picture. It actually translates the analog signal from ISP to digital one where its name says modulation - analog to digital whereas the demodulation - digital to analog.
So here we can say that our modem is actually connecting us to outside world. There can be different types of modem in order to handle different types of signals depending on ISP.
Nowadays you can find Router + Modem both in the same device. This is nothing but hardware stuff where both the hardware are kept inside a single box.
Once the modem hands data to the ISP, it leaves your home entirely. From here, packets travel through ISP networks, passing from cities, and countries through user sea cables before reaching servers across the world. This is where your home network ends and the real internet begins.
Switch: Younger Sibling of Router
So everything was okay and good till modem hands over everything to ISP and here our home devices has completed its work. But we another guy in our home which we in our normal livelihood don’t use so much.
Have you ever turned your router and saw there some ports where some ports have LAN marking while one port says WAN. So what all these ports mean?
These ports are nothing but is used to take wired internet directly from the router while the WAN port connects the modem to the router. So here the problem arises where it might happen the ports present in the router is not sufficient. So here we use switch in order to increase the number of devices that can connect to the router. Then wait you might think then router is also behaving like a switch but for smaller number of devices. And yes our home routers have a built in switch in order to handle the internal conversation among the devices(no global connections) like playing counter strike within our house, sending files using the cables, and so on.
You might ask if router has the switch then what is the use of separate switch. I have told you that in normal use case in house we don’t use them rather it is used in schools, colleges, gaming cafes where there are many devices but very little ports on the router. It is mainly designed to handle the internal conversation without bothering the actual router that make the internal communication super fast and reliable.
Most importantly the switch forward the data to intended device only. It allocates a MAC address to each connected device, so every request are well transferred to the destination device without any race condition making it super useful for handling many local devices.
Hub: Shouting Sibling
So hub is older device that was used before switch exists. The problem with the hub was that it don’t even know to whom to send the data. Whenever it receives the data from Device A and if 4 devices are connected to it, there it will simply forward the data to every devices connected to it making it a dumb an unreliable option. Every device has to figure out is this data for me if not then ignore.
There are several issue using this device like : Bandwidth cost, data collision, security concerns and slow speed. So in modern world the hubs has became obsolete and switches replaced it.
Firewalls: The Father
It is the bodyguard of whole system that we discussed above. It simply guards everything parts of our network from getting exposed to outer world. In modern router it is kept in the routers and for larger use case it is often present as a separate entity. This can be present in the form of hardware or in the form of software.
Firewalls sees the incoming data packets and and apply rules like Source IP, Destination IP, PORTS and protocols. If you have ever tries deploying any app to virtual machines then you see there we have to configure the firewall settings like SSH, PORTS Config: 22, 443. All this are controlled and implemented by the firewall to maintain the safety of the servers as well as our home internal network.
Load Balancer: The Mother
So after firewall allowed the request to pass it comes to load balancer. It stands in front of the servers between the server and the firewall. As we know there can be many servers depending on the use case. So it might happen many user comes and bombards a particular server resulting in its failure. So for this load balancers are used.
What it actually does?
It receives the request and a check is done which backend is up and healthy and accordingly forward the request to server. It might happened that every servers are healthy then there certain algorithms are used in order distribute the traffic to different servers. Some algorithms includes: Round Robin, IP Hashing and so on.
in this way our servers are not only protected but also is ready to handle the large number of users. So here the whole workflow comes to an end. After this the application layer begins where the code execution takes place.
Wrapping this whole story
After coming to the end of this blog we can say that the whole internet works not because there are many things involves in it but it works because each part has single responsibility.






