CN/Lesson 8 of 8/5 min read
Network Devices and Infrastructure
Hubs, repeaters, bridges, switches, routers, gateways, access points, modems, layer 3 switches, collision and broadcast domains, proxies, firewalls, VPNs, and software-defined networking.
On this page
Devices by layer
| Device | Layer | Forwards based on | Collision domains | Broadcast domains |
|---|---|---|---|---|
| Repeater | 1 | Nothing (regenerates signal) | Does not split | Does not split |
| Hub | 1 | Nothing (repeats to all ports) | One for all ports | One |
| Bridge | 2 | MAC address | One per port | One |
| Switch | 2 | MAC address | One per port | One (per VLAN) |
| Router | 3 | IP address | One per port | One per port |
| Gateway | Up to 7 | Protocol translation | n/a | n/a |
Repeater
A repeater regenerates and amplifies a weakened signal to extend the distance of a cable. Purely layer 1: no understanding of frames.
Hub
A hub is a multiport repeater: a bit arriving on one port is sent out of every other port. All devices share bandwidth and one collision domain, so CSMA/CD is needed and it runs half-duplex. Obsolete, and insecure because every host sees all traffic.
Bridge
A bridge connects two LAN segments and filters traffic by MAC address, splitting collision domains. A switch is essentially a fast multiport bridge.
Switch
A switch forwards frames only to the port where the destination MAC lives (learned from source MACs, see switching).
- Each port is its own collision domain and can run full-duplex.
- Floods broadcasts, unknown unicasts and multicasts to all ports in the VLAN.
- Switching methods: store-and-forward (receive whole frame, check CRC, then forward), cut-through (forward after reading the destination MAC, lowest latency), fragment-free (after the first 64 bytes).
A layer 3 switch also routes between VLANs in hardware, common in enterprise cores.
Managed switch features: VLANs, port security (limit MACs per port), DHCP snooping, dynamic ARP inspection, port mirroring (SPAN) for monitoring, 802.1X port authentication.
Router
A router connects different networks and forwards packets by destination IP using its routing table (see routing). It separates broadcast domains: broadcasts do not cross routers. Home "routers" combine a router, switch, Wi-Fi access point, NAT, DHCP server, DNS forwarder and firewall in one box.
Gateway
A gateway connects networks that use different protocols, translating between them (e.g. VoIP to telephone network, IoT protocols to IP). In everyday usage, "default gateway" just means the router a host uses to leave its subnet.
Access Point
A wireless access point (AP) bridges Wi-Fi clients onto a wired LAN. Wi-Fi standards: 802.11n (Wi-Fi 4), ac (Wi-Fi 5), ax (Wi-Fi 6/6E), be (Wi-Fi 7). Security: WPA2 and WPA3 (WEP and WPA are broken). An SSID is the network name.
Modem
A modem (modulator-demodulator) converts digital data to signals suitable for the ISP's medium (DSL phone line, cable coax, fiber ONT, cellular) and back.
Collision Domain
A collision domain is a network segment where simultaneous transmissions collide. Hubs extend one; every switch or router port creates a new one. Full-duplex switched links have no collisions at all.
Broadcast Domain
A broadcast domain is the set of devices that receive each other's layer 2 broadcasts (ARP, DHCP Discover). Only routers (and VLANs) split broadcast domains. Too large a broadcast domain wastes bandwidth and CPU on every host.
Example: 3 PCs on a hub, the hub on a switch with 2 more PCs, the switch on a router: collision domains = 1 (hub side) + 2 (PC ports) + 1 (router link) = 4; broadcast domains = 1 per router interface.
Proxy Server
A proxy server is an intermediary that makes requests on behalf of others.
Forward Proxy
Sits in front of clients. The server sees the proxy's IP, not the client's.
- Uses: content filtering in companies and schools, caching, anonymity, bypassing geo restrictions, logging outbound traffic.
Reverse proxy
Sits in front of servers. The client thinks it is talking to the origin.
- Uses: load balancing, TLS termination, caching, compression, hiding backend topology, WAF protection. Examples: Nginx, HAProxy, Cloudflare. More in load balancing and proxies.
Firewall and VPN
Firewalls filter traffic based on rules (packet filtering, stateful inspection, application-layer/next-gen). VPNs create encrypted tunnels across untrusted networks (IPsec, WireGuard, SSL VPN). Both are covered in depth in network attacks and defense.
Load balancer and CDN
A load balancer spreads traffic across servers; a CDN caches content at edge locations close to users. See system design.
SDN
Software-Defined Networking separates the control plane (decides how traffic should flow) from the data plane (forwards packets). A central SDN controller programs many switches through an API such as OpenFlow.
- Centralized, programmable network management and automation.
- Used heavily in data centers and cloud providers.
- NFV (Network Function Virtualization) runs firewalls, load balancers and routers as software on commodity servers.
Quick revision
- Hub = L1, floods everything, one collision domain.
- Switch = L2, MAC table, one collision domain per port.
- Router = L3, splits broadcast domains.
- Forward proxy protects clients; reverse proxy protects servers.
- SDN splits control plane (controller) from data plane (switches).