The path cost of a port channel is the path cost corresponding to the aggregated speed of all member ports of the port channel.
The path cost of a port channel will be recalculated whenever a port becomes Active/In-Active in the channel group.
For setup, refer to Figure Topology for Configuring Dynamic Path Cost. P1 and P2 are aggregated into a port channel interface.
Type the following:
iS5comm# show spanning-tree
Root Id Priority 32768
Address 00:01:02:03:04:01
Cost 0
Port 0 [0]
This bridge is the root
Max age 20 sec 0 cs, forward delay 15 sec 0 cs
Hello Time 2 sec 0 cs
MST00
Spanning tree Protocol Enabled.
MST00 is executing the mstp compatible Multiple Spanning Tree Protocol
Bridge Id Priority 32768
Address 00:02:02:03:04:01
Max age is 20 sec 0 cs, forward delay is 15 sec 0 cs
Hello Time is 2 sec 0 cs
Name Role State Cost Prio Type
---- ---- ----- ---- ---- ------
Gi0/1 Designated Forwarding 20000 128 SharedLan
Gi0/2 Designated Discarding 20000 128 SharedLan
Output before configuring the dynamic path cost on speed change in Switch B
iS5comm# show spanning-tree
Root Id Priority 32768
Address 00:01:02:03:04:01
Cost 200000
Port 1 [Gi0/1]
Max age 20 sec 0 cs, forward delay 15 sec 0 cs
Hello Time 2 sec 0 cs
MST00
Spanning tree Protocol Enabled.
MST00 is executing the mstp compatible Multiple Spanning Tree Protocol
Bridge Id Priority 32768
Address 00:02:02:03:04:01
Max age is 20 sec 0 cs, forward delay is 15 sec 0 cs
Hello Time is 2 sec 0 cs
Name Role State Cost Prio Type
---- ---- ----- ---- ---- ------
Gi0/1 Root Forwarding 20000 128 SharedLan
Gi0/2 Alternate Discarding 20000 128 SharedLan
Type the following:
iS5comm# configure terminal
iS5comm(config)# spanning-tree pathcost dynamic lag-speed
iS5comm(config)# set port-channel enable
iS5comm(config)# interface port-channel 1
iS5comm(config-if)# no shutdown
iS5comm(config-if)# exit
iS5comm(config)# interface gigabitethernet 0/1
iS5comm(config-if)# channel-group 1 mode on
iS5comm(config-if)# exit
iS5comm(config-if)#end
iS5comm# show spanning-tre
Root Id Priority 32768
Address 00:01:02:03:04:01
Cost 99900
Port 25 [po1]
Max age 20 sec 0 cs, forward delay 15 sec 0 cs
Hello Time 2 sec 0 cs
MST00
Spanning tree Protocol Enabled.
MST00 is executing the mstp compatible Multiple Spanning Tree Protocol
Bridge Id Priority 32768
Address 00:02:02:03:04:01
Max age is 20 sec 0 cs, forward delay is 15 sec 0 cs Hello Time is 2 sec 0 cs
Name Role State Cost Prio Type
---- ---- ----- ---- ---- ------
po1 Root Forwarding 200000 128 P2P
Type the following:
iS5comm# configure terminal
iS5comm(config)# interface gigabitethernet 0/2
iS5comm(config-if)# channel-group 1 mode on
iS5comm(config-if)# exit
Type the following:
iS5comm# show spanning-tree
Root Id Priority 32768
Address 00:01:02:03:04:01
Cost 100000
Port 25 [po1]
This bridge is the root
Max age 20 sec 0 cs, forward delay 15 sec 0 cs
Hello Time 2 sec 0 cs
MST00
Spanning tree Protocol Enabled.
MST00 is executing the mstp compatible Multiple Spanning Tree Protocol
Bridge Id Priority 32768
Address 00:01:02:03:04:01
Max age is 20 sec 0 cs, forward delay is 15 sec 0 cs
Hello Time is 2 sec 0 cs
Name Role State Cost Prio Type
---- ---- ----- ---- ---- ------
po1 Designated Forwarding 100000 128 P2P
Type the following:
iS5comm# configure terminal
iS5comm(config)# interface gigabitethernet 0/2
iS5comm(config-if)# no channel-group
iS5comm(config-if)# exit
Type the following:
iS5comm# show spanning-tree
Root Id Priority 32768
Address 00:01:02:03:04:01
Cost 100000
Port 25 [po1]
This bridge is the root
Max age 20 sec 0 cs, forward delay 15 sec 0 cs
Hello Time 2 sec 0 cs
MST00
Spanning tree Protocol Enabled.
MST00 is executing the mstp compatible Multiple Spanning Tree Protocol
Bridge Id Priority 32768
Address 00:01:02:03:04:01
Max age is 20 sec 0 cs, forward delay is 15 sec 0 cs
Hello Time is 2 sec 0 cs
Name Role State Cost Prio Type
---- ---- ----- ---- ---- ------
Gi0/2 Alternate Discarding 20000 128 SharedLan
po1 Designated Forwarding 20000 128 P2P
Type the following:
iS5comm(config)# no spanning-tree pathcost dynamic lag-speed