Professional Documents
Culture Documents
During class please switch off your mobile, pager or other that may interrupt.
Course objectives:
After attending this section, youll be able to:
> describe the need for a spanning tree protocol in a bridged network
> describe how a spanning tree is calculated
> describe the improvements of RSTP compared to STP
Entry level requirements:
You must have a basic knowledge of bridging (Ethernet networks).
Suggested duration:
1 hour
> The current 802.1d Spanning Tree Protocol (STP) standard was designed at a time where
recovering connectivity after an outage within a minute or so was considered adequate
performance. With the advent of Layer 3 (L3) switching in LAN environments, bridging now
competes with routed solutions where protocols such as Open Shortest Path First (OSPF) and
Enhanced Interior Gateway Routing Protocol (EIGRP) are able to provide an alternate path in
less time.
> Rapid Spanning Tree Protocol (RSTP; IEEE 802.1w) can be seen as an evolution of the 802.1d
standard. The 802.1d terminology remains primarily the same, and most parameters have been
left unchanged so users familiar with 802.1d can rapidly configure the new protocol
comfortably. 802.1w is also capable of reverting back to 802.1d in order to interoperate with
legacy bridges (thus dropping the benefits it introduces) on a per-port basis.
P1
P1
P1
P2
P2
1
1
P1
P2
Phys1
Phys2
2
1
P1
Port nbr
P1
P1
P2
> In order to have a more reliable network, redundant paths are needed. But redundant paths in
an Ethernet network cause loops:
Traffic in a loop might circulate indefinitely (theres no hop-limiting parameter (Time to
live or Hop Count) in an Ethernet network!)
In case of broadcast messages causing endless broadcast storms, the impact on the
network might be huge!
> STP can prevent this by blocking connections that might cause loops.
STP calculates a forwarding tree without loops.
If theres a failure in the network, STP will calculate a new spanning tree which will use
certain bridge ports that were blocked in the previous spanning tree.
> Redundant links may be interesting for reliability reasons, but we cannot afford to have loops in
the bridged network. Therefore STP will block certain links in order to have only one way to go
from node A to node B.
ROOT
D
Alternate port
(Blocked)
DESIGNATED
D
Take over
Backup port
(Blocked)
Take over
> Spanning tree works in first instance by selecting a root bridge on the LAN. This particular
bridge is elected through the exchange of BPDU. In fact each bridge receives an identifier
made part from its MAC address and part from an arbitrary given value. (Priority).
> When the root bridge is selected, then each other bridge selects one of its ports with the least
path cost to the root bridge. The least cost path is determined by STP looking at the bandwidth
of the link.
> STP continually monitors the network always looking for failures on switch ports or changes in
the network topology. If a change is noticed, STP can quickly make redundant ports available
and close other ports to ensure the network continues to function
> All ports on the root bridge are known as designated ports and are in what is known as
forwarding state. Forwarding state ports can send and receive traffic.
> All of the other bridges present are known as non-root bridges, they choose a port known as a
root port which sends and receives traffic.
> On non-root bridges only one port can be designated, all others are blocked. Designated ports
forward MAC addresses. Designated ports are selected after the bridge determines the lowest
cost path to get to the root bridge.
> By using this method, the redundant links are closed down. They can be opened again if there
is a change in network topology and the link is needed once more.
Alternate port
(Blocked)
ROOT
A1
C1
B1
B2
Take over
A2
C2
DESIGNATED
C3 Backup port
(Blocked)
Take over
> Propagation delays can occur when protocol information passes through a switched LAN. As a
result, topology changes can take place at different times and at different places in a switched
network. When a Layer 2 interface transitions directly from non-participation in the spanning
tree topology to the forwarding state, it can create temporary data loops. Ports must wait for
new topology information to propagate through the switched LAN before starting to forward
frames. They must allow the frame lifetime to expire for frames that have been forwarded under
the old topology.
> Bridge ports running STP can be in one of four (five) states:
Listening - listens to make sure no loops occur before passing frames, the bridge is
computing the spanning tree protocol to see if this port should be blocked or forwarding
Learning - learns MAC addresses but does not forward frames, transitional state between
listening and learning. The port is still not used but the bridge can already learn addresses
from this port.
Forwarding - sends and receives frames on the port, the port is used to carry user traffic
Blocking - listens but will not forward frames, the port is not used by user traffic
(Disabled virtually non-operational)
> RSTP ports can be in only three different states. See further.
> Spanning-Tree information is shared by exchanging BPDU messages.
The Spanning-Tree Protocol calculation requires that bridges communicate with other bridges
in the network that are running the Spanning-Tree Protocol. Each bridge is responsible for
sending and receiving configuration messages called bridge protocol data units (BPDUs).
BPDUs are exchanged between neighboring bridges at regular intervals (typically 1 to 4
seconds) and contain configuration information that identifies the:
Bridge that is presumed to be the main bridge or root (root identifier)
Distance from the sending bridge to the root bridge (called the root path cost)
Bridge and port identifier of the sending bridge
Age of the information contained in the configuration message
If a bridge fails and stops sending BPDUs, the bridges detect the lack of configuration
messages and initiate a spanning-tree recalculation.
root
0
2
Bridge
(identifier)
11
4
10
4
12
13
9
19
19
LAN
path cost
19
4
19 5
Path cost
100
100
100
8
10Mbps
100
100Mbps
19
1000Mbps
4
10Gbps
2
> In complex networks, you can configure the bridge-id of a certain bridge which you would prefer
to have as root bridge (bridge-id = 0).
Each time a new bridge is added, the spanning tree must be adapted. Maybe the new
bridge will become the root bridge. In order to avoid this, you can select the root bridge
manually by configuring the bridge-id=0.
> How to calculate the path cost?
Faster links have a lower cost (e.g. a 100 Mbps link has a lower cost than a 10 Mbps link).
Always choose the lowest cost.
In case the cost is equal, the bridge-id will be taken into account (same principle as used
to define the root bridge).
IEEE802.1w RSTP
Evolution of 802.1d STP
Most parameters remain the same
Capable of reverting back to 802.1d on a per port basis
Enhancements
Only 3 port states: discarding, learning and forwarding
All bridges send BPDUs periodically i.s.o relaying root-BPDU
Rapid transition to forwarding state which (faster convergence - sometimes
within hundreds of ms)
New topology change mechanisms
10
> In STP only the root bridge will generate BPDU messages. The designated bridges will only
relay them.
The recovery time from failure can take 1 minute (time needed to calculate a new spanning
tree).
> In RSTP all bridges will send BPDU messages every hello time. This will generate more
overhead traffic, but reduce the take-over time!
The recovery time from failure can be less than a second!
> Port States: There are only three port states left in RSTP:
STP
RSTP
Disabled
Discarding
Blocking
Discarding
Listening
Discarding
Learning
Learning
Forwarding
Forwarding
> CPE-modem: no loops possible, so CPE mustnt be able to receive BPDUs. No STP
implemented.
10
www.alcatel-lucent.com
11
11