Introduction
Hi mate , want to know what Network and Network Devices are ? Let me tell you. Here in this blog we will cover topics :
What is Network and How do we connect to it ?
What is Modem and how it connects to your network ?
What is Router and how it directs traffic ?
Switch vs Hub : How local network actual work ?
What is Firewall and why security lives here ?
What is Load Balancer and why scalable system need it ?
How all these devices work together in real world setup ?
HMMM.. So much to talk about . Dont get overwhelmed , Sit back and grab some popcorn .
Network
Lets learn network from a real life example
Imagine a college classroom.
You , your friends and teacher want to share notes , assignments and work with each other.
Imagine :
Each student = a device
The teacher = a server ( a machine )
The class (Whatsapp , Google classroom ) = the network
Everyone is connected and sharing becomes easy. So ,
A network is simply a way to connect devices so that they can talk to each other and share information .
The ways to connect over a network
There are only two ways that we can connect over a netwrok
Wired
Wireless
Now discuss about the Wired one first
So , in this type of network wires are used such as Ethernet , LAN cables and Fibre Optic cables
Ethernet :- When you connect router to your laptop ethernet cables are used .
LAN Cables :- Office network use this , Where there are lots of devices these cables are used .
Fiber optic :- These are used by your internet service provider to bring high speed internet to your area .
Now discuss about the Wireless one
In this type of network there is no physical cable is used to share data such as Wifi , Mobile Internet and Bluetooth .
Now that we understand what a network is and the ways devices connect to it (wired and wireless) , the next question is
How does this network get internet access ?
This is where the Modem comes in
Modem
A Modem is the device that brings the internet into your home or office
Your network ( phones , laptop , Wifi ) does not access the internet on its own .
π Modem acts as a bridge between your netwrok and your Internet Service Provider (ISP)
How it connects your network to the internet ?
Lets understand how the modem connects to your internet with some example
Imagine your home as a private space
Inside the house there is your laptop and your phone , They can talk with each other via bluetooth and some cables
But they can't talk to the outside world .
The internet lives far away from your home that is managed by your
Internet service Provider (ISP)
The modem is like the main gate of your house .
The ISP send internet through fiber or cable
The modem recieves it at the gate
Modem convert the internet into a form your router understands
The router shares it with yor device
Now you can connect with the outside world π
But once the internet enters our network , how does it reach the right device ?
ISP ---> Modem ---> β ---> Devices
Router
Imagine you are searching something on your device and suddenly this search goes to your mom's or dad's phone . Scary right ?
A router is a device that takes internet from the modem and sends it to the right device .
If modem brings the internet into your home , the router decide where it should go
How a Router Directs traffic
Internet arrives from the modem
The router creates a local network ( Wifi )
Each device get a local address ( IP )
When a device request data , the router :
Sends the request to the internet
Recieves the response
Forwards it to the correct device.
Ever thought how do multiple device communicate without involving the internet
No its not bluetooth
Hub And Switches
Hub
Imagine your classroom with a big loudspeaker
If Your friend wants to say something to you , the speaker will announces it to the entire class
Everyone hears it , even if the message is not for them
π A hub is a networking device that connects multiple computers and forwards data to everyone . Weather it wants or not !!
How it actually works
It recieves data from one device
It does not check who needs the data
It sends data to all device
Switch
Switch is like a post office
When a letter arrives , it checks the address and delivers it to the correct person only
π A switch is a networking device that connects multiple computers and forwards data only to the intended device.
How it actually works
A switch connects multiple devices
It checks the MAC address of the reciever
It send data only to the correct device
Internal traffic is now handled. What about external traffic ?π€
How do we identify what traffic you are dealing with it might be
malicious or safe
Maybe a wall can protect us π
Firewall
Imagine your house has a main door
You dont allow everyone to enter except your friend and family member
π A firewall is like a main door of the device , it checks the incoming traffic and decides what is allowed inside and what should be blocked
Now you are thinking why the security lives at the firewall not in my mouse , keyboard or somewhere else ? π€
Why security lives at the firewall ?
A firewall sits between the internet and your device , so it see all incomming and outgoing traffic.
This makes it the best place to check the data to allow or block it
Safe traffic inside , but who handles the load when users inscrease?
Load Balancer
Imagine a popular restaurant in your city with only one counter
When there are less customer it can handle the crowd easily right ? But when there are too many customers it gets crowded and also service become slow
Now the restaurant opens multiple counter to tackle this problem and now the service become fast and less crowded
π A load balancer distributes incoming traffic across multiple severs so no single server gets overloaded
But why do scalable system need this if your server can handle request π€π€
Why do scalable system need a Load Balancer ?
Before Load Balancer βΉοΈ
When users increase :
Server gets more requests
One server get slow and crashes
After Load Balancer π
When User Increase :
Traffic is split across multiple server
No single server is overloaded
So far , we have looked at each device individually
But how do they work in real life setup ?
All these devices with Real life setup
Workflow
ISP sends internet to your home/office .
β¬οΈ
Modem receives internet from ISP .
β¬οΈ
Router receives data from modem and decide where it should go .
β¬οΈ
Switch connect multiple device ( Used where there are multiple devices eg office )
β¬οΈ
Firewall check whether traffic is safe or not
β¬οΈ
Loadbalancer recieves safe traffic and distributes it across multiple servers
β¬οΈ
Servers process the request and send response back the same path.
Fun Fact :- Every time you open a website , this entire process take only few miliseconds
Thanks for reading ! if enjoyed this blog , you can read more on this π









Top comments (0)