Sub topic 10
How spanning tree sees a port channel
This chapter assumes you know what a Layer 2 loop is, why Spanning Tree Protocol (STP) blocks ports, and how to read basic switch CLI output. You should also have a working LACP bundle like the one from the configuration chapter.
One logical port, one STP decision
STP runs on the logical Port-channel interface, not on each physical member. The bundle has a single port state (forwarding or blocking), a single role (root, designated, or alternate), and a single path cost. The member ports do not run their own STP instances.
This is why aggregation works with STP. Two parallel physical links between two switches would form a loop, and STP would block one of them. Bundled into one port channel, they look like one link, so nothing is blocked and both carry traffic.
Path cost of a bundle
The cost of a port channel is derived from the bandwidth of the logical interface. With the default short path cost method, a 1 Gb/s link costs 4 and a 10 Gb/s link costs 2. On many platforms the cost of the bundle is calculated from the members that are currently active, so it can change when a member fails.
Cost matters when you have more than one path to the root bridge. A bundle of two 1 Gb/s links may have the same cost as a single 1 Gb/s link on some platforms, and a lower cost on others. Check the actual value instead of assuming it.
show spanning-tree interface Port-channel1
show spanning-tree vlan 10If a member failure changes the cost, STP may recalculate and pick a different root port. That is a topology change, even though the bundle itself stayed up.
BPDUs travel on one member
STP sends Bridge Protocol Data Units (BPDUs) on the port channel as a whole. In practice each BPDU is sent on a single member link, chosen by the switch. If the BPDU is lost, the other side may stop hearing from its neighbor even though other members are healthy. This is one reason a consistent bundle configuration matters.
Why mismatched members cause trouble
Member ports must agree on speed, duplex, VLAN or trunk settings, and allowed VLANs. If they disagree, the switch may refuse to bundle a port, or place it in a suspended state. A port that stays outside the bundle but is still physically connected to the same neighbor can create a real loop. STP then has to block it.
Static bundling is the riskiest case. If one side has the channel configured and the other does not, the unconfigured side sees separate links to one neighbor. It may forward frames on each, and traffic can loop or MAC addresses can flap between ports. LACP avoids this because a port joins the bundle only when the partner agrees.
Practical guidance
- Configure STP settings such as PortFast, BPDU guard, and root guard on the Port-channel interface, not on the members.
- Configure the bundle fully before you plug in the second cable, or keep members shut down until both sides match.
- Use
show spanning-treeand look for a Port-channel entry, not individual member entries. - If you see unexpected blocking, compare the cost and the allowed VLAN lists on both ends.
Exercise
Two switches are joined by two 1 Gb/s links. Without a port channel, STP blocks one link. After you create an LACP port channel, how many STP ports does each switch see for these links, and what happens to the blocked state?
Show answer
Each switch sees one STP port, the Port-channel interface. Nothing is blocked because the two physical links are one logical link, so both members carry traffic.
Exercise
Where should you apply BPDU guard or root guard for a bundled uplink, on the member interfaces or the Port-channel interface?
Show answer
On the Port-channel interface, because STP operates on the logical interface.