Rapid Spanning Tree Protocol: Mario Baldi Pietro Nicoletti

Download as pdf or txt
Download as pdf or txt
You are on page 1of 36

Rapid spanning tree protocol

Mario Baldi Pietro Nicoletti


Politecnico di Torino Studio Reti
http://staff.polito.it/mario.baldi http://www.studioreti.it

Based on chapter 4 of:


M. Baldi, P. Nicoletti, Switched LAN, McGraw-Hill, 2002, ISBN 88-386-3426-2
04_RSTP Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
Copyright note
These slides are protected by copyright and international treaties. The title and the
copyrights concerning the slides (inclusive, but non only, every image, photograph,
animation, video, audio, music and text) are the authors (see Page 1) property.
The slides can be copied and used by research institutes, schools and universities
affiliated to the Ministry of Public Instruction and the Ministry of University and
Scientific Research and Technology, for institutional purpose, not for profit. In this case
there is not requested any authorization.
Any other complete or partial use or reproduction (inclusive, but not only, reproduction
on discs, networks and printers) is forbidden without written authorization of the author
in advance.
The information contained in these slides are believed correct at the moment of
publication. They are supplied only for didactic purpose and not to be used for
installation-projects, products, networks etc. However, there might be changes without
notice. The authors are not responsible for the content of the slides.
In any case there can not be declared conformity with the information contained in
these slides.
In any case this note of copyright may never be removed and must be written also in
case of partial use.

04_RSTP - 2 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Rapid Spanning Tree Protocol (RSTP)
 Fast convergence Spanning tree:
 Less than 1 second
 Standard IEEE 802.1w approved in fall 2001
 Interoperable with STP IEEE 802.1D
 Without fast convergence
 Modern solution for mission critical BLAN
 Operate only on point-to-point links
 Direct connections (no hubs)
 Replace proprietary solutions for resiliency with fast
convergence introduced by some vendors

04_RSTP - 3 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Improvements over STP
Improvements introduced for a fast service recovery

Physical connectivity recovery Filtering Data Base recovery

Fast detection of Failure Fast transition Unicast multicast


failures over links propagation of the ports entries entries
to establish to the update update
a new topology forwarding
and port rules state
Detection Detection
based based Root Port Design. Port
on the on the transition transition
physical layer protocol
Removal of Notifications
entries and
related to apppropriate
Topolgy Propagation local changes entries
map and resolution removal
to restore of the new
services topology

Fast update Notification of the Establish alternative


of local entries new requirements paths before
a failure occours

04_RSTP - 4 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Port roles
 Blocking state replaced by Alternate & Backup port rules
 Alternate
 Port that offers an alternate path in the direction of the
Root Bridge to that provided by the Bridge own Root Port.
 Alternate port to be used in case of root port failure
 Backup
 Acts as a backup for the path provided by a Designated
Port in the direction of the leaves of the Spanning Tree.
 Backup Ports exist only where there are two or more
connections from a given Bridge to a given LAN.
 Root
 Designated
 Disabled

04_RSTP - 5 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Alternate port and Backup port
 IEEE 802.1w assumes that there is not a Blocking state
 Ports connected to alternate paths to the root are
selected as Alternate
 Different ports of the same Bridge connected to the
same LAN:
A designated port
The remaining ones are backup ports
 Point-to-point connection between two ports of a Bridge
 Two or more ports of a Bridge connected by a repeater
 The two ports are connected to the same LAN

04_RSTP - 6 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Edge port
 Edge port is a terminating port that connect a end-
station
 Edge port does not work as other port:
 As soon detect a Link Integrity Test go immediately to
Forwarding state without Listening e Learning state
 A port changing state do not cause a TCN BPDU
transmission through root port

04_RSTP - 7 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Port states: similarities between STP and
RSTP

STP port Administrative MAC RSTP port Active RSTP topology


states Port address states (port roles)
states operativity

DISABLED Disabled FALSE Discarding Excluded (Disabled)

DISABLED Enabled FALSE Discarding Excluded (Disabled)

BLOCKING Enabled TRUE Discarding Excluded (Alternate, Backup)

LISTENING Enabled TRUE Discarding Included (Root, Designated)

LEARNING Enabled TRUE Learning Included (Root, Designated)

FORWARDING Enabled TRUE Forwarding Included (Root, Designated)

04_RSTP - 8 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Diagrammatic conventions
Legenda simboli grafici
Graphic symbol

Bridge Identifier Port Identifier & Port Cost

p, c p, c
p, c p, c BRIDGE
BBB
p, c RRR,c p, c
p, c p, c

Root Path Cost


Root Identifier

A LAN

04_RSTP - 9 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Conventional graphic symbols
Port role Port state Legend
Designated Discarding
Learning
Forwarding
edge port Forwarding
Root Port Discarding
Learning
Forwarding
Alternate Discarding

Backup Discarding

Disabled -----

BPDU sent

Designated
Designated Proposal
Root
Root Proposal

04_RSTP - 10 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


The alghoritm principle
 The tree is created in the same way as RTP
 Root bridge election
 Root port definition
 Designated port definition
 The port not selected as root or designated are selected
as:
 Alternate if connected to a port on different bridge
 Backup if connected to a different port of the same bridge

04_RSTP - 11 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Physical redundant star topology
1 A 1
111 222
4 32 B 23 4

C F
D E
1 2 1 2
6 333 3 6 444 3
5 4 5 4

G I H K J M L N

1 2 1 2 1 2 1 2
555 666 777 888
4 3 4 3 4 3 4 3

04_RSTP - 12 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


RSTP active topology
111 1 A 1 222
Root 111,0 111,10
4 32 B 23 4

C F
D E
1 2 1 2
333 3
6 111,10 444 3
6 111,10
5 4 5 4

G I H K J M L N

1 2 1 2 1 2 1 2
555 666 777 888
111,20 111,20 111,20 111,20
4 3 4 3 4 3 4 3

04_RSTP - 13 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


RSTP tree & port state
111 1 A 1 222
Root 111,0 111,10
4 32 B 23 4

C F
D E
1 2 1 2
333 3
6 111,10 444 3
6 111,10
5 4 5 4

G I H K J M L N

1 2 1 2 1 2 1 2
555 666 777 888
111,20 111,20 111,20 111,20
4 3 4 3 4 3 4 3

04_RSTP - 14 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Backup port example
111 1 A 1 222
Root 111,0 111,10
4 32 B 23 4

C F
D E
1 2 1 2
333 3
6 111,10 444 3
6 111,10
5 4 5 4

G I H K J M L N

1 2 1 2 1 2 1 2
555 666 777 888
111,20 111,20 111,20 111,20
4 3 4 3 4 3 4 3

04_RSTP - 15 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Ring topology

A 1 111 222
Root 111,0 B 111,10 C
32 13 2

L D

3 666 1 1
K 333
111,10 111,20 E
2 3 2

J F

1
I 3 555 1 2 H 3 444
111,20 111,30 G
2

04_RSTP - 16 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Fault recovery based on physical level fault
detection
 If the switch looses a root port, the alternate port is
activated immediately: that port becomes a new root
port
 Fault detection and recovery based on physical layer

fault

04_RSTP - 17 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Fault detection and flush entry
 The bridge flushes immediately the entries that have a faulty port
as destination port
 Local flush entries on bridge ports at the end of a faulty link
 Bridges directly connected to a faulty bridge
 If a root port fails, an alternate port becomes root
 A bridge that turns an Alternate Port into a Root Port sends a
Topology Change Notification (TCN) BPDU through the root
port
 On each port in the forwarding state
 When a TCN is received:
 Flush the entries on every ports except the port were the TCN
as been received
 Forward TCN on every ports in forwarding state
 except the port where the TCN has been received

04_RSTP - 18 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Flush entry example: initial configuration
111 222
111,0 111,10
111
111,0

333 444
111,10 111,10
333 444 222
111,10 111,10 111,10

555 666
111,20 111,20
555 666
111,20 111,20

777
111,30
777 Tree
111,30 represantation

04_RSTP - 19 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Flush entries: step 1
 The link 555-777 fails 111 222
111,0 111,10
 both 555 and 777 notice it
 It can be seen that all the Ports
indicated will need to be flushed.
333 444
111,10 111,10

555 666
111,20 111,20

Legend 777
111,30
Addresses learnt on these Ports need to be flushed.
Addresses learnt on these Ports have been flushed.
TCN transmitted in the direction of the arrow
04_RSTP - 20 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
Flush entries: step 2
 555 and 777 flush addresses for 111 222
their faulty Ports. 111,0 111,10

 777 changes the port state from


alternate to root
333 444
 777 sends a TCN message (an 111,10 111,10
RSTP BPDU with TC set).
 The TCN message is just like a
Configuration-BPDU with TC flag 555 666
set to 1 111,20 111,20

Legend 777
111,30
Addresses learnt on these Ports need to be flushed.
Addresses learnt on these Ports have been flushed.
TCN packets sent in the direction of the arrow
04_RSTP - 21 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
Flush entries: step 3
bridge 666 111 222
111,0 111,10
 Receives the TCN message
 Removes the entries related to
1 2
other ports
333 444
 Port 1 and port 2 111,10 111,10
3 4
 Sends the TCN message from
every other port in the forwarding 1 2
state 555
111,20
666
111,20
 Port 1 up to bridge 333 3

Legend 777
111,30
Addresses learnt on these Ports need to be flushed.
Addresses learnt on these Ports have been flushed.
TCN packets sent in the direction of the arrow
04_RSTP - 22 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
Flush entries: fase 4
Bridge 333 1
111 222
111,10
 Receives the TCN message from 111,0
2 3
port 4
 Removes the entries related to 1 2
other ports 333
111,10
444
111,10
4
 Port 1, port 2 and port 3 3

 Sends the TCN message from all


its port in the forwarding state 555 666
111,20 111,20
 Port 1 up to bridge 111
 Port 3 up to bridge 555
Legend 777
111,30
Addresses learnt on these Ports need to be flushed.
Addresses learnt on these Ports have been flushed.
TCN packets sent in the direction of the arrow
04_RSTP - 23 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
Flush entries: step 5
Bridge 111 1 1
111 222
111,10
 Receives the TCN message from 111,0
2 2 3
port 2 3

 Removes the entries related to 1 2

other ports 333


111,10
444
111,10
 Port 1 and port 3 3 4

 Sends the TCN message on the


other ports in the forwarding state 555 666
111,20 111,20
 Port 1 up to bridge 222
 Port 3 up to bridge 444
Legend 777
111,30
Addresses learnt on these Ports need to be flushed.
Addresses learnt on these Ports have been flushed.
TCN packets sent in the direction of the arrow
04_RSTP - 24 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
Flush entries: step 6
bridge 222 and 444 111
1
222
111,0 111,10
 Receive a TCN message from one
2 3
of their ports
 Removes the entries related to 1 2
333 444
other ports (as shown in the 111,10 111,10
figure) 3 4

 TCN messages sent by them reach


only ports in the discarding state 555 666
111,20 111,20
???

Legend 777
111,30
Addresses learnt on these Ports need to be flushed.
Addresses learnt on these Ports have been flushed.
TCN packets sent in the direction of the arrow
04_RSTP - 25 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
Proposal/agreement mechanism
 A bridge B near to the root, as soon as the link falls,
proposes itself as root.
 The other bridges (i.e. bridge C) inform bridge B that
another root is present and bridge B accepts it.

R B

04_RSTP - 26 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


IEEE 802.1w recommended path cost
Port recommended recommended Acceptable
speed value range value

<= 100 Kb/s 200.000.000 20.000.000 - 200.000.000 1 - 200.000.000

1 Mb/s 20.000.000 2.000.000 - 200.000.000 1 - 200.000.000

10 Mb/s 2.000.000 200.000 - 20.000.000 1 - 200.000.000

100 Mb/s 200.000 20.000 - 2.000.000 1 - 200.000.000

1 Gb/s 20.000 2.000 - 200.000 1 - 200.000.000

10 Gb/s 2000 200 - 20.000 1 - 200.000.000

100 Gb/s 200 20 - 2000 1 - 200.000.000

1 Tb/s 20 2 - 200 1 - 200.000.000

10 Tb/s 2 1 -20 1 - 200.000.000


04_RSTP - 27 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
DSAP SSAP Length DSAP SSAP Control
Multicast Singlecast Configuration message
XY 042H 042H XID
01-80-C2-00-00-00 Bridge Address

Byte 12 Protocol Identifier 00-00


00000000 = STP 3 Protocol Ver. Identifier 00
00000010 = RSTP 4 BPDU Type 00
TC Flags TCA
5 P PR PR A
Root Identifier
613 First 2 byte = Bridge Priority
Configuration BPDU last 6 byte = MAC address of the
Root Bridge
STP and RSTP 1417 Root Path Cost
Bridge Identifier
1825 first 2 byte = Bridge Priority
last 6 byte = MAC address of the
Bridge that sent the BPDU
Port Identifier
2627 First byte = Port Priority

Second Byte = port number


2829 Message Age
3031 Max Age
3233 Hello Time
3435 Forward Delay
04_RSTP - 28 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
RSTP and STP compatibility
 RSTP bridges may be configured to operate in STP
mode
 Vital
if there is a repeater between bridges
 The RSTP behavior may lead to instability and to
temporary loops
 RSTP bridges (IEEE 802.1w) work automatically in STP
mode (IEEE 802.1D) when one or more bridges operate
in STP mode
 BPDUs received with the protocol version identifier field
set to 0 are handled in a different way
 Working contemporary in STP mode and RSTP mode may
cause instability in the spanning tree definition
 Possible packets duplication
 Possible receipt of out of sequence packets
04_RSTP - 29 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2
RSTP: fast convergence
 An alternate path may be created in 10 20 ms
 Fast convergence relies upon
 Ability to detect a failure in an reliable way
 Ability to quickly detect a failure
 Recovery based physical layer
 For this purpose the transmission systems used are
relevant
 High stability due to reliable hardware parts
 Intermittent failures may create stability issues
 Transceiverable to locate a local or remote failure over
point-to-point links

04_RSTP - 30 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Ring topology and fast recovery
 Fault on the ring
 Ifthe bridge has an alternate port, its state is changed
immediately from alternate to root state
 Recovery based physical layer
 Ifthe bridge doesnt have an alternate port proposes itself
as Root Bridge
 Recovery based on new protocol handshaking
 Fast BPDU Proposal and Agreement type handshaking
 Sync & Agree operations
 Portsreceiving BPDUs with Designated Proposal flag
execute a Sync operation
 Discard all packet received on non-edge ports
 Portsdiscarding packets (Sync) go immediately in
Forwarding State when receive a BPDU with Designated
Agreement flag

04_RSTP - 31 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Ring topology fault: step 1

1 111 333 1 111 333


111,0 4 B 2 111,10 3 111,0 4 B 2 111,10 3
3 4 3 4

A C fault C

1 2 1 2
222 444 222 444
111,10 3 D 1 111,20 111,10 3 D 1 111,20
3 4 3 4

E F E F

04_RSTP - 32 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Ring topology fault and new Root proposal

1 111 333 1 111 333


111,0 4 B 2 111,10 3 111,0 4 B 2 111,10 3
3 4 3 4

fault C fault C

1 2 1 2
222 444 222 444
222,0 3 D 1 111,20 222,0 3 D 1 111,20
3 4 3 4
Root
Bridge? BPDU as root bridge
with flag E F E F
Designated Proposal
Sync operation

04_RSTP - 33 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Ring topology fault: Sync Operation

1 111 333 1 111 333


111,0 4 B 2 111,10 3 111,0 4 B 2 111,10 3
3 4 3 4

BPDU BPDU flag


fault C flag Root fault C
Root
Proposal Agreement
1 2 1 2
222 444 222 444
111,30 3 D 1 111,20 111,30 3 D 1 111,20
3 4 3 4
BPDU containing BPDU with
new path Designated Agreement
to the root bridge with E F flag set E F
Flag Designated Proposal

04_RSTP - 34 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Issues related to fast convergence
 Increased probability of packets duplication
 Increased probability of packets delivered out of order
 Due to the chance to have
 Temporary loops
 Intermittent changes in the spanning tree
Be careful when using protocol relaying on Ethernet!
 LAT, NETBEUI and LLC2
 They cannot manage out of order and duplicated packets
 It is useful to disable RTSP mode (802.1w)

04_RSTP - 35 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2


Compatibilty and interoperability
 Products from different vendors and IEEE 802.w
compliant must interoperate without problems
 Be careful with products supporting IEEE 802.1w during
and before 2001!!
 The standard has been approved in late 2001
 Such products surely support a pre-standard version
 This may cause interoperability issues with products
compliant to the standard

04_RSTP - 36 Copyright 2002 - M. Baldi - P. Nicoletti: see page 2

You might also like