Spanning Tree Protocol · · 7 min read

STP and EtherChannel: Spanning Tree Behavior with Port Channels

When you bundle multiple physical links into an EtherChannel, STP treats the entire port-channel as a single logical interface. This article covers STP cost calculation for port-channels, member link failure handling, and the misconfiguration pitfalls that cause spanning tree loops.

Understanding STP and EtherChannel Integration

STP and EtherChannel are foundational technologies in modern switched networks. When configured together, they interact in ways that catch many network engineers off guard. Understanding this interaction is essential for building stable, redundant topologies.

EtherChannel bundles multiple physical links into a single logical interface. STP sees this logical interface, not the individual member links. This design offers two critical advantages: increased bandwidth aggregation and simplified spanning tree calculations. However, it also introduces complexity when member links fail, when channels are misconfigured, or when topology changes occur.

The key principle is simple: STP operates on port-channels as atomic units. A port-channel either participates fully in spanning tree or it doesn't. Individual member links don't have independent STP states. This creates both elegance and potential for misconfiguration.

Lab Topology

        SW1 (Root Bridge)
        ├─ Gi0/0 ──┐
        └─ Gi0/1 ──┤
                   Po1 (Channel)
        SW2 ───────┤
        ├─ Gi0/2 ──┘
        └─ Gi0/3 ── SW3

SW1 is the root with priority 4096
SW2 is backup with priority 8192
SW3 is regular switch with default priority 32768

Configuring EtherChannel on Member Switches

Setting Up Port-Channel on SW1 and SW2

Begin by configuring the physical ports that will form the channel. In production, you'd typically bundle 2–4 links between critical switches. This example uses 2 Gigabit links.

SW1 Configuration:

SW1(config)# interface range Gi0/0-1
SW1(config-if-range)# channel-group 1 mode on
SW1(config-if-range)# exit
SW1(config)# interface Port-channel 1
SW1(config-if)# switchport mode trunk
SW1(config-if)# switchport trunk allowed vlan 10,20,30,99
SW1(config-if)# spanning-tree vlan 10,20,30 priority 4096
SW1(config-if)# exit

SW2 Configuration (Backup):

SW2(config)# interface range Gi0/0-1
SW2(config-if-range)# channel-group 1 mode on
SW2(config-if-range)# exit
SW2(config)# interface Port-channel 1
SW2(config-if)# switchport mode trunk
SW2(config-if)# switchport trunk allowed vlan 10,20,30,99
SW2(config-if)# spanning-tree vlan 10,20,30 priority 8192
SW2(config-if)# exit

Notice: We're using channel-group 1 mode on. This uses static configuration without LACP or PAgP negotiation. In production, prefer LACP (mode active) for better failure detection, but mode on is simpler for this demonstration.

Verification Output

After configuration, verify the port-channel is operational:

SW1# show etherchannel summary
Flags:  D - down        P - bundled in port-channel
        I - stand-alone p - suspended
        H - Hot-standby (LACP only)
        R - Layer3       S - Layer2
        U - in use       N - not in use
        f - failed to allocate aggregator

Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)          -        Gi0/0(P)   Gi0/1(P)

SW1# show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    4096
             Address     0023.47a1.ef80
             This bridge is the root
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec

  Bridge ID  Priority    4096 (priority 4096 sys-id-ext 10)
             Address     0023.47a1.ef80
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role PortPri.Nbr Status      Cost PortCost Vlans
------------------- ---- ----------- ------ ----------- -------- ------
Po1                 Desg P2Se.128    FWD       19000       19000  10,20,30
Gi0/2               Desg P2Se.129    FWD       4           4      10,20,30

SW2# show spanning-tree vlan 10
VLAN0010
  Spanning tree enabled protocol rstp
  Root ID    Priority    4096
             Address     0023.47a1.ef80
             This bridge is the root

  Bridge ID  Priority    8192 (priority 8192 sys-id-ext 10)
             Address     aabb.cc00.2010
             Hello Time  2 sec  Max Age 20 sec  Forward Delay 15 sec
             Aging Time  300 sec

Interface           Role PortPri.Nbr Status      Cost PortCost Vlans
------------------- ---- ----------- ------ ----------- -------- ------
Po1                 Root P2Se.1      FWD       19000       19000  10,20,30

Key observations:

How STP Calculates Port-Channel Cost

STP cost for a port-channel is not the sum of individual port costs. Instead, it depends on the bandwidth of the channel.

Cost Calculation Formula

For 802.1D-1998 (legacy):

For modern Rapid STP:

If you bundle four Gigabit links (4 Gbps):

If you bundle two 10-Gigabit links (20 Gbps):

This is why port-channels are so valuable in redundant topologies: they reduce path cost and improve convergence by offering more preferred paths through the network.

One of the most important aspects of EtherChannel-STP integration is graceful degradation. When a member link fails, the port-channel remains operational.

On SW1, shut down one member of the port-channel:

SW1(config)# interface Gi0/0
SW1(config-if)# shutdown
SW1(config-if)# exit

Check the EtherChannel status:

SW1# show etherchannel summary
Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)          -        Gi0/0(D)   Gi0/1(P)

SW1# show etherchannel 1 detail
Channel group 1 : Port-channel Po1
    Port-channel LACP Link State: Up
    Minimum number of ports to bring up the port-channel: 1

Members in this channel:
Port      Status
------
Gi0/0     Down
Gi0/1     Up

SW1# show spanning-tree vlan 10 | include Po1
Po1                 Desg P2Se.128    FWD       38000       38000  10,20,30

Critical observation: The port-channel stayed active (SU = Stand-alone Up), and the cost increased to 38000 (now operating with a single Gigabit link). STP did not generate a topology change notification because the port-channel itself remained operational.

Bring the link back up:

SW1(config)# interface Gi0/0
SW1(config-if)# no shutdown

The cost returns to 19000 immediately.

If SW1 and SW2 were connected with two independent single-link trunks instead of a port-channel:

SW1 ── Gi0/0 ── SW2
SW1 ── Gi0/1 ── SW2

STP would treat them as separate ports. One would be designated (cost 4), the other would be blocked. When the designated link failed, STP would need to reconverge on the blocked link, causing 30–50 seconds of downtime (in 802.1D) or ~6 seconds (in Rapid PVST+).

With a port-channel, the loss of one member link is invisible to STP. No topology change, no convergence delay. The channel degrades gracefully.

Misconfigured EtherChannel and STP Loop Risks

Misconfigured EtherChannels are a common source of STP loops. Here are the most dangerous scenarios:

Scenario 1: Mismatched Channel Mode on One Switch

SW1 Configuration:

SW1(config)# interface range Gi0/0-1
SW1(config-if-range)# channel-group 1 mode on
SW1(config-if-range)# exit

SW2 Configuration (WRONG):

SW2(config)# interface Gi0/0
SW2(config-if)# channel-group 1 mode active
SW2(config-if)# exit
SW2(config)# interface Gi0/1
SW2(config-if)# no shutdown

Here, SW1 bundles both links, but SW2 only successfully bundles Gi0/0 (due to LACP negotiation mismatch). Gi0/1 on SW2 remains a single link. You now have:

STP sees three separate links across the topology. Gi0/1 on SW2 creates a parallel path without proper load balancing. This can cause MAC address flapping and, in worst case, a spanning tree loop if STP's topology calculation is disrupted.

Fix:

Ensure both switches use the same channel mode:

SW2(config)# interface range Gi0/0-1
SW2(config-if-range)# channel-group 1 mode on
SW2(config-if-range)# exit

Verify:

SW2# show etherchannel summary
Group  Port-channel  Protocol    Ports
------+-------------+-----------+-----------------------------------------------
1      Po1(SU)          -        Gi0/0(P)   Gi0/1(P)

Scenario 2: Port-Channel to Non-Port-Channel Connection

A switch connects two links to another switch, but only bundles them locally:

SW1:
  Gi0/0 ──┐
  Gi0/1 ──├─ Po1 (BUNDLED)
          └─ (to SW2)

SW2:
  Gi0/0 ───── (Trunk, single)
  Gi0/1 ───── (Trunk, single)

STP on SW1 treats Po1 as one logical link. STP on SW2 treats Gi0/0 and Gi0/1 as two separate links. If STP topology changes, the two links can race to carry frames in different directions, causing loops.

Fix:

Bundle both ends:

SW2(config)# interface range Gi0/0-1
SW2(config-if-range)# channel-group 1 mode on
SW2(config-if-range)# exit
SW2(config)# interface Po1
SW2(config-if)# switchport mode trunk

Scenario 3: Incompatible Speed/Duplex on Channel Members

If member links have mismatched speeds, they may not all bundle:

SW1(config)# interface Gi0/0
SW1(config-if)# speed 1000
SW1(config-if)# duplex full
SW1(config-if)# exit
SW1(config)# interface Gi0/1
SW1(config-if)# speed 100
SW1(config-if)# duplex half

The channel-group command may accept both, but only one will remain active in the bundle. The other might go into "suspended" state, creating an extra uncontrolled path. STP will see inconsistent port states and topology.

Fix:

Match all member link configurations:

SW1(config)# interface range Gi0/0-1
SW1(config-if-range)# speed auto
SW1(config-if-range)# duplex auto
SW1(config-if-range)# exit

Monitoring EtherChannel in Production

Regular verification prevents silent failures:

SW1# show etherchannel 1 summary
SW1# show etherchannel 1 detail
SW1# show etherchannel load-balance
SW1# show spanning-tree all
SW1# show interfaces Po1 status

Watch syslog for EtherChannel-related messages:

*Mar 25 10:14:32.456: %EC-5-CANNOT_BUNDLE2: Gi0/2 cannot be bundled with Gi0/3 (speed mismatch).
*Mar 25 10:15:01.123: %SPANNING-TREE-7-PORT_STATE_CHANGE: Port Po1 instance VLAN0010 moved to forwarding state.

Troubleshooting Symptom → Cause → Fix

Symptom: Port-Channel Shows "D" (Down) in EtherChannel Summary

Cause: All member links are down, or a configuration error prevents any members from bundling.

Fix:

  1. Verify member interfaces are not shut down:
    SW1# show interfaces Gi0/0 status
    Port      Name               Status       Vlan
    Gi0/0                        shutdown     routed
    
  2. Bring them up:
    SW1(config)# interface range Gi0/0-1
    SW1(config-if-range)# no shutdown
    
  3. Re-check EtherChannel status.

Symptom: One Interface Stuck in "Suspended" State

Cause: Speed, duplex, or VLAN mismatch between the suspended link and others in the channel.

Fix:

  1. Identify the suspended link:
    SW1# show etherchannel 1 detail
    Members in this channel:
    Port      Status
    ----
    Gi0/0     Suspended
    Gi0/1     Up
    
  2. Check the configuration difference:
    SW1# show interfaces Gi0/0 | include Speed
    Speed : 100Mb/s
    
  3. Match configurations:
    SW1(config)# interface Gi0/0
    SW1(config-if)# speed 1000
    SW1(config-if)# no shutdown
    

Symptom: STP Topology Changes Every Few Seconds (TCN Storm)

Cause: Port-channel members are going up and down due to flapping cables or link-level errors.

Fix:

  1. Check for physical layer issues:
    SW1# show interfaces Po1 | include errors
    Input queue drops: 0, received discards: 0, drops: 0
    Transmit queue drops: 0, total drops: 0
    Errors: 1247, CRC: 1200, Frame: 47, Overrun: 0, Ignored: 0
    
  2. Inspect individual member links:
    SW1# show interfaces Gi0/0 status errors
    Port      Errors
    Gi0/0     CRC: 984, Alignment: 5, Runts: 1
    
  3. Check cable quality; replace if necessary. Enable error logging:
    SW1(config)# logging buffered 1000000 debug
    SW1(config)# logging trap debugging
    

What's Next

In the next article, we'll explore how STP operates across VLAN trunks. You'll learn about per-VLAN spanning tree instances, native VLAN behavior on 802.1Q links, and how BPDU handling differs between VLANs.


Read next

© 2025 Ping Labz. All rights reserved.