Understanding Network Devices
What is a Modem and how it connects your network to the internet?
Modem is used to connect your private network to the internet. It solve the problem of "how signal from ISP becomes usable internet data?".
Modem can be understood as a translator which converts the digital data from your device into analogue signals and vice-versa, so that the data can be transmitted over internet.
The word modem is made from two things Modulator + Demodulator. The conversion from digital to analogue is called Modulation & from analogue to digital is called Demodulation.
What is a Router and how it directs traffic?
A router is a device which directs the traffic between the internal network(mobiles, PC, etc.) and the internet. It solve the problem of, "multiple devices want internet, who gets what?". It manages which packet goes to which device.
It provide Wi-Fi for the devices to connect and assign them private IPs. Once connected devices can send outgoing requests to the internet via router. Multiple devices can send the requests through the router, then it is job of the router to send the responses received to the right device.
Where it sits: Internet -> Modem -> Router -> Devices
Switch vs Hub: how local networks actually work?
Hub is a device which sends data to all the devices connected in local network. It is used to broadcast the data to all the devices.
Switch is device which is used to connect the devices in the local network and send the data between the devices only where it is needed.
Key Difference:
Hub broadcast the data to all the devices in a local network, where as, Switch only sends the data to the specific device.
As the Hub broadcasts data to all, these are referred as "dumb" devices, but Switch transfers the data only where it is intended therefore it is considered as a "smart" device.
Hubs causes high congestion in the network as it broadcasts the data, where as, Switch reduces the congestion by transferring data using only required amount of resources.
Security is compromised in Hub as it broadcasts the data to everyone, but Switch provides security by transferring data to the correct destination.
What is a Firewall and why security lives here?
A firewall is used to monitor and control the network traffic based on the predefined rules. It solve the problem, "who is allowed in and who is not?".
Firewall block any malicious traffic coming to the network.
Firewall can be configured to allow only trusted IPs and ports.
It provides security by protecting the internal network from any threats.
What is a Load Balancer and why scalable systems need it?
A load balancer is used when we have multiple servers and we want to distribute the incoming traffic between these servers. Example: A toll booth: Incoming vehicle goes to the least occupied toll gate.
A load balancer prevents the server overload by distributing the traffic to the multiple servers.
Load balancers improves availability even when a server goes down by directing the coming traffic to running servers.
It helps in horizontal scaling by helping us to add new servers and balancing traffic to them.
How all these devices work together in a real-world setup?
- The following diagram show network devices work together. In the following diagram it is shown how a request is reached to a server from the internet.

- It shows how the data comes to the device from the internet.
