Cisco Public
Agenda
High Availability Campus Design Overview
STP Operations
STP Variances
Rapid PVST+ Configuration
Troubleshooting Spanning Tree Protocol
BRK-135T
CCNA Switching
Cisco Public
Spanning Tree
Protocol
BRK-135T
CCNA Switching
Cisco Public
Internet
Intranet
Network redundancy
and network protocols
Link redundancy (trunks,
channels and fiber)
Redundancy in the
distribution block
Si
Si
Redundancy and
routing design
Resilient campus
network design
BRK-135T
CCNA Switching
Cisco Public
Distribution
Si
Core
Distribution
Access
BRK-135T
CCNA Switching
Si
Si
Si
WAN
Si
Si
Si
Si
Si
Si
Si
Internet
Data Center
2008 Cisco Systems, Inc. All rights reserved.
Si
Si
Cisco Public
Not This !!
Si
Si
Si
Si
Si
Si
Si
Si
Si
Si
Si
Si
Server Farm
WAN
BRK-135T
CCNA Switching
Internet
PSTN
Cisco Public
Distribution
Si
Si
Core
Si
Si
Distribution
Access
BRK-135T
CCNA Switching
Si
Si
Building Block
Cisco Public
Access Layer
Feature Rich Environment
Its not just about connectivity
Layer 2/Layer 3 feature rich
environment; convergence, HA,
security, QoS, IP multicast, etc.
Intelligent network services: QoS,
trust boundary, broadcast
suppression, IGMP snooping
Intelligent network services: PVST+,
Rapid PVST+, EIGRP, OSPF, DTP,
PAgP/LACP, UDLD, FlexLink, etc
Cisco Catalyst integrated security
features IBNS (802.1x), (CISF): port
security, DHCP snooping, DAI,
IPSG, etc.
Core
Si
Si
Distribution
Si
Si
Access
Cisco Public
Distribution Layer
Policy, Convergence, QoS, and High Availability
Availability, load balancing, QoS
and provisioning are the
important considerations at this
layer
Core
Si
Si
Distribution
Si
Si
Access
BRK-135T
CCNA Switching
Cisco Public
Core Layer
Scalability, High Availability, and Fast Convergence
Backbone for the
network - connects network
building blocks
Performance and stability
vs. complexity - less is more
in the core
Aggregation point for
distribution layer
Core
Si
Si
Distribution
Si
Si
Access
BRK-135T
CCNA Switching
Cisco Public
10
Foundation Services
Layer 3 routing protocols
Layer 2 redundancyspanning
tree
Load
Balancing
Trunking protocols(isl/.1q)
i ng
Trunk
GLBP
Load balancing
Etherchannel link aggregation
CEF equal cost load balancing
HSRP
BRK-135T
CCNA Switching
Routing
Spanning
Tree
Cisco Public
11
Best Practices
Spanning Configuration
Only when you have to!
More common in the
data center
Required when a VLAN
spans access layer
switches
Required to protect
against user side loops
Use Rapid PVST+
for best convergence
Take advantage of the
Spanning Tree Toolkit
BRK-135T
CCNA Switching
Same VLAN
Same VLAN
Same VLAN
Layer2 Loops
Si
Si
Si
Si
Si
Layer 3 Equal
Cost Links
Layer 3 Equal
Cost Links
Si
Si
Si
Si
Si
Si
WAN
Si
Si
Internet
Data Center
Si
Cisco Public
12
Si
Vlan 10
Si
Vlan 20
Si
Vlan 30
BRK-135T
CCNA Switching
Vlan 30
Si
Vlan 30
Vlan 30
Cisco Public
13
Layer 3
EIGRP/OSPF
Si
Layer 3
Si
Layer 2
EIGRP/OSPF
10.1.20.0
10.1.120.0
EIGRP/OSPF
GLBP Model
VLAN 20 Data
VLAN 120 Voice
10.1.40.0
10.1.140.0
Layer 2
VLAN 40 Data
VLAN 140 Voice
Cisco Public
14
STP Operations
Three step process STP uses to create a loop-free
topology
STP Convergence Steps
Step 1: Elect a
Root Bridge
The one port on the each switch with the least cost path
back to the root
BRK-135T
CCNA Switching
Cisco Public
15
STP Operations
STP Port States and BPDU Timers in the
Operation of STP
Port States
Processes
Blocking
Listening
Learning
Forwarding
Disable
9
8
9
8
9
8
9
9
8
8
8
BPDU Timers
Hello Time
Forward
Delay
Maximum
Age
BRK-135T
CCNA Switching
The hello time is the time between each BPDU frame that is sent on a port
This is equal to 2 seconds by default, but can be tuned to be between 1 and 10 seconds
The forward delay is the time spent in the listening and learning state
This is by default equal to 15 seconds for each state, but can be tuned to be between
4 and 30 seconds
The max age timer controls the maximum length of time a switch port saves configuration BPDU
information
This is 20 seconds by default, but can be tuned to be between 6 and 40 seconds
Cisco Public
16
8192:000000000001
A Root
1
2
DP
Core
RP
DP
32768:000000000002
C Peer
DP
2
RP
BRK-135T
CCNA Switching
DP
NDP
RP
32768:000000000003
B Peer
Distribution
Nondesignated Ports:
Ports in Blocking
2
D Peer
32768:000000000004
Direction of
BPDU Flow
Cisco Public
17
Layer 2 Hardening
Spanning Tree Should Behave
the Way You Expect
Place the Root where you want it
Root Primary/Secondary Macro
HSRP/GLBP
Loopguard
STP Root
Si
Rootguard
Rootguard
Loopguard
Loopguard
Si
UplinkFast
UDLD
Only end station traffic should be
UplinkFast
BPDU Guard or
Rootguard
PortFast
Root Guard
PortFast
BRK-135T
CCNA Switching
Port-security
Port-Security
2008 Cisco Systems, Inc. All rights reserved.
Cisco Public
18
Distribution
Switches
Root
Si
Si
X
F
Wiring
Closet
Switch
Cisco Public
19
RP
DP
BP
Root
If spanning-tree calculations
cause a port to be selected
as the root port, the port
transitions to the rootinconsistent (blocked) state
to prevent the customer's
switch from becoming the
root switch or being in the
path to the root.
Si
Si
Si
Si
GLBP
Active
Cisco Public
20
UplinkFast
Spanning Tree enhancement to
reduce failover convergence time
Used when recovery path
is known and predictable
Root
Si
Si
1
Switch(config)# spanning-tree uplinkfast
BRK-135T
CCNA Switching
Cisco Public
21
BackboneFast
Spanning Tree enhancement
to reduce failover
convergence time
Root
Si
Si
Bypasses max-age
Reduces failover time
to 30 seconds from
50 seconds
BRK-135T
CCNA Switching
Cisco Public
22
RP
PortFast
DP
Used
BP
Root
Si
Si
Si
Si
Optimizes
Immediately
BRK-135T
CCNA Switching
Cisco Public
23
Root
Si
Si
Si
Si
24
Link RedundancyUDLD
Aggressive Mode UDLD
Default UDLD timers (15 second
hellos) are intended to take down link
prior to 802.1d spanning tree
listening/learning transition
Aggressive modeafter aging on a
previously bi-directional linktries
eight times (once per second) to
reestablish connection then errdisables port
Si
Tx
Rx
Rx
Tx
Si
BRK-135T
CCNA Switching
! Global configuration
udld aggressive
udld message time 7
! Interface
interface GigabitEthernet8/1
udld port aggressive
Cisco Public
25
Name
Blocking Listening Learning Forwarding STP Active
---------------------- -------- --------- -------- ---------- ---------VLAN0001
0
0
0
2
2
VLAN0005
0
0
0
2
2
---------------------- -------- --------- -------- ---------- ---------2 vlans
0
0
0
4
4
BRK-135T
CCNA Switching
Cisco Public
26
Cisco Public
27
STOP
B
Cisco Public
28
STP Variance
DEC STP pre-IEEE
802.1DClassic STP
IEEE
BRK-135T
CCNA Switching
Cisco Public
29
STP enhancements to
802.1(d,s,w)
Cisco Public
30
STP Variance
Per-VLAN Spanning Tree Plus (PVST+)
Provides a separate 802.1D spanning tree instance for each
VLAN configured in the network. This includes PortFast,
UplinkFast, BackboneFast, BPDU Guard, BPDU Filter, Root
Guard, and Loop Guard.
Cisco
Proprietary
Rapid PVST+
Provides an instance of RSTP (802.1w) per VLAN. This
includes PortFast, BPDU Guard, BPDU Filter, Root
Guard, and Loop Guard.
MST
Provides up to 16 instances of RSTP (802.1w) and
combines many VLANS with the same physical and logical
topology into a common RSTP instance. This includes,
PortFast, BPDU Guard, BPDU Filter, Root Guard, and
Loop Guard.
BRK-135T
CCNA Switching
Cisco Public
31
Optimizing L2 Convergence
PVST+, Rapid PVST+ or MST
Rapid-PVST+ greatly improves the restoration times for any VLAN
that requires a topology convergence due to link UP
Rapid-PVST+ also greatly improves convergence time over
Backbone fast for any indirect link failures
Traditional Spanning Tree
Implementation
MST (802.1s)
Permits very large scale STP
implementations
(~30,000 logical ports)
Not as flexible as Rapid PVST+
BRK-135T
CCNA Switching
35
Time to Restore Data Flows (sec)
PVST+ (802.1d)
30
Upstream
25
Downstream
20
15
10
5
0
PVST+
Rapid PVST+
Cisco Public
32
BRK-135T
CCNA Switching
Cisco Public
33
BRK-135T
CCNA Switching
Cisco Public
34
Rapid PVST+
Rapid PVST+ is the IEEE 802.1w (RSTP) standard
implemented per VLAN.
Each Rapid PVST+ instance on a VLAN has a single
root switch. You can enable and disable STP on a perVLAN basis when you are running Rapid PVST+.
Rapid PVST+ uses point-to-point wiring to provide rapid
convergence of the spanning tree.
The spanning tree reconfiguration can occur in less
than 1 second with Rapid PVST+ (in contrast to 50
seconds with the default settings in the 802.1D STP).
BRK-135T
CCNA Switching
Cisco Public
35
Designated port
Alternate port
Backup port
Both blocking
BRK-135T
CCNA Switching
Cisco Public
36
Root
Root Port
R
Root Port:
Port receiving the best BPDU for
the bridge shortest path to the
Root in terms of path cost
BRK-135T
CCNA Switching
Cisco Public
37
Root
Root Port
Designated Port
D D
B
D
Designated Port:
Port sending the best BPDU on a
segment
BRK-135T
CCNA Switching
Cisco Public
38
Root
Root Port
Designated Port
Alternate Port
D D
B
D
Alternate Port:
Port blocked by BPDUs from a
different bridge redundant path
to the Root
BRK-135T
CCNA Switching
Cisco Public
39
Root
Root Port
Designated Port
Alternate Port
Backup Port
D D
B
D
Backup Port:
Port blocked by BPDUs sent from
the same bridge redundant path
to a segment
BRK-135T
CCNA Switching
Cisco Public
40
Modified BPDU
Protocol version now 2 (was 0)
No more distinct TCN BPDU
Flag field changes
Cisco Public
41
BRK-135T
CCNA Switching
Cisco Public
42
Agreement/Proposal
Explicit handshake mechanism between bridges
Upon link up event, bridge sends a proposal to become
designated for that segment (designated bridge is the one
leading to the root)
Response is an agreement if remote bridge selects the
port on which it received the proposal as its root port
As soon as agreement is received, port moves to
forwarding
BRK-135T
CCNA Switching
Cisco Public
43
Agreement/Proposal
Prop
A
Agree
A has a better priority than B
A sends a proposal to B to become designated
B compares the received priority and replies with an
agreement Bs port becomes Root Port
Root
Cisco Public
44
Rapid Transition
For a rapid transition to occur
Make sure you properly identify:
Edge ports (enabled via Portfast)
Point-to-point links (derived from duplex
mode by default)
It is very important to check duplex settings between
two bridges else, no Proposal/Agreement
mechanism !
BRK-135T
CCNA Switching
Cisco Public
45
A (1w)
RSTP BPDU
B (1w)
C (1D)
STP BPDU
Cisco Public
46
Protocol Migration(2)
Cannot detect if 802.1D bridge is removed if
it is not designated (otherwise it would send
BPDUs).
A (1w)
B (1w)
C (1D)
STP BPDU
Cisco Public
47
Configuring Rapid-PVST+
RSTP fast convergence on a per-VLAN basis
Each VLAN runs its own RSTP instance and sends its own
RSTP BPDU, just like PVST+
BRK-135T
CCNA Switching
Cisco Public
48
Dist-2
Root: VLANs 6-10
Sec. Root: VLANs 1-5
BRK-135T
CCNA Switching
Cisco Public
49
Acc-1
FWD: VLANs 6-10
BLK: VLANs 1-5
BRK-135T
CCNA Switching
Cisco Public
50
Layer2 Loops
Si
Si
Si
Si
Layer 3
Equal Cost
Links
Layer 3
Equal Cost
Links
Si
Si
Si
Si
Si
Si
WAN
BRK-135T
CCNA Switching
Si
Si
Si
Data Center
Si
Internet
Cisco Public
51
Gig 0/1
155.3.76.254
VLAN187
VLAN186
1/1
1/1
Root: 1,3,5,7,9,187
0001.c912.7800
F: 1,2,3,4,5,6,7,8,9
3/14
3/14
DIST-01
192.168.1.1
Root: 2,4,6,8,186
0003.6b73.9700
DIST-02
192.168.1.2
F: 1,2,3,4,5,6,7,8,9
F: 1,8,9
4/1
F: 1,2,3
4/3
4/2 4/3
4/4
4/1
4/2
F: 1,6,7
F:
1,4,5
F:
1,6,7
F: 1,8,9
F: 1,4,5
F: 1,2,3
4/4
B: 2
1/1
1/2
BRK-135T
CCNA Switching
B: 4
B: 1,3
1/1
B: 1,5
1/2
B: 6
1/1
1/2
B: 1,7
1/1
B: 8
1/2
B: 1,9
0001.c967.7800
0001.c9dd.7800
0001.c932.9700
0001.c949.9700
Closet1
192.168.1.11
Closet2
192.168.1.12
Closet3
192.168.1.13
Closet4
192.168.1.14
Cisco Public
52
BRK-135T
CCNA Switching
Cisco Public
53
Interface
Designated
Name
Port ID Prio
Cost Sts Cost Bridge ID
Port ID
------------------------------------ ------ ------- ------GigabitEthernet1/1 128.1 128 4 FWD 67 32768 0005.5f33.dc01 128.1
FastEthernet3/48 128.176 128 19 FWD 48 32768 0030.7bdd.5080
128.16
BRK-135T
CCNA Switching
Cisco Public
54
BRK-135T
CCNA Switching
Cisco Public
55
Name
Blocking Listening Learning Forwarding
STP Active
------------------------------------- ------------- ------------- ---------------- -------VLAN0001
0
0
0
2
2
VLAN0010
0
0
0
1
1
VLAN1002
0
0
0
1
1
VLAN1003
0
0
0
1
1
VLAN1004
0
0
0
1
1
VLAN1005
0
0
0
1
1
------------------------------------ ------------- ------------- ---------------6 VLANs
BRK-135T
CCNA Switching
Cisco Public
56
Number of
Spanning Tree
Instances
BRK-135T
CCNA Switching
Cisco Public
57
Dont
Forget
PortFast
Cisco Public
58
BRK-135T
CCNA Switching
Cisco Public
59
BRK-135T
CCNA Switching
Cisco Public
60