Académique Documents
Professionnel Documents
Culture Documents
Protocol
Spanning Tree
Agenda
Spanning Tree.
Spanning-Tree Basics
Spanning Tree.
Spanning Tree.
Spanning Tree.
X
Blocked port
Spanning Tree.
X
Blocked
port
Remove
blocked port
Spanning Tree.
Spanning-Tree Concepts
Spanning Tree.
Four-Step Decision-Making
Sequence
When creating a loop-free logical
topology, Spanning Tree always uses
the same four-step decision sequence:
1. Lowest Root BID
2. Lowest Path Cost to Root Bridge
Bridge Types
Network parameters
Root Bridge
Hello interval
Designated Bridge
Forward delay
Max age
Port Types
Root Port
Port-specific parameters
Designated Ports
Port cost
Non-Designated Ports
Port priority
Port States
BPDUs
Blocking
Configuration
Listening
Learning
Forwarding
(Disabled)
Spanning Tree.
10
1
Designated Port
Root Port
F
Root bridge
Designated Port
Non-Designated Port
Designated bridge
for segment 3
Root Port
Root Port
Designated Port
Non-Designated Port
3
Designated Port Port selected
for forwarding
Spanning Tree.
11
Spanning Tree.
12
Spanning Tree.
13
32768:0080.acff.0003
14
15
16
Spanning Tree.
17
Spanning Tree.
18
Spanning Tree.
19
20
Listening
Blocking
Learning
TCN
TCN
Forwarding
Spanning Tree.
21
Port-specific parameters
Port cost
Port priority
Spanning Tree.
22
Spanning Tree.
23
24
Spanning Tree.
25
Spanning Tree.
26
Spanning Tree.
27
Spanning Tree.
28
Configuration BPDU
Orginated by root switch and sent on all the designated
ports (all ports on the root switch are designated ports)
Spanning Tree.
29
Spanning Tree.
Root Identifier
Max Age
Hello Time
Bridge Identifier
Forward Delay
Port Identifier
Message Age
Topology Change
30
Protocol
Identifier
Ver
Msg
Type
Flags
Root ID
Root
Path
Cost
Bridge ID
Port ID
0x00 =
Config
BPDU
Spanning Tree.
2 byte priority
6 byte ID (MAC
address)
Msg
Age
Max
Age
Hello
Time
Forward
Delay
2 byte priority
6 byte ID (MAC
address)
31
= Station Cisco7A009A6
Source MAC
address of
sending port
IEEE 802.1d
Reserved
Destination MAC
address
Spanning Tree.
DSAP/SSAP of 0x42
is BPDU
32
Always 0
= 00
00 Configuration BPDU
80 TCN BPDU
BPDU:
BPDU: BPDU Type = 00 (Configuration)
BPDU:
= 8000
= 00400BA009A2
BPDU:
BPDU: Root Path Cost
Spanning Tree.
Root Bridge ID
=0
33
= 8000
= 00400BA009A2
Port ID
= 8005
= 0.000 seconds
= 2.000 seconds
= 15.000 seconds
BPDU:
DLC: Frame padding= 7 bytes
Spanning Tree.
BID of
sending
bridge
Seconds since
root originated the
BPDU
Timers:
MaxAge
HelloTime
FwdDelay
34
Spanning Tree.
35
Protocol
Identifier
Ver
Msg
Type
0x80 =
TCN
BPDU
Spanning Tree.
36
Spanning Tree.
37
C
TCN toward root
TCN ACK
X
A
Spanning Tree.
Bridge fails
38
Root
TC Flag
CAM Aging=15s
TC Flag
TC Flag
CAM Aging=15s
TC Flag
TC Flag
CAM Aging=15s
CAM Aging=15s
Spanning Tree.
CAM Aging=15s
39
Spanning Tree.
40
Spanning Tree.
41
Spanning Tree.
42
Spanning Tree.
43
44
Spanning Tree.
45
Spanning Tree.
46
Spanning Tree.
47
48
PVST
PVST Per-VLAN Spanning Tree
Spanning Tree.
49
PVST+
PVST+ Per-VLAN Spanning Tree Plus
Developed to accommodate the IEEE 802.1Q
standard for VLAN trunking
PVST+ maintains a per-VLAN spantree for both
802.1Q and ISL
PVST+ can interoperate with MST domains (3rd party)
while maintaining a PVST for 802.1Q and/or ISL (no
config required)
For more info, see An Engineering Guide to IEEE 802.1Q and IEEE 802.1p
(ENG-18215)
Spanning Tree.
50
MST
Spanning Tree.
51
PVST/PVST+/MST Interoperation
To interoperate with 3rd party 802.1Q-capable devices, use the set
trunk mod/port nonegotiate dot1q command
All Cisco PVST+ connections to the MST region must be through
802.1q trunks
PVST and PVST+ regions can communicate over ISL trunk links
MST and PVST+ regions can connect over an 802.1q trunk
Spanning Tree.
52
PVST/PVST+/MST Interoperation
Spanning Tree.
53
Spanning Tree.
54
Spanning Tree.
55
Spanning Tree.
56
Blocked Port
(Red, Blue)
L3
S1
L1
(10,10)
L2
(10,10)
S3
BID 32768.0000.0000.0003
BID 32768.0000.0000.0033
57
Blocked Port
(Blue)
L3
S1
L1
(10,10)
L2
(
30,10)
Blocked Port
(Red)
S3
BID 32768.0000.0000.0003
BID 32768.0000.0000.0033
Spanning Tree.
58
PortVlanCost Implementation
Associating a different port cost for different
VLANs for all ports requires too much memory
Therefore, we associate all VLANs with one of two
possible portcosts (known as portvlancost)
Using just two portvlancosts per port and
Spanning Tree.
59
Spanning Tree.
60
Spanning Tree.
61
Spanning Tree.
62
Root (Red)
S1
BID 8192.0000.0000.0002 S2
BID 16384.0000.0000.0022
Blocked Port
(Blue)
L1
(10,10)
L2
Root (Blue)
BID 16384.0000.0000.0001
BID 8192.0000.0000.0011
Blocked Port
(Red)
(10,10)
S3
BID 32768.0000.0000.0003
BID 32768.0000.0000.0033
Simpler configuration:
Move the root switch for the Red VLAN to S2
Spanning Tree.
63
64
65
Spanning Tree.
66
Allows you to safely tune max age, forward delay and hello
time
Spanning Tree.
67
68
Spanning Tree.
69
Spanning-Tree PortFast
set spantree portfast <mod/port>
<enable|disable>
Causes a switch port to transition to the
forwarding state immediately, bypassing the
listening & learning states
Prevents connectivity issues related to
forwarding delay
Most common problems are seen with DHCP,
IPX GNS, and AppleTalk
Spanning Tree.
70
Spanning-Tree PortFast
Use only on host ports (otherwise, you might
open temporary spantree loops)
Failsafe if a BPDU is received on the port,
transition to listening mode
No TCN is generated for state changes on
portfast ports
71
Listening
Blocking
Learning
TCN
PortFast
(No TCN!)
Spanning Tree.
TCN
Forwarding
72
Spanning-Tree PortFast
Example
Console> (enable) set spantree portfast 8/10 enable
Warning: Spantree port fast start should only be enabled on ports connected
to a single host.
Vlan Port-State
Cost
connected
3100
32 enabled
Console> (enable)
Spanning Tree.
73
74
Port
Name
Status
Vlan
errdisable 1
auto
auto 10/100BaseTX
Console> (enable)
Spanning Tree.
75
< . . . >
Spanning Tree.
76
Spanning-Tree UplinkFast
Spanning Tree has relatively slow
convergence in recovering from faults
At default values, convergence time varies
between 30-50 seconds
In the wiring closet, the typical design has a
redundant link into the distribution/core that
is in spantree blocking mode
Spanning Tree.
77
78
The value of rate is also limited by the power of the CPU on the
switch. A Cat 5000 Supervisor 1 does not have enough power to
go well above the default rate
Spanning Tree.
79
Spanning Tree.
80
81
Spanning Tree.
82
: 10
Spanning Tree.
83
port list
-----------------------------------------------------1
4/1(fwd),4/2,5/3
4/1(fwd), 5/4
5/1(fwd)
Vlan 1 has 4/1 as root port, 4/2 and 5/3 as redundant root ports
Vlan 2 has 4/1 as root port, but only one redundant port, 5/4
Spanning Tree.
84
Spanning Tree.
85
Spanning Tree.
86
These switches
see link down
X
These switches
do not see a link
down
Spanning Tree.
87
X
B
C
Blocking
1.
2.
3.
4.
5.
6.
7.
Spanning Tree.
88
Inferior BPDUs
If the switch receives an inferior BPDU from the
designated bridge, we know that the designated
bridge has either:
1. Lost the root
Root
Root
Spanning Tree.
89
Spanning Tree.
90
91
X
B
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
C
Blocking
Spanning Tree.
92
Spanning Tree.
93
: 0
: 0
: 0
: 0
: 0
Console> (enable)
Spanning Tree.
94
Spanning Tree.
95
Root
Spanning Tree.
96
Spanning Tree.
97
Spanning Tree.
98
Spanning Tree.
99
VLAN Port-State
Guard Type
root-inconsis
root
1/2
forwarding
root
8/1
not-connected
none
Spanning Tree.
100
Spanning Tree.
101
Spanning Tree.
102
2) Design issues
Spanning Tree.
103
3) Software issues
Software bugs
Forwarding traffic across blocked ports
UplinkFast/BackboneFast
Etc.
Spanning Tree.
104
Unidirectional links
Data corruption (BPDUs dropped)
Port Stuck (BPDUs dropped)
NMP stops listening to spanning-tree (stuck
inband)
Loss of management communication to line cards
Spanning Tree.
105
106
Spanning Tree.
107
During an Event
Remove redundant Ethernet segments from the
network
Start with connections between core switches
Begin with EtherChannels, if used
Wait for 30-60 seconds for the network to recover before
removing another link
If the network does not recover, continue methodically
removing redundancy until the network stabilizes
108
Spanning Tree.
109
Spanning Tree.
110
The root might have moved due to a new bridge in the network, or a bridge
priority change
Spanning Tree.
The bridge ID
of the root
bridge
Root port
(port to get to
root bridge)
15 sec
15 sec
Portfast
---------disabled
enabled
Channel_id
---------801
0
111
Spanning Tree.
Designated root
cost on the root
is always 0
15 sec
15 sec
Portfast
Channel_id
---------- ---------disabled
865
112
Spanning Tree.
113
Spanning Tree.
114
Spanning Tree.
115
Spanning Tree.
116
Spanning Tree.
00-d0-00-3f-a0-02
49152
Hello Time 2 sec
Forward Delay 15 sec
Port
-----------------------3/47
3/48
4/1-4
Vlan
---3
3
3
Port-State
Cost Priority Portfast
Channel_id
------------- ----- -------- ---------- ---------blocking
3019
32 disabled
0
forwarding
3019
32 disabled
0
forwarding
3002
32 disabled
865
117
2(127624)
51(3124)
0(65)
0(36)
0
0
Spanning-tree
port state
118
ieee
01-80-c2-00-00-00
49152
00-d0-00-3f-a0-02
2 sec
15 sec
3/48
Thu Jan 20 2000, 23:53:12
FALSE
35
FALSE
63
00-d0-79-09-60-5d
Spanning Tree.
Port on which
TCN was last
received
Total topology
change count
119
References
Cisco Press Cisco LAN Switching book, two
chapters on Spanning Tree
Troubleshooting Spanning-Tree Protocol and
Related Design Considerations
http://www.cisco.com/warp/customer/473/16.html
Spanning Tree.
120
121