Computer Networks Basics·Lesson 4 of 10
Network Components
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.
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.
Repeater
Regenerates a weak signal so it can travel further, extending the physical reach of the network. It doesn't inspect data.
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.
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.
Router
Connects different networks together and forwards data between them using IP addresses. Your home router links your LAN to the internet.
Modem
Converts digital data to and from the analog signals used by cable, DSL, or fibre lines from your internet provider.
Access Point
Lets wireless devices join a wired network by bridging Wi-Fi to the LAN. Often built into home routers.
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.
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
Network Layer
Routes between different networks using IP addresses
Data Link Layer
Moves frames within a network using MAC addresses
Physical Layer
Transmits raw bits as signals over the medium
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.
| Hub | Switch | Router | |
|---|---|---|---|
| OSI layer | 1 — Physical | 2 — Data Link | 3 — Network |
| Forwards using | Nothing (broadcasts) | MAC address | IP address |
| Traffic handling | To all ports | To the correct port | Between networks |
| Intelligence | None | Learns MACs | Routing decisions |
| Typical use | Obsolete | Connect devices in a LAN | Connect 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