Computer Networks

Network Devices

The box-level view: hubs, switches, routers, firewalls, and where each sits in the stack.

Level: beginner

What is it?

Network devices move, repeat, filter, or translate traffic at different layers. Common examples are repeaters, hubs, bridges, switches, routers, access points, gateways, and firewalls.

Why does it matter?

Knowing a device's role helps locate a fault and predict which addresses, headers, and failure domains matter. Product names overlap because commercial devices combine several functions.

Mental model

Ask what information the device examines and what forwarding state it maintains. A repeater regenerates signals; a switch uses link-layer addresses; a router selects an IP next hop; a firewall applies policy.

How it works

  • Repeaters regenerate physical signals without learning destination addresses.
  • Layer-2 switches/bridges forward frames based on MAC-address tables within a LAN/VLAN.
  • Routers forward IP packets between routed networks using routing tables.
  • Access points connect wireless stations to a wired LAN and manage radio association/security.
  • Firewalls allow or deny flows according to policy; gateways may also translate protocols or addresses.

Steps

  • Identify the traffic path and the device where connectivity stops.
  • Check link/radio state and VLAN/port assignment at the local layer.
  • Inspect MAC learning and ARP/neighbor resolution on the local network.
  • Inspect routes, ACLs/firewall logs, NAT state, and service listeners beyond the local hop.

Real-world usage

  • Building a layered troubleshooting checklist.
  • Explaining hubs versus switches versus routers for interviews.

Common mistakes

  • Assuming a consumer router only routes; many combine switch, firewall, NAT, Wi-Fi AP, and DHCP server.
  • Debugging DNS when the local link has no carrier or VLAN assignment.
  • Assuming one device's product label uniquely identifies every function it provides.

Interview questions

How does a switch differ from a router?

A basic switch forwards frames by layer-2 addressing within VLANs; a router forwards IP packets between networks using routes.

Where does a firewall fit?

It enforces traffic policy at a host or network boundary and may inspect different layers; it is a function, not limited to one device form.

Prerequisites

Related concepts

Continue learning

Browse the full computer science library