Segments, collision domains, and switches
Segments
A segment is a network connection made by a single unbroken cable, and Ethernet cables and segments can only span a limited physical distance. Three or more devices need a dedicated network device between them to communicate.
Hubs and collision domains
Pre-switch, endpoints shared the same media through a hub: a Layer 1 device acting as a simple electric repeater. Everything plugged into a hub is on the same media, meaning one collision domain, and adding devices just made that one domain bigger.
A collision is two or more devices on shared media transmitting at the same time. The consequences: one device transmits at a time while everyone else waits, total bandwidth is shared across all hosts, and collisions force retransmissions later, killing efficiency.
Switches fix this
Switches operate at the link layer and divide the network into segments. Each switch port is one segment, its own collision-free domain.
Fewer devices share the bandwidth per segment; a directly attached PC shares with nobody. A switch and all interconnected switches belong to a single LAN by default.
Causes of network congestion
Switches also help with congestion, which mostly comes from:
- Faster computers: CPUs, buses, and peripherals keep improving, pushing more data at higher rates.
- More traffic overall: remote resources are now needed for even basic work.
- High-bandwidth applications: desktop publishing, engineering design, VoD, e-learning, streaming video.
Switch functions
- Operate at the link layer (TCP/IP).
- Selectively forward individual frames from source port to destination port.
- Many ports, so a large LAN gets divided into many small segments.
- High speed, with support for various port speeds.
- Frame buffering: an incoming frame is buffered until processing finishes and the exit interface is ready. Without buffers, frames would drop during congestion or on saturated links.
The main purpose in one line: forward frames as fast and as efficiently as possible.