0% found this document useful (0 votes)
49 views1 page

Spanning Tree-At-A-Glance: Courtesy of Cisco Enterprise Marketing

Spanning Tree At a glance
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
49 views1 page

Spanning Tree-At-A-Glance: Courtesy of Cisco Enterprise Marketing

Spanning Tree At a glance
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

SPANNING TREEAT-A-GLANCE

Courtesy of Cisco Enterprise Marketing


WHY SHOULD I CARE ABOUT SPANNING TREE?
Designing a redundant network is one of the primary methods of
keeping your network available at all times. Unfortunately, this can
cause loops in a Layer 2 network, which often results in serious
problems including a complete network shut down.
The Spanning-Tree Protocol prevents looping traffic in a redundantly
switched or bridged network by only allowing traffic through a
single path to other parts of the network. Any redundant paths are
blocked until they are needed (typically when the primary link
goes down).
WHAT PROBLEMS NEED TO BE SOLVED?
To maintain the benefits of a redundant network, and simultaneously
prevent the problems associated with loops, the network must
perform the following functions:
1. Recognize that a loop exists
2. Designate one of the redundant links as primary and the other(s)
as backup
3. Switch traffic only through the primary link
4. Check the health of both links at regular intervals

The roles assigned


are root bridge,
root ports, designated
ports, and nondesignated ports.

Broadcast Storms
A broadcast storm refers to the indefinite flooding of frames.
Broadcast storms can quickly shut down a network.
An example of a broadcast storm is shown below.

3. Both switches now receive the frames on


the bottom ports and flood copies to the
top segment.

Original Broadcast

Secondary
Broadcast

Both Switches Flood the Broadcast

4. The switches have no way of knowing that the same frame is


being sent over and over.
Loop 3
Loop 1

Loop 2

In this example, Host Q sends a frame to router Y. Both switches


also receive the frame on Port 0 and associate that port with Host
Q. If the address of
Host
Router
the router is
Q
Y
MAC Table 1
MAC Table 1
unknown, both
Host Q on
Host Q on
switches flood the
Port 0
Port 0
Port 0
Port 0
frame out port 1.
B
MAC Table 2 A
MAC Table 2
Host Q on
The switches now
Port 1
Port 1 Host Q on
Port 1
Port 1
receive the frame on
port 1 and incorrectly associate Host Qs MAC address with that port. This process
repeats indefinitely.

Port Roles
Spanning-Tree works by assigning roles to switches and ports to
ensure only one path through the switched network at any one time.

THE PROBLEM WITH LOOPS


Although redundancy can prevent a single point of failure from
causing the entire switched network to fail, it can also cause
problems such as broadcast storms, multiple copies of frames,
and MAC address table instability.

2. Both switches check the destination and


flood the frame out to the bottom segment.

MAC Address Table Instability


A switchs MAC database will become unstable if it receives the
same frame on different ports.

HOW SPANNING TREE WORKS

5. In the event of a primary link failure, switch traffic to a backup


link

1. A broadcast frame is sent by another


segment, and is received by the top ports
of switches A and B.

Multiple Copies of the Same Frame


Many protocols cannot correctly handle duplicate transmissions. In
particular, protocols that use sequence numbering such as TCP/IP
will assume the sequence has reached its maximum value and has
begun to recycle the sequence. Other protocols will process the
duplicate frame with unpredictable results.

In large switched networks, multiple loops


can exist. In networks such as this, the
number of broadcast frames generated can
grow exponentially in a matter of seconds.
When this happens, the network becomes
overwhelmed and ceases to function.

Segment 1
Designated
Port
Root

Switch Switch

Root
Port
Non-Root

Bridge
Bridge
A
B
There is only one
Designated
Nondesignated
root bridge in any
Port
Port
loop and only one
Segment 2
designated port in
any one segment. On
the root bridge, all ports are
designated. The selection of the root bridge is based on either an
assigned number or on an arbitrary number such as a MAC
address.

ASSESSING THE HEALTH OF LINKS


Switches running the spanning tree exchange information with a
frame called the bridge protocol data unit (BPDU), sent at regular
intervals. This message basically informs the switches that the
active path is still operational.

PORT STATES
When a link goes down, spanning tree will activate a previously
blocked redundant link. To avoid temporary loops while the network
recalculates paths, the switches will avoid sending traffic until the
network converges on the new information. At any given time, all
switch ports will be in one of the states shown in blue below:
LinkUp Listening
20 seconds
(max-age)

Blocking

15 seconds
(fwd-delay)
802.1D
(STP)

State Transition

Learning

15 seconds

Forwarding

Every port must go through this sequence before it can be set to the
forwarding (traffic passing) state. This process can take up to 50
seconds (a very long time for a switch). In situations where it is
critical to have instantaneous failovers, tools are available that
allow the switch port to immediately go from the blocking state to
the forwarding state (see the Rapid Spanning Tree section below).
On the root bridge, all ports are set to the forwarding state. For the
nonroot bridge, only the root port is set to the forwarding state.
Recalculating Paths
When a link fails, the
Designated
Designated Port
network topology must
Port
Root
XPort
BDPU Not Received
change. Connectivity is
Root
Non-Root
X
Bridge
reestablished by placing Bridge Switch
Switch
A
B
critical blocked ports in
Designated Port
the forwarding state.
Nondesignated
Designated
Port
Port
For example, if the
BDPU is not received
after a timer expires, spanning tree will begin recalculating the network. In the example above, switch B is now the root bridge.
RAPID SPANNING TREE
Looking again at the diagram in the Port States section above,
spanning tree can take up to 50 seconds to converge. Emerging
real-time applications such as voice and video, however, cannot
tolerate such a delay. Rapid Spanning Tree Protocol (RSTP) is the
solution to this problem.
RSTP significantly speeds up the recalculation process after a topology
change occurs in the network. RSTP works by designating an
alternate port and a backup port. These ports are allowed to immediately enter the forwarding state rather than passively waiting for
the network to converge. Edge-port and linktype are new
variables defined in RSTP.

Copyright 2004 Cisco Systems, Inc. All rights reserved. Cisco, Cisco IOS, Cisco Systems, and the
Cisco Systems logo are registered trademarks of Cisco Systems, Inc. and/or its affiliates in the United
States and certain other countries. All other trademarks mentioned in this document or Web site are
the property of their respective owners. The use of the word partner does not imply a partnership
He/LW5810 0304
relationship between Cisco and any other company. (0402R)

You might also like