Skip to main content

Command Palette

Search for a command to run...

Network Devices

Published
•5 min read•View as Markdown

What is a Modem and how it connects your network to the internet?

A modem is a device that connects your local network (home/school/office) to the Internet. Think of it as the translator and gateway between your network and your Internet Service Provider (ISP). A modem is a device that converts digital data into signals suitable for ISP transmission and connects a local network to the Internet.

1️⃣ Request from your device

You open a website (e.g., google.com)

2️⃣ Router sends data to the modem

  • Router manages your local network (LAN)

  • It forwards the internet request to the modem

3️⃣ Modem talks to the ISP

  • The modem converts the digital request into:

    • Electrical signals (DSL)

    • Radio-frequency signals (Cable)

    • Light signals (Fiber)

  • Sends them through the ISP line

4️⃣ ISP sends data back

  • ISP servers respond

  • The modem receives the signal and demodulates it into digital data

5️⃣ Data reaches your device

  • Modem → Router → Your device
    ✔️ Webpage loads

    What is a Router and how it directs traffic?

    A router is a networking device that connects multiple devices to a network and directs data (traffic) to the correct destination. It works like a traffic police for data packets.A router is a device that connects networks and directs data packets to their correct destination using IP addresses and routing tables.

    A router connects:

    • Devices inside your local network (LAN)

    • And links that network to other networks (like the Internet)

      How a Router Directs Traffic

      1️⃣ Device sends data

      You open a website or send a message.
      Your device creates data packets with:

      • Source IP (your device)

      • Destination IP (website/server)

⬇️

2️⃣ Router receives the packet

  • Router checks the destination IP address

  • Decides where to send the packet next

⬇️

3️⃣ Routing decision

Router uses:

  • Routing table

  • Routing algorithms / protocols
    to find the best path for the packet

⬇️

4️⃣ Packet is forwarded

  • If destination is inside LAN → sent directly to that device

  • If destination is outside LAN (Internet) → sent to the modem/ISP

Switch vs Hub: how local networks actually work?

Switch vs Hub:-

FeatureHubSwitch
IntelligenceDumbSmart
Data deliveryBroadcast to allSent to specific device
Address usedNoneMAC address
CollisionsYesNo (separate collision domains)
SpeedSlowFast
SecurityPoorBetter
DuplexHalfFull
Used today?❌ No✅ Yes
  1. A local network (LAN) connects devices like computers, printers, and servers within a small area such as a home, school, or office.

  2. Each device in the LAN has a unique MAC address and a private IP address for identification.

  3. All devices are connected to a switch, which is the main device used inside a LAN.

  4. When a device wants to send data to another device in the same LAN, it first finds the destination’s MAC address using ARP (Address Resolution Protocol).

  5. The data is divided into frames and sent to the switch.

  6. The switch checks its MAC address table to identify the correct port of the destination device.

  7. The switch forwards the data only to the destination device, not to all devices, which avoids collisions and saves bandwidth.

  8. If the data is meant for a device outside the LAN, the switch forwards it to the router.

  9. The router uses IP addresses to send the data to external networks through the modem and ISP.

  10. In this way, switches handle communication inside the local network, while routers handle communication with the internet, making LANs fast, secure, and efficient.

What is a Firewall and why security lives here?

A firewall is a security gatekeeper for a computer or network.
It sits between your internal system (trusted) and the outside world like the Internet (untrusted) and decides what is allowed in and what is blocked.

A firewall is a hardware or software security system that monitors and controls incoming and outgoing network traffic based on predefined security rules.

Why Does Security “Live” Here?

1️⃣ First Line of Defense

2️⃣ Controls What Can Enter and Leave

3️⃣ Prevents Common Attacks

4️⃣ Enforces Security Rules

5️⃣ Centralized Security Control

What is a Load Balancer and why scalable systems need it?

A load balancer is a traffic manager for servers.
It sits between users (clients) and multiple servers and distributes incoming requests so that no single server gets overloaded.

A load balancer is a hardware or software component that receives user requests and forwards them to one of several backend servers based on a balancing strategy.

Why Scalable Systems Need a Load Balancer

1️⃣ Prevents Server Overload

Without a load balancer:

  • All users hit one server

  • That server slows down or crashes

2️⃣ Enables Horizontal Scaling

Scalable systems add more servers, not bigger ones.

3️⃣ Improves Reliability & Availability

If one server fails:

  • Load balancer detects failure

  • Automatically sends traffic to healthy servers

4️⃣ Improves Performance

Load balancers:

  • Reduce response time

  • Route users to the least busy or nearest server

  • Keep latency low

5️⃣ Supports High Traffic & Peak Loads

Examples:

  • Sale on an e-commerce site

  • Result declaration website

  • IPL match streaming

    How all these devices work together in a real-world setup?

    1️⃣ User Makes a Request

    A user types www.shop.com in the browser and clicks Enter.

    2️⃣ Firewall: The Security Gate

The firewall is the first device the request meets.

3️⃣ Load Balancer: The Traffic Manager

After passing the firewall, the request reaches the load balancer.

4️⃣ Application Servers: The Workers

5️⃣ Response Goes Back

The response flows back:
Server → Load Balancer → Firewall → Internet → User