Network devices are hardware components that connect computers and other devices in a network, enabling communication and data transfer. Each device operates at a specific layer of the OSI model and serves a distinct purpose.
| Device | OSI Layer | Function | Key Characteristic |
|---|---|---|---|
| Hub | Layer 1 (Physical) | Broadcasts data to all connected ports | No intelligence - creates a single collision domain; largely obsolete |
| Switch | Layer 2 (Data Link) | Forwards frames based on MAC address to the correct port only | Each port is its own collision domain; uses MAC address table |
| Router | Layer 3 (Network) | Routes packets between different networks using IP addresses | Connects LANs to WANs; uses routing tables; separates broadcast domains |
| Bridge | Layer 2 (Data Link) | Connects two network segments and filters traffic by MAC address | Reduces collision domains; software-based (slower than switch) |
| Gateway | Layer 7 (Application) | Translates between different network protocols or architectures | Can convert between TCP/IP and other protocols; most complex device |
| Repeater | Layer 1 (Physical) | Amplifies and regenerates signals to extend network range | No filtering; extends cable length; does not reduce collisions |
| Modem | Layer 1-2 | Modulates/demodulates signals for transmission over telephone or cable lines | Converts digital signals to analog (and back); connects to ISP |
| Access Point (AP) | Layer 2 (Data Link) | Provides wireless connectivity to a wired network | Extends LAN wirelessly; uses IEEE 802.11 standards (Wi-Fi) |
| NIC (Network Interface Card) | Layer 1-2 | Connects a computer to a network | Has a unique MAC address; can be wired (Ethernet) or wireless (Wi-Fi) |
| Feature | Hub | Switch | Router |
|---|---|---|---|
| OSI Layer | 1 | 2 | 3 |
| Addressing | None | MAC address | IP address |
| Traffic handling | Broadcasts to all ports | Unicast to specific port | Routes between networks |
| Collision domain | Single (all ports) | Per port | Per interface |
| Broadcast domain | Single | Single (unless VLANs) | Per interface (separates) |
| Speed | Slow (collisions) | Fast | Slower (more processing) |
| Intelligence | None | MAC table | Routing table, NAT, DHCP |
A Layer 3 Switch (multilayer switch) combines the functionality of a switch and a router:
| Feature | Unmanaged Switch | Managed Switch |
|---|---|---|
| Configuration | Plug-and-play, no config needed | Configurable via CLI, web, or SNMP |
| VLANs | Not supported | Supported |
| QoS | Not supported | Supported |
| Monitoring | None | SNMP, port mirroring, logging |
| Cost | Low | Higher |
| Use case | Home, small office | Enterprise, data center |
Laptop -> Wi-Fi access point: wireless link is bridged into the LAN
Access point -> switch: frame is forwarded using the destination MAC table
Switch -> default gateway: remote IP is sent to the router MAC
Router -> WAN: IP forwarding selects the next hop and may apply policy or NAT
Each device makes decisions at a different boundary; calling every device a router hides the failure location.
One switch with four full-duplex hosts: four collision domains, one broadcast domain
Add a router interface and a second LAN: broadcasts stop at the router, creating another broadcast domain
Replace the switch with a hub: attached hosts share one collision domain
Modern switched Ethernet isolates collisions per port, while routing separates broadcast domains.
A switch forwards frames within a local Layer 2 domain using source MAC addresses it learns on ports.
A hub repeats every signal to every port, creating one shared collision domain and exposing all traffic to connected devices. A switch isolates forwarding per port, learns destinations, and supports full-duplex links, VLANs, and management features.
A Layer 3 switch efficiently routes between internal VLANs and can handle campus access or distribution traffic. A router or firewall is still commonly needed for WAN links, internet edge functions, NAT, VPNs, advanced policy, or provider circuits.
Explore 500+ free tutorials across 20+ languages and frameworks.