Spare cables
Switch 1 and Switch 2 are joined by four Ethernet cables, each carrying 1 Gbit/s (a billion bits per second). Why four? A single cable caps everything between the switches at 1 Gbit/s, and if it breaks, the two sides are cut off.
Plain parallel cables form a loop, and frames could circle it forever. Spanning tree protocol (STP), which switches run to stop loops, blocks all but one cable. Three cables sit idle, waiting for the first to fail.
Bundling
Instead, both switches run LACP, the Link Aggregation Control Protocol (IEEE 802.1AX). On every cable they swap small messages saying who they are and which bundle the port belongs to. Cables whose answers match can join together.
The four cables now act as one logical link, called a link aggregation group (LAG) or port channel. Spanning tree sees a single link, not a loop, so nothing is blocked. All four carry traffic: 4 Gbit/s in total.
Spreading flows
A frame from PC A arrives. Switch 1 must pick one cable. It mixes header fields (MAC addresses, IP addresses, ports) into a number called a hash, and the hash picks the cable: link 1.
A flow is one conversation, such as one file copy. Different flows have different addresses or ports, so they get different hashes and land on different cables. Flows A, B, C and D use all four cables at once to reach the server.
Every frame of a flow carries the same fields, so it gets the same hash and the same cable. That keeps its frames in order: none can overtake another on a quieter cable and arrive first.
The flip side: one big flow, such as a single large file copy, stays on its one cable. It tops out at 1 Gbit/s, even though the bundle has 4. A LAG speeds up many flows together, not one.
A cable fails
Someone unplugs link 3. Both switches see the link go down and drop it from the bundle within moments. The LAG stays up as one link, now 3 Gbit/s, and spanning tree has nothing to recalculate.
Flow D was using link 3, so the switch now hashes it onto a cable that still works: link 1. Flows A, B and C stay where they were. A frame or two caught on the pulled cable is lost and sent again.
Inside the switches
;; step 1/10 · two-switches · idle Switch 1 ⇄ Switch 2 links 1-4 1000BASE-T, 1 Gbit/s each, full duplex (IEEE 802.3 clause 40) PCs A-D on Switch 1 server 192.168.1.50 on Switch 2
The hash shown (XOR of the IP address and port bytes, 8 buckets) is an example. IEEE 802.1AX leaves the formula to each maker; it only requires that one conversation stays on one link. Each switch hashes the frames it sends, so the reply traffic of a flow may use a different cable from the request traffic.