Search

What are Spanning Tree Port Cost, Spanning Tree Port Priority and Spanning Tree Path Cost Values

In any switch other than the Root Switch, has to find a Root Port, from its available traunk ports, which is that Switch's Port to reach the Root Bridge (Switch). The Root Port is calculated in every Switch, other than the Root Switch, by using the lowest accumulated Path Cost Value to reach the Root Bridge (Switch).

The Spanning Tree Cost Value is inversely proportional to the associated bandwidth of the path and therefore a path with a low cost value is more preferable than a path with high cost value.

The following table lists the Port Cost value for different bandwidths.

Link Speed Cost Value
10 Gbps 2
1 Gbps 4
100 Mbps 19
10 Mbps 100

Spanning Tree Path Cost

As we can see from the above diagram, Switch 4 has two paths to reach the Root Switch (Switch 1). The accumulated Spanning Tree Path Cost Value via the left path is 23 (19 + 4) and the accumulated Spanning Tree Path Cost Value via the right path is 8 (4 + 4).

There for the best path to reach the Switch 1 (Root Switch) from Switch 4 is via right path (because of lowest cost) and the port in Switch 4 connected to the right path is selected as the Root Port.

Spanning Tree Path Cost value can be defined as the accumulated port costs from a Switch (other than the Root Bridge (Switch)) to reach the Root Switch. When a switch receives a Bridge Protocol Data Unit (BPDU) in its port, it increments the path cost with the cost of the incoming port. Path costs are incremented when a Bridge Protocol Data Unit (BPDU) reaches a port.

Related Tutorials
• What is Broadcast Storm
• What is Layer 2 Switching loop
• What is Spanning Tree Protocol (STP)
• What is Bridge Protocol Data Unit (BPDU) frame
• Bridge Protocol Data Unit (BPDU) Frame Format
• What is a Root Bridge (Switch)
• What is a Root Port
• How Spanning Tree Protocol (STP) select Root Port
• What is a Designated Port
• How Spanning Tree Protocol (STP) select Designated Port
• Difference between Root Port and Designated Port
• Spanning Tree Port States
• Topology Changes in Spanning Tree Protocol (STP)
• Spanning Tree Protocol (STP) Convergence
• What is Spanning Tree Protocol (STP) PortFast
• How to configure and verify Spanning Tree Protocol (STP) PortFast
• How to enable or disable Spanning Tree Protocol (STP)
• What is Rapid Spanning Tree Protocol (RSTP)
• Difference between Spanning Tree Protocol (STP) and Rapid Spanning Tree Protocol (RSTP)
• Per-VLAN Spanning Tree (PVST) and Per-VLAN Spanning Tree Plus (PVST+)