Professional Documents
Culture Documents
Topic 5 Spanning Tree Protocol (STP) : Entel - Eetac - Upc Nov.-21
Topic 5 Spanning Tree Protocol (STP) : Entel - Eetac - Upc Nov.-21
-21
Redundant links vs
broadcast storms
virtual loop-free topology
TOPIC 5
TOPIC 5
Nov-21
SPANNING TREE PROTOCOL
1.1. Problem statement
Network Interconnection Techniques (IX) - Topic 5
Nov-21
PROBLEM STATEMENT
EXAMPLE. REDUNDANT LINKS
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 1
SW3 2
1
2 SW1 3 E5
E8 1 SW2 2
E6
E4
Nov-21
EXAMPLE. REDUNDANT LINKS
E2
E7 SAT SW1 1
SAT SW3
E1 #1 E1 #1
SW3 2
1
2 SW1 3 E5
E8 1 SW2 2
E6
E4
SW1 and SW3 add an entry for the source address (E1) in the SAT
SW1 and SW3 resend the frame over all the other ports 5
EXAMPLE. REDUNDANT LINKS
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 SAT SW1 1
SAT SW3
E1 #1 E1 #1
SW3 2
1
2 SW1 3
SAT SW2 E5
E1 #2
E8 1 SW2 2
E6
E4
Nov-21
EXAMPLE. REDUNDANT LINKS
E2
E7 SAT SW1 1
SAT SW3
E1 #1 E1 #1
SW3 2
1
2 SW1 3
SAT
SAT SW2
SW2 E5
E1
E1 #2
#1
E8 1 SW2 2
E6
E4
EXAMPLE. REDUNDANT LINKS
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 SAT SW1 1
SAT SW3
E1 #1 #2
E1 #1
SW3 2
1
2 SW1 3
SAT
SAT SW2
SW2 E5
E1
E1 #2
#1
E8 1 SW2 2
E6
E4
Nov-21
EXAMPLE. REDUNDANT LINKS
A POSSIBLE SOLUTION...
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 1
SW3 2
1
2 SW1 3 E5
E8 1 SW2 2
E6
E4
Nov-21
THE SOLUTION
Spanning Tree Algorithm (STA)
11
1Perlman, R.. “An algorithm for distributed computation of a spanningtree in an extended LAN.”
SIGCOMM 1985 (1985).
TOPIC 5
Nov-21
SPANNING TREE PROTOCOL
1.1. Problem statement
Network Interconnection Techniques (IX) - Topic 5
12
Nov-21
ALGORHYME
I think that I shall never see
Radia Perlman
STP step by step
1. Select one of the switches/bridges (SW/B) as the root bridge
Network Interconnection Techniques (IX) - Topic 5
2. For each other SW/B, select one of its ports as the root port
The port of the SW/B with the lowest Root Path Cost (RPC)
In case needed, the port connected to the best-SW/B is selected
3. For each link, select one of the ports as the designated port
The port of the link with the lowest RPC
In case needed, the port connected to the best-SW/B is selected
14
5. The spanning tree is periodically refreshed
Every Hello Time, the Root Bridge sends a refresh message
STP SOLUTION TO REDUNDANT LINKS
Nov-21
STEP1 – Root selection
E2
E7 1
SW3 2
1
2 SW1 3 E5
E8 1 SW2 2
E6
E4
STP SOLUTION TO REDUNDANT LINKS
Nov-21
STEP2 – Root port selection
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 1
SW3 2
1
2 SW1 3 E5
E8 1 SW2 2
E6
E4
STP SOLUTION TO REDUNDANT LINKS
Nov-21
STEP3 – Designated port selection
E2
RPC=1
E8 1 SW2 2
E6
E4
STP SOLUTION TO REDUNDANT LINKS
Nov-21
STEP4 – Block all the other ports
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
RPC=1
E7 1
SW3 2
1
Only one
2 SW1 3
of these E5
two
RPC=1
E8 1 SW2 2
E6
E4
STP SOLUTION TO REDUNDANT LINKS
Nov-21
STEP4 – Block all the other ports
E2
Now, only ports that are active (i.e., root ports and designated ports) can
process and resend users’ frames 19
STP SOLUTION TO REDUNDANT LINKS
Nov-21
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 1
SW3 2
1
2 SW1 3 E5
E8 1 SW2 2
E6
E4
EXAMPLE. REDUNDANT LINKS
Nov-21
SW3#2 does not
E2
E8 1 SW2 2
E6
E4
SW1 and SW3 learn source address (E1) over the incoming port
SW1 resends the frame over all its other ports 21
SW2 learns source address (E1) over the incoming port and resends
Bridge configuration and STP
Each bridge spreads the information about its own topology
Network Interconnection Techniques (IX) - Topic 5
to its neighbours
• Learning from its neighbours, the bridge can reconfigure
accordingly
Special STP frames carry such info Bridge Protocol Data Unit
(BPDU)
• The updated information will span from the root till the leafs of
the tree
Each bridge configures itself locally
After some time, all the bridges converge to the final topology
In the meanwhile, we need to make sure there are no loops port
states
Once the STP is configured
• SW/B only learn @MAC and resend users’ frames over root
and/or designated ports
22
• Users’ frames received on blocked ports are discarded by the
SW/B
Nov-21
(1) When a management BPDU is received
PORT STATES (2) When a management BPDU is received
after a failure
(3) Port is selected as root or designated
(4) Port is not root or designated anymore
(5) Forward delay timer expires
(2)
(1) (2) (4)
(2)
(2) Blocking (4)
(4) (3)
(5) (5)
Listening Learning Forwarding
23
23
These two states guarantee no loops
during the configuration phase!
STP maintenance and reconfiguration
The topology must be maintained
Network Interconnection Techniques (IX) - Topic 5
TOPIC 5
Nov-21
SPANNING TREE PROTOCOL
1.1. Problem statement
25
1.3 – BPDU
Nov-21
1.3 – BPDU
CONFIGURATION BPDU (I)
Nov-21
BPDU of 35 bytes
Protocol ID (0)
(2 bytes)
1.3 – BPDU
CONFIGURATION BPDU (II)
Nov-21
BPDU of 35 bytes
Protocol ID (0)
There are several parameters on which all (2 bytes)
Network Interconnection Techniques (IX) - Topic 5
1.3 – BPDU
TOPOLOGY CHANGE NOTIFICATION BPDU
Nov-21
(TCN_BPDU)
BPDU of 4 bytes
Topology Change
Notification BPDU
“10000000”
29
1.3 – BPDU
BPDU sent and STP configuration
Nov-21
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
B3.0.B3.1
E7 1 B3.0.B3.2
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1
2 B1 3 E5
B2.0.B2.1
B2.0.B2.2
E8 1 B2 2
E6
E4
When STP begins:
None has STP info of its neighbours 30
All the SW/B declare themselves as the Root Bridge
1.3 – BPDU
BPDU sent and STP configuration
Nov-21
All the Bridges have same priority
All the links have cost equal to 1
E2
E7 1 B3.0.B3.2
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1
2 B1 3 E5
B2.0.B2.1
B2.0.B2.2
E8 1 B2 2
E6
E4
B1 compares the BPDU received with its own BPDU:
B1 is the best SW/B Root Bridge (it has no root port ) 31
Port 1, 2 and 3 send a better BPDU wrt the one received
Designated ports
1.3 – BPDU
BPDU sent and STP configuration
Nov-21
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
B3.0.B3.1
E7 1
B1.0.B1.1
B3 2
B1.0.B1.2
1
2 B1 3 B3.0.B3.2
E5
B2.0.B2.1
B2.0.B2.2
B1.1.B2.2
B1.0.B1.3
E8 1 B2 2
E6
E4
B2 compares the BPDU received with its own BPDU:
B1 is the best SW/B B2 selects port 1 as it root port with RPC=1 32
BPDU from B2 on port 2 changes to B1.1.B2.2, which is better than the
one received Port 2 is designated
1.3 – BPDU
BPDU sent and STP configuration
Nov-21
All the Bridges have same priority
All the links have cost equal to 1
E2
E1 E3
B3.0.B3.1
E7 1 B3.0.B3.2
B1.1.B3.2
B3 2
B1.0.B1.2 B1.0.B1.3
1 B1.1.B2.2
2 B1 3 E5
E8 1 B2 2
E6
E4
B3 compares the BPDU received with its own BPDU:
B1 is the best SW/B B3 selects port 1 as it root port with RPC=1 33
BPDU from B3 on port 2 changes to B1.1.B3.2, which is worst than the
one received Port 2 is blocked
1.3 – BPDU
BPDU sent and STP configuration
Nov-21
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 1
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1
2 B1 3 E5
B1.1.B2.2
E8 1 B2 2
E6
E4
Every Hello Time:
Root Bridge (B1) sends its BPDU on its designated ports
34
B2 and B3 receive it on their root port and refresh the info
B2 sends its own BPDU on its designated port
TOPIC 5
Nov-21
SPANNING TREE PROTOCOL
1.1. Problem statement
35
• The STP info expires (Max Age in the BPDU!!) on that (those)
port
• A new route is calculated with the information they have
If they get no info (i.e., they do not have a blocked port), they declare
themselves as the root bridge until a new path is found
If they receive info on several ports, they select the best one
• The reconfiguration is automatic
No need to send TCN_BPDU!
Who sends a TCN_BPDU?
• Every SW/B whose port enters/exits the blocking state
• TCN_BPDU is sent through the root port, so to reach the Root
Bridge
Intermediate SW/B resends the TCN_BPDU on their root port
• In this case, we need to reconfigure the SATs
Root Bridge receives a TCN_BPDU 36
Nov-21
Root Bridge receives a TCN_BPDU on one (or more) of its
ports
STP reconfiguration
Nov-21
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 1
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1
2 B1 3 E5
B1.1.B2.2
E8 1 B2 2
E6
E4
Every Hello Time:
Root Bridge (B1) sends its BPDU on its designated ports
38
B2 and B3 receive it on their root port and refresh the info
B2 sends its own BPDU on its designated port
STP reconfiguration
Nov-21
All the Bridges have same priority
The link on B3 port 1 fails
All the links have cost equal to 1
E2
E1 E3
E7 1
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1 B1.1.B2.2
2 B1 3 E5
E8 1 B2 2
E6
E4
B3 stops receiving the BPDU from B1 on port 1
Port 1 is designated (it’s the best, as it does not receive other BPDU!) 39
B3 has a blocked port (port 2) where it still receives a BPDU
STP reconfiguration
Nov-21
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
B1.2.B3.1
E7 1
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1 B1.1.B2.2
2 B1 3 E5
E8 1 B2 2
E6
E4
B3 stops receiving the BPDU from B1 on port 1
B1 is the best SW/B B3 selects port 2 as its root port with RPC=2 40
Port 2 exits the blocking state! B3 needs to send a TCN_BPDU to B1
STP reconfiguration
Nov-21
All the Bridges have same priority
The link on B3 port 1 fails
All the links have cost equal to 1
E2
E7 1 TCN_BPDU
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1
2 B1 3 E5
TCN_BPDU B1.1.B2.2
E8 1 B2 2
E6
E4
B3 stops receiving the BPDU from B1 on port 1
Port 2 exits the blocking state! B3 needs to send a TCN_BPDU to B1 41
Designated ports receive the TCN_BPDU
STP reconfiguration
Nov-21
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
B1.2.B3.1
B1.0.B1.1 TC
E7 TC 1
B1.0.B1.2 B1.0.B1.3
B3 2
TC TC+TCA
1
2 B1 3 E5
B1.1.B2.2
TC+TCA
E8 1 B2 2
E6
E4
In the next Hello Time, B1 sends the Config_BPDU
With TC flag ON on port 1 and 2 42
With TC and TCA flags ON on port 3 ( )
B2 sends its Config_BPDU with TC+TCA flags ON on port 2 ( )
STP reconfiguration – Case 2
Nov-21
All the Bridges have same priority
The link on B2 port 2 fails
All the links have cost equal to 1
E2
E7 1
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1
2 B1 3 E5
B1.1.B2.2
E8 1 B2 2
E6
E4
Every Hello Time:
Root Bridge (B1) sends its BPDU on its designated ports
43
B2 and B3 receive it on their root port and refresh the info
B2 sends its own BPDU on its designated port
STP reconfiguration – Case 2
Nov-21
E2
Network Interconnection Techniques (IX) - Topic 5
E1 E3
E7 1 B1.1.B3.2
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1 B1.1.B2.2
2 B1 3 E5
B1.1.B2.2
E8 1 B2 2
E6
E4
B3 stops receiving the BPDU on port 2:
B1 is the best SW/B B3 selects port 2 as its designated port 44
STP reconfiguration – Case 2
Nov-21
All the Bridges have same priority
All the links have cost equal to 1
E2
E7 1 B1.1.B3.2
B1.0.B1.1
B3 2
B1.0.B1.2 B1.0.B1.3
1
2 B1 3 E5
B1.1.B2.2
E8 1 B2 2
E6
E4
B3 stops receiving the BPDU on port 2:
B1 is the best SW/B B3 selects port 2 as its designated port 45
Port 2 exits the blocking state! B3 needs to send a TCN_BPDU to B1
...
nov.-21
TOPIC 5
PROTOCOL D'ARBRE D'EXPANSIÓ
1.1. Problem statement
1.2. STP: How it works
Interconnexió de Xarxes – Topic 5
46
Nov-21
PROBLEMS ASSOCIATED WITH STP
STP Latency
47
STP LATENCY
STP algorithm takes around 50 segonds in calculating a given
topology. Each state transition takes:
Network Interconnection Techniques (IX) - Topic 5
Nov-21
RSTP – IEEE802.1D‐2004
What changes compared to the original STP
RSTP –IEEE802.1D‐2004
Faster convergence to a new topology
Network Interconnection Techniques (IX) - Topic 5
50
Nov-21
RSTP –IEEE802.1D‐2004
Deshabilitat Discarding No No
Bloqueig Discarding No No
Escolta Discarding Sí No
Aprenentatge Learning Sí Sí
Forwarding Forwarding Sí Sí
Learning Forwarding
Proposal Rol del port (00: Unknown; 01: Alternatiu/backup; 51
10: Arrel; 11: Designat)
Topology change
VLAN AND STP
VLANs are defined on top of the changing STP topology
Network Interconnection Techniques (IX) - Topic 5
Nov-21
VLAN AND STP: PER‐VLAN STP
A single STP for each VLAN spanning forest
53
VLAN AND STP: MSTP (I)
Multiple STP
Network Interconnection Techniques (IX) - Topic 5
Nov-21
VLAN AND STP: MSTP (II)
Common and Internal ST (CIST)
55
Nov-21
CONCLUSIONS
STP defines a tree topology (NO loops)
1. Select one root bridge
Network Interconnection Techniques (IX) - Topic 5
2. For each bridge (apart from the root), select one root port
3. For each segment, select one designated port
4. Block all the other ports (no root, no designated)
Bridges learn all this information through the exchange of
configuration BPDUs
• End stations do not process BPDUs
• Topology change notification BPDUs do have a different format
Main goal: avoid loops
• Intermediate states: listening and learning
Reconfiguration afer a failure
• Root port timer expires the bridge recalculates the STP internally
If it has a blocked port, it has an alternate path to the root bridge!
Correspondance between the tree topology and the paths where
data frames flow
56
Nov-21
BIBLIOGRAPHY
S. Feit. Local Area High Speed Networks. Macmillan MTP
57
TOPIC 5
Nov-21
SPANNING TREE PROTOCOL
ANNEX. Examples
Network Interconnection Techniques (IX) - Topic 5
58
nov.-21
INITIAL TOPOLOGY
Estació A
Hub
Hub
Hub
Hub
Estació B Bridge
Hub
Bridge
Bridge
Hub 59
nov.-21
EQUIVALENT TOPOLOGY FOR STP ALGORITHM
S1 C=3
1
1
B1 B2
Interconnexió de Xarxes – Topic 5
2
2
S2
S3 C=1
C=1
2 B3 1
3
S4
C=3 1
1 2 B5
B4 3
S5
C=1
60
nov.-21
EXAMPLE – STP TOPOLOGY CONSTRUCTION
S1 C=3
B1, B2, B3, B4:
low priority 1
1
S4
C=3 1
1 2 B5
B4 3
S5
C=1
61
Root port
nov.-21
EXAMPLE – STP TOPOLOGY CONSTRUCTION
S1 C=3
B1, B2, B3, B4:
low priority 1
1
2
2
S2
S3 C=1
C=1
2 B3 1
3
S4
C=3 1
1 2 B5
B4 3
S5
C=1
62
nov.-21
EXAMPLE – STP TOPOLOGY CONSTRUCTION
S1 C=3
B1, B2, B3, B4:
low priority 1
1
S4
C=3 1
1 2 B5
B4 3
S5
C=1
63
nov.-21
STP FINAL TOPOLOGY
Estació A
Hub
Interconnexió de Xarxes – Topic 5
Bridge1 Bridge2
#2 #1 #2 #1
Hub
Hub
Hub
Estació B Bridge3
#2 #3 #1
Hub
Bridge5
#2 #3
Bridge4 #1
#1 #2
Hub 64
nov.-21
EXAMPLE – STP and USERS’ TRAFFIC
• L'estació A
transmet una trama Estació A
Hub @ # AGE
a l'estació B
SAT B2
A 1 10
Hub 65
nov.-21
EXAMPLE – STP and USERS’ TRAFFIC
• L'estació A
transmet una trama Estació A
Hub @ # AGE
a l'estació B
SAT B2
A 1 10
Interconnexió de Xarxes – Topic 5
Bridge 1 Bridge2
#2 #1 #2 #1
Hub
Hub
• B1 rebrà la trama Hub
pel seu port 1 però
no la processa Estació B Bridge3
#2 #3 #1
(està bloquejat)
• Com queden les @ # AGE
SAT B3
ponts?
Bridge5
#2 #3
Bridge4 #1
#1 #2
@ # AGE
SAT B5
Hub A 1 10
66
nov.-21
EXAMPLE – STP and USERS’ TRAFFIC
• L'estació A
transmet una trama Estació A
Hub @ # AGE
a l'estació B
SAT B2
A 1 10
@ # AGE SAT B1
SAT B3
taules SAT dels Hub
A 1 10
ponts?
Bridge5
#2 #3
Bridge4 #1
#1 #2
@ # AGE
SAT B5
@ # AGE Hub A 1 10
67
SAT B4
A 2 10
nov.-21
EXAMPLE – STP and USERS’ TRAFFIC
• L'estació A
transmet una trama Estació A
Hub @ # AGE
a l'estació B
SAT B2
A 1 10
@ # AGE
SAT B1
A 2 10 Bridge 1 Bridge2
#2 #1 #2 #1
Hub
Hub
• B1 rebrà la trama Hub
pel seu port 1 però
no la processa Estació B Bridge3
#2 #3 #1
(està bloquejat)
• Com queden les @ # AGE
SAT B3
ponts?
Bridge5
#2 #3
Bridge4 #1
#1 #2
@ # AGE
SAT B5
@ # AGE Hub A 1 10
68
SAT B4
A 2 10
nov.-21
EXAMPLE – STP and USERS’ TRAFFIC
• Desprès de 2 segons,
l'estació B transmet una Estació A
Hub @ # AGE
trama a l'estació A
SAT B2
A 1 8
@ # AGE SAT B1
ponts? @ # AGE
AGE
SAT B3
A 1 8
8
Hub
B 2 10
Bridge5
#2 #3
Bridge4 #1
#1 #2
@ # AGE
SAT B5
@ # AGE Hub A 1 8
69
SAT B4
A 2 8
nov.-21
EXAMPLE – STP and USERS’ TRAFFIC
• Desprès de 2 segons,
l'estació B transmet una Estació A
Hub @ # AGE
trama a l'estació A
SAT B2
A 1 8
@ # AGE
B 2 10
SAT B1
A 2 8 Bridge 1 Bridge2
B 2 10
#2 #1 #2 #1
Hub
Hub
Hub
• Com queden
ara les taules Estació B Bridge3
SAT dels #2 #3 #1
ponts? @ # AGE
SAT B3
A 1 8
Hub
B 2 10
Bridge5
#2 #3
Bridge4 #1
#1 #2
@ # AGE
SAT B5
@ # AGE Hub A 1 8
70
SAT B4
A 2 8 B 1 10
nov.-21
EXAMPLE – STP and USERS’ TRAFFIC
• Desprès de 2 segons,
l'estació B transmet una Estació A
Hub @ # AGE
trama a l'estació A
SAT B2
A 1 8
@ # AGE
B 2 10
SAT B1
ponts? @ # AGE
SAT B3
A 1 8
Hub
B 2 10
Bridge5
#2 #3
Bridge4 #1
#1 #2
@ # AGE
SAT B5
@ # AGE Hub A 1 8
71
SAT B4
A 2 8 B 1 10
nov.-21
EXAMPLE –TOPOLOGY CHANGE
S1 C=3
B1, B2, B3, B4:
low priority 1
1
2
2
S2
S3 C=1
C=1
2 B3 1
3
S4
C=3 1
1 2 B5
B4 3
S5
C=1
Suposem que B3 deixa de rebre BPDUs (caduca temporitzador del port arrel, #1)
72
nov.-21
EXAMPLE –TOPOLOGY CHANGE
S1 C=3
B1, B2, B3, B4:
low priority 1
1
S4
C=3 1
1 2 B5
B4 3
S5
C=1
B3 ha de escollir un nou port arrel #3
Pel seu port arrel (#3) envia una BPDU de notificació de canvi de topologia cap al pont arrel (B5) 73
nov.-21
EXAMPLE –TOPOLOGY CHANGE
S1 C=3
B1, B2, B3, B4:
BPDU NCT
low priority 1
1
2
2
S2
S3 C=1
C=1 BPDU NCT
2 B3 1
3
S4
C=3 1
1 2 B5
B4 BPDU NCT
3
S5
C=1
El canvi de port arrel en el pont B3 produeix un canvi de topologia també en B1
Pel seu nou port arrel (#1), B1 envia una BPDU de notificació de canvi de topologia cap al
pont arrel (B5) 74
nov.-21
EXAMPLE –TOPOLOGY CHANGE
S1 C=3
B1, B2, B3, B4:
low priority 1
1
S4
C=3 1
1 2 B5
B4 3
S5
C=1
nov.-21
EXAMPLE –SAT AND TOPOLOGY CHANGE
• Desprès de 5 segons,
l'estació A transmet una Estació A
Hub @ # AGE
nova trama a l'estació B
SAT B2
A 1 3
10
@ # AGE
B 2 5
SAT B1
A 12 10
3 Bridge 1 Bridge2
B 2 5 #2 #1
#2 #1
Hub
Hub
Hub
Estació B Bridge3
#2 #3 #1
@ # AGE
SAT B3
A 1 3
Hub
B 2 5
Bridge5
#2 #3
Bridge4 #1
#1 #2
@ # AGE
SAT B5
@ # AGE Hub A 1 3
76
SAT B4
A 2 3 B 1 5
nov.-21
EXAMPLE –SAT AND TOPOLOGY CHANGE
• Desprès de 5 segons,
l'estació A transmet una Estació A
Hub @ # AGE
nova trama a l'estació B
SAT B2
A 1 10
@ # AGE
B 2 5
SAT B1
SAT B3
A 1 3
La trama no arriba a B! Hub
B 2 5
Bridge5
#2 #3
Bridge4 #1
#1 #2
@ # AGE
SAT B5
@ # AGE Hub A 1 3
10
77
SAT B4
A 2 3 B 1 5
nov.-21
EXAMPLE –SAT AND TOPOLOGY CHANGE
• Desprès de 5 segons,
l'estació A transmet una Estació A
Hub @ # AGE
nova trama a l'estació B
SAT B2
A 1 10
@ # AGE
B 2 5
SAT B1
A 1 10 Bridge 1 Bridge2
B 2 5 #2 #1
#2 #1
Hub
Hub
Hub
B5 no ha actualitzat la SAT
• Té l'estació B associada al Estació B Bridge3
port 2 #2 #3 #1
A 1 3
La trama no arriba a B! Hub
B 2 5
Bridge5
#2 #3
És fonamental que, Bridge4
quan
un canvi de topologia, hi ha #1
es tornin a aprendre#1les #2
@MAC a les SAT de tots els ponts @ # AGE
SAT B5
@ # AGE Hub A 1 3
10
78
Qui o Aquè2 assegura l'actualització de la SAT quan hi
SAT B4
3 B 1 5
ha un canvi de topologia?
nov.-21
FASES D'OPERACIÓ
Llavors, com es posen d'acord els ponts?
Els ponts llegeixen la informació de les BPDUs de
configuració per formar l'arbre
nov.-21
FASES D'OPERACIÓ
Escollir el pont arrel
• El pont compara el seu identificador (i prioritat) amb la informació de les
BPDUs que rep
if (B1.root_id < B2.root_id) el pont amb root_id transportat en B1 és el pont arrel
Interconnexió de Xarxes – Topic 5
else if (B1.root_id > B2.root_id) el pont amb root_id transportat en B2 és el pont arrel
Escollir el port arrel
• Cada pont calcula la seva RPC
if (B1.root_cost+C1 < B2.root_cost+C2) port on rep B1 és arrel
else if (B1.root_cost+C1 > B2.root_cost+C2) port on rep B2 és arrel
else if (B1.tx_id < B2.tx_id) port on rep B1 és arrel
else if (B1.tx_id > B2.tx_id) port on rep B2 és arrel
else if (B1.port_id < B2.port_id) port on rep B1 és arrel
else if (B1.port_id > B2.port_id) port on rep B2 és arrel
• C1 i C2 són els costos associats als ports per on entren B1 i B2,
respectivament
Escollir els ports designats
• Els ports que reben una BPDU “pitjor” de la que enviarien són designats
• Els ports que reben una BPDU “millor” de la que enviarien es 80
bloquegen