Sub topic 2
What a LAG or port channel is
This chapter assumes you know Ethernet switching basics (MAC addresses, VLANs, trunks), why Spanning Tree Protocol exists, and how to move around a switch CLI.
The idea
A link aggregation group (LAG) bundles several physical Ethernet links between two devices into one logical link. Vendors use different names for the same thing:
| Term | Where you see it |
|---|---|
| LAG | IEEE standard and many vendors |
| Port channel | Cisco IOS and NX-OS |
| EtherChannel | Cisco's name for the technology |
| Bond or team | Linux and Windows hosts |
| Trunk | Some vendors, such as HP and Juniper in older documents. Do not confuse it with a VLAN trunk. |
The physical links are called member links. The logical interface they form is the aggregate interface, for example Port-channel1. Above it, the switch treats the bundle as one port with one set of settings.
What changes when links are bundled
Without a bundle, two parallel links between switches create a loop. Spanning tree blocks one of them, so you pay for two links and use one. With a bundle, spanning tree sees a single link. Both members forward traffic, and no loop exists.
The aggregate interface becomes the place where you apply configuration. A trunk allowed list, an access VLAN, or a spanning tree setting on Port-channel1 applies to the whole bundle. Frames, MAC table entries and VLAN membership all refer to the aggregate interface, not to the individual members.
What you gain
- Bandwidth. Two 1 Gbps members give up to 2 Gbps in total across many flows.
- Redundancy. If one member fails, the bundle stays up on the remaining members. Traffic moves over in a short time, and the logical interface does not change state.
- Incremental growth. You can add a member to raise capacity without redesigning addressing or VLANs.
What you do not gain
A LAG does not give a single conversation more speed. The switch assigns each flow to one member, so one TCP connection never exceeds the speed of one member link. A later chapter covers how this assignment works. For now, remember the rule: total capacity grows, per-flow capacity does not.
A bundle also does not create a faster link. Two 1 Gbps members are not one 2 Gbps link. Traffic is spread unevenly if only a few flows exist or if the flows hash to the same member.
A first look at the configuration
On a Cisco IOS style switch, you create the bundle by assigning ports to a channel group. The switch then builds the Port-channel interface automatically.
interface range GigabitEthernet0/1 - 2
switchport mode trunk
channel-group 1 mode activeThe channel-group 1 line ties both ports to Port-channel1. The mode active keyword chooses how the bundle is negotiated, which later chapters cover. Do not worry about the mode yet. The point here is that the bundle is a real interface you can inspect and configure.
Exercise
You connect two switches with two 1 Gbps links bundled into one port channel. A single file transfer between two hosts runs over one TCP connection. What is the most throughput you should expect for that transfer, and why?
Show answer
About 1 Gbps. The switch assigns each flow to one member link, so a single TCP connection uses one 1 Gbps member and cannot use the combined 2 Gbps. The extra capacity helps only when many flows are present.
Exercise
Two parallel links connect two switches without a bundle. What does spanning tree do, and how does bundling change that?
Show answer
Spanning tree sees a loop and blocks one link, so only one carries traffic. With bundling, spanning tree treats the bundle as one logical link, so no loop exists and both members forward traffic.