1. The Story
Press "Next" to go through it step by step. In each step, one character comes on stage and explains what they are doing.
Prologue: a quick recap
Step 1 of 9
Two Switches, one cable
Between S2 downstairs and S3 in the study, there is one 1 Gbps cable. All the data passing between the two Switches has to squeeze onto this one cable.
Animation text version (all steps)
- Prologue: a quick recap
- Two Switches, one cable · Octo: Between S2 downstairs and S3 in the study, there is one 1 Gbps cable. All the data passing between the two Switches has to squeeze onto this one cable.
- Act 1: Traffic jam
- The whole family is online · Pip: Mac is backing up photos, the desktop is streaming an HD video, the study computer is sending files to Mac... Every Pip is squeezed onto the same cable, and there's a long queue!
- One 1 Gbps cable: every conversation shares the same 1 Gbps
- This cable becomes the bottleneck
- Add another cable? · Octo: Then let's add another cable! But two cables between two Switches make a loop. STP (Spanning Tree Protocol) immediately Blocks the second cable.
- One more cable, but no extra speed
- The second cable is just a spare "sitting on the bench"
- Act 2: Bundle them into one
- Two cables, one logical link · Octo: Let's use Link Aggregation instead: bundle the two cables into one logical link. To STP, it's just one link, not a loop, so both cables can work!
- Po1 = Port-channel 1, the first Link Aggregation group
- Other names: LAG, EtherChannel, Bonding, Teaming
- LACP: confirming we're one group · Octo: S2 and S3 greet each other using LACP (Link Aggregation Control Protocol) and swap LACPDU messages: "Both these cables connect to you. Shall we put them in the same group?" "Sure!"
- LACP keeps watching: if no LACPDU arrives on a cable, that cable is removed from the group
- Cables in a group must have the same speed and settings
- Different conversations, different cables · Pip: Now Octo uses a formula called a Hash to work out which cable each conversation takes: Mac's backup goes on the top cable, the desktop's video goes on the bottom one. Both cables work together, for 2 Gbps in total!
- The Hash is calculated from MAC Addresses, IP Addresses or Port numbers
- One conversation always takes the same cable, so its Frames arrive in order
- One big file, one cable · Pip: Watch out: if Mac is the only one sending a big file, that conversation only takes one of the cables, so the top speed is still 1 Gbps. Link Aggregation helps when "lots of people use it at once".
- Act 3: No fear if one breaks
- The top cable is broken! · Octo: Oh no, the top cable has been yanked out! The Port loses its signal, Octo notices straight away and removes it from the group. All conversations automatically switch to the bottom cable, with no waiting for STP to recalculate.
- Bandwidth drops from 2 Gbps to 1 Gbps, but the connection never goes down
- The switch-over usually finishes within a second
- Summary: faster and more reliable · Octo: Link Aggregation solves two problems at once: normally both cables work together, so it's faster; if one breaks, the other carries on, so it's more reliable. That's the end of Part 1, "Inside One LAN". Next stop: Rue takes us out the front door!
- Bundles several cables into one logical link that STP doesn't Block
- Total bandwidth adds up; one conversation uses only one cable
- LACP negotiates and monitors the member cables
2. Where Is the Problem
Between S2 downstairs and S3 in the study, there is just one 1 Gbps cable. On a normal day that's fine. But when the whole family is online at once:
- Mac is backing up photos to the backup server;
- the desktop is streaming an HD video;
- the study computer is sending files to Mac...
All the data passing between the two Switches has to squeeze onto this one cable and share its 1 Gbps of Bandwidth, which is how much data a link can carry each second. This cable has become the "bottleneck" of the whole network.
Adding another cable looks like the answer. But two cables between the same two Switches form a loop. STP (Spanning Tree Protocol) from the previous story immediately Blocks the second cable. You have one more cable, but no extra speed at all.
3. How the Network Solves It
Imagine a bridge with only one lane, where traffic keeps jamming. Instead of building a "spare bridge" that stays closed most of the time, why not widen the bridge to two lanes and put signs at the entrance that send cars into different lanes?
Link Aggregation bundles two or more cables into one logical link. In STP's eyes, it is just one link, not a loop, so all the cables can work together. The two Switches use LACP (Link Aggregation Control Protocol) to confirm which cables belong to the same group. If one cable breaks, the others keep working.
4. A Closer Look
Many names, one idea
Link Aggregation is standardised by the IEEE (Institute of Electrical and Electronics Engineers). It started as 802.3ad and today it is 802.1AX. Different equipment and documents use different names:
| Name | Commonly seen in |
|---|---|
| Link Aggregation, LAG (Link Aggregation Group) | Standards and everyday talk |
| Port-channel, EtherChannel | Enterprise Switch configuration |
| Bonding, Teaming | Server and computer operating systems |
"Po1" in the animation means Port-channel 1, the first Link Aggregation group on the Switch.
LACP: confirm first, then bundle
The two Switches send each other LACPDU messages that say roughly: "This is who I am, and this cable belongs to this group of mine." Only when both sides confirm that every cable connects to the same partner, with matching settings, do they put the cables into one group.
This helps avoid wiring mistakes. For example, if someone accidentally plugs one of the cables into a different Switch, LACP notices that "the partner is different" and leaves that cable out of the group.
The cables in a group have to meet a few conditions:
- the same speed (for example, all 1 Gbps);
- the same settings, such as VLAN (Virtual LAN) and Trunk;
- both ends connected to the same pair of Switches (in the usual case).
Besides LACP, you can also bundle cables "statically", without swapping LACPDUs. But then the Switch won't notice a wiring mistake, so LACP is generally recommended.
Hash: who takes which cable?
A Switch does not take turns sending one conversation's Frames down the two cables. The two cables may have different queues, so the Frames could arrive out of order.
Instead, the Switch uses a Hash formula. It does a quick "calculation" on some information in each Frame to get a number, and that number decides which member cable the Frame takes:
Example formula: look at the last digit of the sender's MAC Address; odd goes on the top cable, even goes on the bottom
Mac …:01 → Backup server 01 is odd → top
Backup server …:08 → Desktop 08 is even → bottom
Desktop …:04 → Study computer 04 is even → bottom
Study computer …:07 → Mac 07 is odd → top
These are exactly the cables used by the four conversations in the animation. Real formulas are much more complex and usually use both the sender and the recipient. This one is just an illustration.
A Hash can be calculated from MAC Addresses, IP Addresses or Port numbers. The data in one conversation always gives the same result, so it always takes the same cable, and the Frames arrive in order.
How fast is it?
| Situation | Two 1 Gbps cables as one Link Aggregation |
|---|---|
| Lots of conversations at the same time | Up to nearly 2 Gbps in total |
| Only one conversation (for example, sending one big file) | Up to 1 Gbps |
| One of the cables breaks | Up to 1 Gbps, but the connection stays up |
If there are too few conversations, or the Hash happens to put several big conversations on the same cable, the two cables will be used unevenly.
What happens when one cable breaks?
- If a cable is yanked out, the Port loses its signal. The Switch usually notices within a second and removes it from the group.
- If the Port's light is still on but the link actually has a problem, LACP spots it through LACPDUs: if no LACPDU arrives from the other side for a while, that cable is removed from the group.
All conversations automatically move to the remaining cables. The group itself still exists, and STP still sees the same single link, so nothing needs to be recalculated.
5. Try It Yourself
Task: Work out the bandwidth
A small company connects two Switches with 4 cables of 1 Gbps each, bundled into one Link Aggregation.
- If 50 colleagues are online at once, what is the maximum total bandwidth between the two Switches? (Answer: nearly 4 Gbps.)
- If only one colleague is sending a huge video file, how fast can it go at most? (Answer: 1 Gbps.)
- If 1 of the cables fails, what does the total bandwidth become? (Answer: 3 Gbps, and the connection stays up.)
- If you didn't use Link Aggregation and simply connected 4 cables, what would STP do? (Hint: how many cables would be left working?)
Mini game
Link Aggregation or STP?
Is each sentence below about Link Aggregation or STP?
-
1Several cables send at the same time, and their bandwidth adds up
-
2Temporarily Blocks a Port that would cause a loop
-
3Uses LACPDUs to confirm the member cables
-
4Uses BPDUs to elect the Root Bridge
-
5One big file only travels on one of the member cables
-
6The traditional version takes about 30 to 50 seconds before the spare cable steps in
All sorted correctly! STP lets the spare cable rest most of the time. Link Aggregation lets several cables work together and switches over automatically when one of them breaks.
6. Where the Analogy Breaks
- Two cables don't become one "thick cable". Each conversation still uses only one member cable, so the top speed for one big file doesn't double.
- The split isn't always even. The Hash just follows a formula. It doesn't check which cable is less busy, so sometimes one cable is very busy while the other is almost empty.
- Link Aggregation doesn't replace STP. It only turns several cables into one logical link. If there are other loops in the network, STP is still needed to handle them.
- Usually it only works between one pair of Switches. In the animation, both cables connect S2 and S3. Some advanced Switches let two Switches work together and act as "one" for the same Link Aggregation group, so even a whole Switch failing is no problem, but this needs special features.
- Failover isn't "instant". It is usually very fast, but a few Frames that were in transit during the switch-over may be lost. A higher layer, such as TCP (Transmission Control Protocol), has to resend them.
7. Quiz
8. Key Notes
- Simply adding another cable between two Switches creates a loop. STP Blocks it, so the speed doesn't go up.
- Link Aggregation bundles several cables into one logical link. STP doesn't Block it, and all the members work together.
- LACP (Link Aggregation Control Protocol) uses LACPDUs to confirm which cables belong to the same group, and keeps monitoring them.
- A Switch uses a Hash to decide which cable each conversation takes: the total bandwidth adds up, but one conversation can only go as fast as one cable.
- If one cable breaks, the others keep working. The bandwidth drops, but the connection stays up.
Further reading
That's the end of Part 1, "Inside One LAN"! With Octo, we've learned about Switches, ARP, VLANs, Trunks, STP and Link Aggregation. But when Pip needs to go somewhere outside the home LAN, Octo can't deliver him. In the next story, it's Rue's turn to shine: "Out the Front Door: Router and Default Gateway".