Understanding Network Devices
What is a Modem and how it connects your network to the internet.
Modem is a network device that connects your home or office network to the ISP(Internet Service Provider).
A modem converts digital data from your computer into signals that can travel over cables, fiber, or air.
A modem converts incoming signals back into digital data that computers understand.
Digital data means 0s and 1s(binary data), like 101011.
Text, Images, Videos, sound converts into digital data.
How a Modem Works .
Your device creates digital data.
Request forgoogle.com
010111 (Binary data)Data reaches the modem, modem receives this digital data.
Modem converts digital data into signals
It converts digital data into:
Electrical signals (Cable)
Light signals(Fiber)
Radio signals(Mobile networks)Signals travel to ISP (Internet service provider)
These signals go through the ISP’s network to the internet.Response comes back
The modem receives incoming signals and converts them back into the digital data.
Data reaches your device
You device can now read and display the website
What is a router
A router is a network device that connects multiple devices together and directs data to the correct destination.
Devices → Router → Modem → ISP → Internet
How a router directs traffic
Devices send data to the router
Router checks IP addresses
Every data packet has:
Source IP(who sent it)
Destination IP(where it should go)
The Router reads the destination IP address.Router uses a routing table
The router has a routing table that tells:
where to send data next
whether it should go to: If Another device in the same network / The modem (internet)Router forwards the packet
Based on the routing table, the router:
sends local traffic inside the network.
sends internet traffic to the modem.
This happens in milliseconds.- Example:
you open google.com in your phone
phone sends request to router
router sees destination is outside local network
router sends request to modem
modem send it to ISP and internet
response comes back
router sends response to your phone only
- Example:
What is a Local network
A local Area Network (LAN) is a group of devices connected within a small area , like home, office, school, college.
Devices in LAN can talk to each other, share files, share printers, access the internet together.
Devices are connected using Ethernet cables to a Switch.
Each device has a MAC address (hardware identity), Local IP address.
What is Hub
Hub is a basic device that connects multiple computers in a local network.
If Device A sends data to Device B, every computer gets the data which is connected to hub, hub sends data to all Devices.
Hub security is poor, its speed is slow, rarely used in today’s world.
What is Switch
A Switch is a device inside a LAN and sends data only to the correct device.
Switch is an intelligent device.
If Device A sends data to Device B, only B gets it, not other connected device get it.
Switch speed is fast, security is better as compare to a Hub, mostly used device in LAN connection.
Hub vs Switch key differences
| Feature | Hub | Switch |
| Data delivery | Broadcast to all | To intended device only |
| Intelligence | None | Learn MAC addresses |
| Speed | Slow | Fast |
| Security | Poor | Better |
| Bandwidth use | Wasted | Efficient |
| Usage today | No longer in use | Common everywhere |
What is Firewall and why security lives here.
A firewall is a security device or software that monitors and controls network traffic.
It’s like a security guard between your network and the outside world.
The firewall checks the source IP, destination IP, port number, protocol(TCP/UDP).
Whenever hackers try to access your system firewall blocks them.
Types of firewalls
Network firewall : It protects entire network , it found in routers, offices, data centers.
Host based firewall : It runs on a single device, like Windows firewall, macOS firewall.
What is a Load Balancer and why scalable systems need it.
A load balancer is a system that distrubutes incoming traffic across multiple servers.
Imagine you have one server and 10 users it works fine, 10000 users the server crashes, to fix this problem we add multiple servers, now question how you ditrubutes the users on all servers, that’s where the load balancer comes in.
User → Load Balancer → Server 1, Server 2, Server 3.
Users never talk directly to servers, they talk to load balancer.
Load balancer receives requests and forwards them to servers evenly, this prevents overloading one server.
By distributing requests, servers response time improves and it stay responsive.
Cloud companies give you a managed load balancer.

