Computer Networks Basics·Lesson 4 of 10

Network Components

01

The Building Blocks

A network is more than cables and computers. Between the end devices sit specialized pieces of hardware whose only job is to move data to the right place. Each one does something slightly different, and knowing who does what is essential — interviewers love asking the difference between a hub, a switch, and a router.

🔌Layer 1–2

NIC (Network Interface Card)

The hardware that connects a device to the network and gives it a unique MAC address. Every networked device has one.

📡Layer 1

Repeater

Regenerates a weak signal so it can travel further, extending the physical reach of the network. It doesn't inspect data.

🔗Layer 1

Hub

A basic multi-port repeater. It blindly broadcasts incoming data to every other port, so only one device can talk at a time. Largely obsolete.

🔀Layer 2

Switch

A smarter hub. It learns the MAC address of each device and forwards data only to the intended port, so many devices can talk at once.

🧭Layer 3

Router

Connects different networks together and forwards data between them using IP addresses. Your home router links your LAN to the internet.

📞Layer 1

Modem

Converts digital data to and from the analog signals used by cable, DSL, or fibre lines from your internet provider.

📶Layer 2

Access Point

Lets wireless devices join a wired network by bridging Wi-Fi to the LAN. Often built into home routers.

🚪Layer 3–7

Gateway

A translator between networks that use different protocols. It can operate all the way up the stack, converting data so two dissimilar systems can communicate.

02

Which Layer Does Each Work At?

Networking devices are often described by the layer of the OSI model they operate at. The higher the layer, the more the device understands about the data it's moving. A hub only sees electrical signals; a switch understands MAC addresses; a router understands IP addresses and can decide between whole networks.

Devices by OSI layer

3

Network Layer

Routes between different networks using IP addresses

Router, Gateway
2

Data Link Layer

Moves frames within a network using MAC addresses

Switch, Bridge, NIC, Access Point
1

Physical Layer

Transmits raw bits as signals over the medium

Hub, Repeater, Modem, Cable
03

Hub vs Switch vs Router

These three are the most commonly confused. The quickest way to keep them straight: a hub broadcasts to everyone, a switch delivers to the right device inside one network, and a router connects separate networks together.

HubSwitchRouter
OSI layer1 — Physical2 — Data Link3 — Network
Forwards usingNothing (broadcasts)MAC addressIP address
Traffic handlingTo all portsTo the correct portBetween networks
IntelligenceNoneLearns MACsRouting decisions
Typical useObsoleteConnect devices in a LANConnect a LAN to the internet

Quick memory hook

Hub = dumb, Switch = smart within a network, Router = connects networks. If a question mentions IP addresses or "different networks," the answer is almost always the router.

Quick Revision Cheat Sheet

NIC: Connects a device to the network; holds its MAC address

Hub: Layer 1 — broadcasts to all ports (obsolete)

Switch: Layer 2 — forwards by MAC to the right port

Router: Layer 3 — connects networks using IP

Modem: Converts digital ↔ analog for the ISP line

Gateway: Translates between different protocols