2.6.19 Spanning-tree Command
The Spanning Tree Protocol (STP), defined in the IEEE Standard 802.1D, creates a spanning tree
within a mesh network of connected layer-2 bridges (typically Ethernet switches) and disables the
links which are not part of that tree, leaving a single active path between any two network nodes.
Multiple active paths between network nodes cause a bridge loop. Bridge loops create several
problems. First, the MAC address table used by the switch or bridge can fail, since the same MAC
addresses (and hence the same network hosts) are seen on multiple ports. Second, a broadcast
storm occurs. This is caused by broadcast packets being forwarded in an endless loop between
switches. A broadcast storm can consume all available CPU resources and bandwidth.
Spanning tree allows a network design to include spare (redundant) links to provide automatic
backup paths if an active link fails, without the danger of bridge loops, or the need for manually
enabling/disabling these backup links.
To provide faster spanning tree convergence after a topology change, an evolution of the
Spanning Tree Protocol: Rapid Spanning Tree Protocol (RSTP), introduced by IEEE with
document 802.1w. RSTP is a refinement of STP; therefore, it shares most of its basic operation
characteristics. This essentially creates a cascading effect away from the root bridge where each
designated bridge proposes to its neighbors to determine if it can make a rapid transition. This is
one of the major elements which allow RSTP to achieve faster convergence times than STP.
Switch(config)# spanning-
tree aggregated-port
Enable Spanning Tree Protocl function
on aggregated ports.
Switch(config)# spanning-
tree aggregated-port cost [1-
200000000]
Specify aggregated ports‟ path cost.
Switch(config)# spanning-
tree aggregated-port priority
[0-240]
Specify aggregated ports‟ priority.
Switch(config)# spanning-
tree aggregated-port edge
Enable aggregated ports to shift to
forwarding state when the link is up.
If you know a port is directly connected
to an end device (that doesn't support
RSTP) then set it as an edge port to
ensure maximum performance. This will
tell the switch to immediately start
forwarding traffic on the port and not
bother trying to establish a RSTP
connection. Otherwise, turn it off.
Switch(config)# spanning-
tree aggregated-port p2p
[forced_false | auto]
Set the aggregated ports to non-point to
point ports (forced_false) or allow the
Managed Switch to detect point to point
status automatically (auto). By default,
aggregated ports are set to point to point
ports (forced_true).
Switch(config)# spanning-
tree delay-time [4-30]
Specify the Forward Delay value in
seconds. The allowable value is between
4 and 30 seconds.
Switch(config)# spanning-
tree hello-time [1-10]
Specify the Hello Time value in seconds.
The allowable value is between 4 and 30
seconds.