
Switch
- Connects multiple devices (PCs, printers, cameras) within the same network
- Operates at OSI Layer 2 (Data Link), using MAC addresses to forward frames
- Maintains a MAC‑address table to send traffic only to the destination port (unlike hubs)
- Ports commonly range from 4 up to 48+ in enterprise models
- Supports VLANs to segment traffic without extra cabling
- Ideal for building the internal “fabric” of a LAN
Router
- Joins two or more separate networks and directs traffic between them
- Operates at OSI Layer 3 (Network), using IP addresses to make forwarding decisions
- Holds a routing table of network prefixes and next‑hop paths
- Performs NAT, DHCP relay, policy‑based routing, and access control
- Often includes WAN interfaces (DSL, fiber, cellular) plus LAN ports
- Essential for Internet connectivity and inter‑VLAN traffic
Key Differences
- Purpose: Switches keep devices talking within one LAN; routers connect different LANs (and the LAN to the Internet).
- Addressing: Switches use MAC addresses; routers use IP addresses.
- Traffic isolation: Switches segment domains at Layer 2 (VLANs); routers segment at Layer 3 with separate subnets.
- Feature set: Switches focus on high‑speed internal packet switching; routers add services like NAT, firewall, QoS, and routing protocols (OSPF, BGP).