Module 3 - Spanning-Tree Protocol PDF
Module 3 - Spanning-Tree Protocol PDF
CCCCNNPA Semester3
Semes t eBrC 3M S N
Module 3
Spanning-Tree
Protocol
www.hanoictt.com
Overview
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
STP concepts
STP is a loop-prevention protocol
STP allows L2 devices to communicate with each other to discover physical
loops in the network.
STP specifies an algorithm that L2 devices can use to create a loop-free logical
topology.
STP creates a tree structure of loop-free leaves and branches that spans the
entire Layer 2 network.
www.hanoictt.com
Broadcast loops
Broadcasts and Layer 2 loops can be a dangerous combination.
Ethernet frames have no TTL field
After an Ethernet frame starts to loop, it will probably continue until someone
shuts off one of the switches or breaks a link.
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Assume no SPT on
switches and host B has
been removed
www.hanoictt.com
The BID is used in determining the center of the network known as the root
bridge.
Bridge Priority is usually expressed in decimal format and the MAC address in
the BID is usually expressed in hexadecimal format.
www.hanoictt.com
<= 10Gb
> 10Gb
Bridges use the concept of cost to evaluate how close they are to other bridges.
On a CatOS switch, the first number is 6 bits and the second number is 10 bits.
On an IOS-based switched, both numbers are 8 bits
Lower Port IDs are preferred over higher Port IDs in the STP decision
The Port Priority is a configurable STP parameter (unlike the Port Number). The
values range from 0 to 255 on an IOS-based switch, with a default value of 128.
Port Number is from 0 to 28 = 256
16 bit
IOS
www.hanoictt.com
switch
8 bit 8 bit
Information inside a
BPDU
When a bridge first becomes active, all its ports send BPDUs every 2 seconds (the default
Hello Time). if a port hears about a BPDU from another bridge that is more attractive (use four-
step sequence above) than the BPDU it has been sending, the local port stops sending
BPDUs. If the more-attractive BPDU stops arriving from a neighbor for 20 seconds (the default
Max Age), the local port resumes sending BPDUs. Max Age is the time it takes for the best
BPDU to time out.
Bridges save a copy of only the best BPDU seen on every port.
www.hanoictt.com
After a Root Bridge is decided, configuration BPDUs are only sent by the Root
Bridge. All other bridges must forward or relay the BPDUs, adding their own
Sender Bridge IDs to the message.)
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Root
Bridge
Cost=19 1/1 1/2 Cost=19
Cat-A
Cat-B Cat-C
1/2 1/2
www.hanoictt.com
Cost=19
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
STP Convergence
Step 1 Elect one Root Bridge
When the network first starts, all bridges are announcing a chaotic mix of
BPDUs.
All bridges immediately begin applying the four-step sequence decision process.
Switches need to elect a single Root Bridge.
Switch with the lowest BID wins!
Note: Many texts refer to the term highest priority which is the lowest BID
value.
This is known as the Root War.
www.hanoictt.com
STP Convergence
Step 1 Elect one Root Bridge
Cat-A has the lowest Bridge MAC Address, so it wins the Root War!
All 3 switches have the same default Bridge Priority value of 32,768
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
STP Convergence
Step 1 Elect one Root Bridge
Its all done with BPDUs!
www.hanoictt.com
STP Convergence
Step 1 Elect one Root Bridge
BPDU
802.3 Header
Destination: 01:80:C2:00:00:00 Mcast 802.1d Bridge group
Source: 00:D0:C0:F5:18:D1
LLC Length: 38
802.2 Logical Link Control (LLC) Header
Dest. SAP: 0x42 802.1 Bridge Spanning Tree
Source SAP: 0x42 802.1 Bridge Spanning Tree
Command: 0x03 Unnumbered Information
802.1 - Bridge Spanning Tree
Protocol Identifier: 0
Protocol Version ID: 0
Message Type: 0 Configuration Message
Flags: %00000000
Root Priority/ID: 0x8000/ 00:D0:C0:F5:18:C0
Cost Of Path To Root: 0x00000000 (0)
www.hanoictt.com
STP Convergence
Step 1 Elect one Root Bridge
At the beginning, all bridges assume they are the center of the universe and
declare themselves as the Root Bridge, by placing its own BID in the Root BID
field of the BPDU.
www.hanoictt.com
STP Convergence
Step 1 Elect one Root Bridge
www.hanoictt.com
Once all of the switches see that Cat-A has the lowest BID, they are
all in agreement that Cat-A is the Root Bridge.
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
STP Convergence
Step 2 Elect Root Ports
Now that the Root War has been won, switches move on to selecting Root
Ports.
A bridges Root Port is the port closest to the Root Bridge.
Bridges use the cost to determine closeness.
Every non-Root Bridge will select one Root Port!
Specifically, bridges track the Root Path Cost, the cumulative cost of all links to
the Root Bridge.
www.hanoictt.com
Root
Bridge
Cost=19 1/1 1/2 Cost=19
Cat-A
BPDU BPDU
Cost=0 Cost=0
BPDU BPDU
1/1
Cost=0+19=19 Cost=0+19=19 1/1
Cat-B Cat-C
1/2 1/2
Step 1 Cost=19
www.hanoictt.com
Root
Bridge
Cost=19 1/1 1/2 Cost=19
Cat-A
BPDU BPDU
Cost=0 Cost=0
BPDU BPDU
1/1
Cost=19 Cost=19 1/1
Cat-B Cat-C
1/2 BPDU BPDU 1/2
BPDU Cost=19 Cost=19 BPDU
Cost=38 (19=19) Cost=38 (19=19)
Step 3 Cost=19
www.hanoictt.com
Cat-B uses this value of 19 internally and sends BPDUs with a Root Path Cost of 19
out Port 1/2.
Step 4
Cat-C receives the BPDU from Cat-B, and increased the Root Path Cost to 38 (19+19).
(Same with Cat-C sending to Cat-B.)
Root
Bridge
Cost=19 1/1 1/2 Cost=19
Cat-B Cat-C
1/2 1/2
BPDU BPDU
Cost=38 (19=19) Cost=38 (19=19)
Cost=19
www.hanoictt.com
Step 5
Cat-B calculates that it can reach the Root Bridge at a cost of 19 via Port 1/1 as
opposed to a cost of 38 via Port 1/2.
Port 1/1 becomes the Root Port for Cat-B, the port closest to the Root Bridge.
Cat-C goes through a similar calculation. Note: Both Cat-B:1/2 and Cat-C:1/2 save the
best BPDU of 19 (its own).
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
STP Convergence
Step 3 Elect Designated Ports
The loop prevention part of STP becomes evident during this step, electing
designated ports.
A Designated Port functions as the single bridge port that both sends and receives
traffic to and from that segment and the Root Bridge.
Root Path Cost, the cumulative cost of all links to the Root Bridge.
Segment 1 Segment 2
Cat-A
Cat-B Cat-C
1/2 1/2
Root Path Cost = 19 Root Path Cost = 19
Segment 3
Cost=19
www.hanoictt.com
Segment 1: Cat-A:1/1 has a Root Path Cost = 0 (after all it is the Root Bridge) and Cat-
B:1/1 has a Root Path Cost = 19.
Segment 2: Cat-A:1/2 has a Root Path Cost = 0 (after all it is the Root Bridge) and Cat-
C:1/1 has a Root Path Cost = 19.
Segment 3: Cat-B:1/2 has a Root Path Cost = 19 and Cat-C:1/2 has a Root Path Cost =
19. Its a tie!
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Root
Root Path Cost = 0 Bridge Root Path Cost = 0
Cost=19 1/1 1/2 Cost=19
Segment 1 Segment 2
Cat-A
Designated Port Designated Port
Cat-B Cat-C
1/2 1/2
Root Path Cost = 19 Root Path Cost = 19
Segment 3
Segment 1 Cost=19
www.hanoictt.com
Because Cat-A:1/1 has the lower Root Path Cost it becomes the Designate Port for
Segment 1.
Segment 2
Because Cat-A:1/2 has the lower Root Path Cost it becomes the Designate Port for
Segment 2.
Segment 1 Segment 2
Cat-A
Designated Port Designated Port
Cat-B Cat-C
1/2 1/2
Root Path Cost = 19 Root Path Cost = 19
Segment 3
Segment 3 Cost=19
www.hanoictt.com
Both Cat-B and Cat-C have a Root Path Cost of 19, a tie!
When faced with a tie (or any other determination) STP always uses the four-step
decision process:
1. Lowest Root BID; 2. Lowest Path Cost to Root Bridge;
3. Lowest Sender BID; 4. Lowest Port ID
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Root
Root Path Cost = 0 Bridge Root Path Cost = 0
Cost=19 1/1 1/2 Cost=19
Segment 1 Segment 2
Cat-A
All port on Designated Port Designated Port
Root bridge will
Be designated port
1) All three switches agree that Cat-A is the Root Bridge, so this is a tie.
2) Root Path Cost for both is 19, also a tie.
3) The senders BID is lower on Cat-B, than Cat-C, so Cat-B:1/2 becomes the Designated Port for
Segment 3.
Cat-C:1/2 therefore becomes the non-Designated Port for Segment 3.
Port Cost/Port ID
0/2
0/1
If the path cost and bridge IDs are equal (as in the case of parallel links), the
www.hanoictt.com
STP Convergence
Recap
Recall that switches go through three steps for their initial convergence:
STP Convergence
Step 1 Elect one Root Bridge
Step 2 Elect Root Ports
Step 3 Elect Designated Ports
Also, all STP decisions are based on a the following predetermined
sequence:
Four-
Four-Step decision Sequence
Step 1 - Lowest BID
Step 2 - Lowest Path Cost to Root Bridge
www.hanoictt.com
STP Convergence
Recap
Example:
A network that contains 15 switches and 146 segments (every switchport is a
unique segment) would result in:
1 Root Bridge
14 Root Ports
146 Designated Ports
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Blocked:
All ports start in blocked mode in order to prevent the bridge from creating a bridging
loop.
Port are listening (receiving) BPDUs. Does not transmit BPDUs
No user frame data is being sent/received.
The port stays in a blocked state if Spanning Tree determines that there is a better path
to the root bridge.
May take a port up to 20 seconds to transition out of this state (max age). - coming soon.
www.hanoictt.com
Receives and responds to network management messages but does not transmit them
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Listen:
The port transitions from the blocked state to the listen state
Attempts to learn whether there are any other paths to the root bridge
Listens to frames (sending and receiving BPDUs)
Port is not sending or receive user data
Listens for a period of time called the forward delay (default 15 seconds).
Ports that lose the Designated Port election become non-Designated Ports and drop
back to Blocking state.
Receives and responds to network management messages
www.hanoictt.com
Non-Designated Ports
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Learn:
The learn state is very similar to the listen state, except that the port can add
information it has learned to its address table.
Gathering information, such as the source VLANs of data frames. The Learning
state reduces the amount of flooding required when data forwarding begins.
Adds addresses to MAC Address Table
Still not allowed to send or receive user data
Learns for a period of time called the forward delay (default 15 seconds)
Receives and responds to network management messages
www.hanoictt.com
Forward:
A root port for each switch and a designated port for each segment is selected.
These ports provide the best path from the switch to the root switch (usually
the lowest-cost path).
These ports are put in the forwarding mode.
Ports that will not be forwarding are placed in the blocked state.
These ports will continue to receive BPDU information but will not be
allowed to send or receive data.
2
Listening
5
3
4
1
Disabled or 4
Blocking Learning
Down
2
4
5
6
2
Forwarding
www.hanoictt.com
STP Timers
www.hanoictt.com
STP Timers
The Forward Delay timer also controls the bridge table age-out period
after a change in the active topology.
STP Timers
STP Timers
Modifying Timers
Do not change the default timer values without careful consideration.
Modify the STP timers only from the root bridge
The BPDUs contain three fields where the timer values can be passed
from the root bridge to all other bridges in the network.
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Example
www.hanoictt.com
Hub
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Hub
Cat-B:1/2 fails. Cat-C has no immediate notification because its still receiving a link
from the hub. Cat-C notices it is not receiving BPDUs from Cat-B. 20 seconds (max
Hub
age) after the failure, Cat-C ages out the BPDU that lists Cat-B as having the DP for
segment 3. This causes Cat-C:1/2 to transition into the Listening state in an effort to
become the DP.
50s to take
Indirect
link failure
X Fails
Forwarding
Listening Mode
Mode
Hub
www.hanoictt.com
Because Cat-C:1/2 now offers the most attractive access from the Root
Bridge to this link, it eventually transitions all the way into Forwarding
Hub
mode. In practice this will take 50 seconds (20 max age + 15 Listening +
15 Learning) for Cat-C:1/2 to take over after the failure of Cat-B:1/2.
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Direct link
X Fails
failure
30s to take
Forwarding
Listening Mode
Mode
Hub
BPDU format
IEEE 802.1D Spanning-Tree Protocol BPDU frame
The Routing Information field is only applicable to Cisco Spanning-Tree Protocol BPDU
frames, the Routing Information field must be set to 0x0200.
The Logical Link Control field controls all types of Spanning-Tree Protocol BPDU frames, this
field is set to 0x424203.
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Configuration BPDUs.
Hello Time (2 bytes) A Topology change acknowledgment (TCA)
bit, which is set to acknowledge receipt of
Forward Delay (2 bytes) a configuration message with the TC bit
set.
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
The STP change process requires the switch to clear the table faster in order to get rid
of unreachable physical addresses.
If a switch detects a change, it can send a Topology Change Notification (TCN) BPDU
out its root port.
The topology change BPDU is forwarded to the root switch, and from there, is
propagated throughout the network.
TCN does not start a STP recalculation.
TCN causes: TCA, TC, Root Bridge sets TC in CBPDU for a period of time =
Forward Delay + Max Age
A bridge receiving a TC message from the Root Bridge will use the Forward Delay
timer (15 seconds) to age out entries in the address table (until no more TC
www.hanoictt.com
received). This allows the device to age out entries faster than the normal 5-
minute default so that stations no longer available are aged out faster.
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Remember that a TCN does not start a STP recalculation. This fear comes from the fact
that TCNs are often associated with unstable STP environments; TCNs are a
consequence of this, not a cause. The TCN only has an impact on the aging time; it will
not change the topology nor create a loop.
The number or the rate of topology changes is not an issue in itself. The problem is to
know what the topology change means. A healthy network can experience a high rate of
topology change. Nevertheless, ideally, a topology change would be related to a
significant event in the network like a server going up or down or a link transitioning. This
can be achieved by enabling portfast on ports that are going up and down as part of
their normal operation.
www.hanoictt.com
Host D
Hub
DD-DD DD-DD 1/1
EE-EE 1/1
Host-D is communicating with Host-E, via Cat-B, while Cat-B:1/2 fails. As discussed earlier, Cat-C:1/2
takes over as the DP in 50 seconds. However, without TCN BPDUs, the data traffic continues to be be
www.hanoictt.com
sent to Cat-B for another 4 minutes and 10 seconds. Why? Prior to the failure notice the MAC Address
Tables. All three switches have the traffic traveling counter-clockwise, because Cat-C:1/2 was in
Hub
blocking mode. Although the change in Cat-C:1/2 is in forwarding mode, the MAC Address Tables are
not correctly reflecting the change in STP topology.
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Host D
Hub
DD-DD DD-DD 1/1
EE-EE 1/2
1/1
Config BPDU (TC)
One option is to wait for the normal timeout of this entry in the MAC Address Table, which is 300
seconds (5 minutes). (This is where we got the 4 minutes and 10 seconds, plus 50 seconds for the STP
www.hanoictt.com
timers.) A better solution is for switches to send out TCN BPDUs when there is a change in the
forwarding state of a port, so switches age out their MAC Address Tables from 300 seconds to 15
Hub
seconds (Forward Delay). Doesnt flush MAC Address Table, just accelerates the aging process.
Devices that continue to speak for that 15 seconds will remain in the table. All other frames are flooded
until the switch learns otherwise.
TCN BPDU
Much simpler than a Configuration BPDU.
Only three fields, Protocol ID, Version, and Type (TCN).
Type (TCN)
www.hanoictt.com
STP Enhancements
Enhancements of the IEEE 802.1D specification have been developed in an
attempt to speed up STP alternate path selection because in L3 environment
protocols such as OSPF and EIGRP are able to provide an alternate path in less
time.
It would be advantageous to decrease STP convergence time and reduce the
length of the disruption (while convergence)
PortFast
UplinkFast
BackboneFast
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Access
layer
Use in
Access
layer not
backbone
BackboneFast purpose is short-circuiting the Max Age Timer when needed. Although
this function shortens the time a switch waits to detect a Root Path failure, ports still
must go through full-length Forward Delay Timer intervals during the Listening and
Learning states
While PortFast and UplinkFast enable immediate transitions, BackboneFast can only
reduce the maximum convergence delay from 50 to 30 seconds.
When used, BackboneFast (Cisco proprietary) should be enabled on all switches in
the network because BackboneFast requires the use of the RLQ Request and Reply
mechanism to inform switches of Root Path stability.
The RLQ protocol is active only when BackboneFast is enabled on a switch. By
default,BackboneFast is disabled.
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
STP evolution
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
RSTP states
RSTP is able to actively confirm that a port can safely transition to forwarding
without relying on any timer configuration
There is now a real feedback mechanism that takes place between RSTP-
compliant bridges
New concepts:
Edge ports (Cisco PortFast feature)
Link type
www.hanoictt.com
on directly
d stati
o en transition to
n ect t forwarding
Con
Edge
port Conn
e ct to
s witch becomes a
normal
spanning
tree port
directly
t transition to
poin
t to
Poin forwarding
Link type identify automatically:
Link Full duplex => P-t-P
www.hanoictt.com
type Conn
e Half duplex => shared link
ct to
H UB Shared link,
work as Today, most links are operating in full-duplex
normal mode makes them candidates for rapid transition
to forwarding.
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Blocking port
REALLY
uplink fast usage
alternate path to
the root bridge (Cisco)
Port role is determined by RTSP but its current state may different.
E.g. a port to be designated role but its current state is blocking.
(This will typically happen for very short periods of time, it simply
means that this port is in a transitory state towards designated
forwarding)
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Bridge ID (8 bytes)
Port ID (2 bytes)
Message Age (2 bytes)
Maximum Age (2 bytes)
Hello Time (2 bytes)
Forward Delay (2 bytes)
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Synchronization
RSTP handles the complete STP convergence of the
network as a propagation of handshakes over point-
to-point links. When a switch needs to make an STP
decision, a handshake is made with the nearest
neighbor. After that is successful, the handshake
sequence is moved to the next switch and the next, as
an ever-expanding wave moving toward the networks
edges.
During each handshake sequence, a switch must take
measures to be completely sure it will not introduce a
bridging loop before moving the handshake out. This
is done through a synchronization process.
RSTP convergence
To participate in RSTP
convergence, a switch must decide
the state of each of its ports.
Nonedge ports begin in the
Discarding state. After BPDUs are
exchanged between the switch and
its neighbor, the Root Bridge can
be identified. If a port receives a
superior BPDU from a neighbor,
that port becomes the Root Port.
For each nonedge port, the switch
exchanges a proposal-agreement
handshake to decide the state of
each end of the link. Each switch
assumes that its port should
www.hanoictt.com
A bridge now sends a BPDU with its current information every <hello-time> seconds (2 by
default), even if it does not receive any from the root bridge (not simply relayed anymore).
BPDUs are now used as a keep-alive mechanism between bridges. A bridge considers
that it has lost connectivity to its direct neighboring root or designated bridge if it misses
three BPDUs in a row. ==> quick failure detection, detected even much faster in case
of physical link failures
www.hanoictt.com
E.g. Bridge C still knows the root is alive and well and immediately sends a BPDU to Bridge B
containing information about the root bridge. As a result, Bridge B stops sending its own
BPDUs and accepts the port leading to Bridge C as its new root port.
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Only non-edge ports moving to the Forwarding state cause a topology change. This means
that a loss of connectivity is not considered as a topology change any more, contrarily to
802.1D (that is, a port moving to blocking does no longer generates a TC)
When a RSTP bridge detects a topology change, the following happens:
It starts the TC While timer with a value equal to twice the hello time for all its non-edge
designated ports and its root port if necessary.
It flushes the MAC addresses associated with all these ports.
Note: As long as the TC While timer is running on a port, the BPDUs sent out of that port
have the TC bit set. BPDUs are also sent on the root port while the timer is active.
www.hanoictt.com
It clears the MAC addresses learnt on all its ports except the one that
received the topology change.
It starts the TC While timer and sends BPDUs with TC set on all its
designated ports and root port (RSTP no longer uses the specific TCN
BPDU, unless a legacy bridge needs to be notified).
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Fallback of RSTP
Because RSTP distinguishes its BPDUs from 802.1D BPDUs, it can coexist with
switches still using 802.1D. Each port attempts to operate according to the STP BPDU
that is received.
For example, when an 802.1D BPDU (version 0) is received on a port, that port begins
to operate according to the 802.1D rules. However, each port has a measure that locks
the protocol in use for the duration of the migration delay timer. This keeps the protocol
type from flapping or toggling during a protocol migration. After the timer expires, the
port is free to change protocols if needed.
Types of STP
STP modes: PVST (Per-VLAN Spanning Tree), PVST+, and Mono Spanning Tree
Common spanning tree (CST) is specified in the IEEE 802.1Q standard. CST
defines a single instance of Spanning Tree for all VLANs. CST BPDUs are
transmitted over the native VLAN (VLAN 1) as untagged frames no capability
for load balancing.
Per-VLAN spanning tree (PVST) is a Cisco-proprietary implementation requiring ISL
trunk encapsulation. PVST runs a separate instance of STP for each VLAN. Load
balancing is possible over redundant links when the links are assigned to different
VLANs.
www.hanoictt.com
PVST+
PVST+ provides support for 802.1Q trunks and the mapping of multiple spanning trees
to the single spanning tree of non-Cisco 802.1Q switches.
PVST+ is the default Spanning-Tree Protocol used on all Ethernet, Fast Ethernet, and
Gigabit Ethernet port-based VLANs on Catalyst 4000 and 6000 family switches.
O
on n e T
e
(C S S P
ST TP (M
TP
PV )
on
MISTP Mode
A MISTP instance is a virtual logical topology defined by a set of bridge and port parameters. A MISTP
instance becomes a real topology when VLANs are mapped to it. Each MISTP instance has its own
Root Switch and a different set of forwarding links (that is, different bridge and port parameters). This
Root Switch propagates the information associated with that instance of MISTP to all other switches in
the network.
There is only one BPDU for each MISTP instance, so there is less over-head in the network, a VLAN
can be mapped to only a single MISTP instance.
MISTP discards any PVST+ BPDUs it sees.
MISTP-PVST+ is (Catalyst 4000 and 6000) needed to allow interoperability between PVST+ and
MISTP
www.hanoictt.com
Load balancing
Using load sharing, traffic can be divided between the links according
to which VLAN the traffic belongs.
Load sharing can be configured on trunk ports by using STP port
priorities or STP path costs.
For load sharing using STP port priorities, both load-sharing links
must be connected to the same switch. For load sharing using STP
path costs, each load-sharing link can be connected to the same
switch or to two different switches.
www.hanoictt.com
!
interface FastEthernet0/2
spanning-tree vlan 8 cost 30
spanning-tree vlan 9 cost 30
spanning-tree vlan 10 cost 30
!
BackboneFast is disabled
Default pathcost method used is short
Name Blocking Listening Learning Forwarding STP Active
-------------------- -------- --------- -------- ---------- ----------
34 VLANs 0 0 0 36 36
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Note: Even the root bridge priority is zero, there is still no guarantee, as there might be a bridge with
priority zero and a lower bridge ID.
1 2
Expected
root
New root
unexpected
Enough ?
Let the switch become the Root by automatically choosing a Bridge Priority value:
Switch(config)# spanning-tree vlan vlan-id root {primary | secondary} [diameter
diameter]
NOTE The spanning-tree vlan vlan-id root is actually a macro executing other switch commands. The
actual commands and values produced by the macro will be shown, however. For example, the
macro can potentially adjust the four STP values as follows:
Switch(config)#spanning-tree vlan 1 root primary
vlan 1 bridge priority set to 24576 Better
vlan 1 bridge max aging time unchanged at 20
www.hanoictt.com
EL
SL
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
EL
SL
www.hanoictt.com
Configuring PortFast
When the voice VLAN feature is enabled, the PortFast feature is automatically enabled.
When voice VLAN is disabled, the PortFast feature is not automatically disabled.
Enable this feature if the switch is running PVST or MSTP. The MSTP is available only if
the EI is installed on the switch.
www.hanoictt.com
Configuring UplinkFast
UplinkFast RSTP = Cisco uplink fast
proprietary spanning tree extension.
The 802.1w topology change mechanism
clears the appropriate entries in the
Content Addressable Memory (CAM)
tables of the upstream bridges, no need of
dummy multicast generation
UplinkFast cannot be enabled on VLANs
that have been configured for switch
priority, we must first restore the switch
Restore back
priority on the VLAN to the default value
no spanning-tree uplinkfast max-update-rate
by using the no spanning-tree vlan vlan-
no spanning-tree uplinkfast id priority global configuration command.
Configuring BackboneFast
The BackboneFast feature is supported
only when the switch is running PVST
Must be enabled it on all switches in the
network (supported with other vendors)
www.hanoictt.com
MST is enabled using the spanning-tree mode mst global configuration command,
RSTP is enabled but Per-VLAN RSTP is not supported (PVRST)
Only one version can be active at any time (PVST, PVST+, MSTP)
VTP doesnt work with MST. Manually configure the MST configuration (region
name, revision number, and VLAN-to-instance mapping) on each switch using CLI or
SNMP
For load balancing across redundant paths, all VLAN-to-instance mapping
assignments must match. Otherwise, all traffic flows on a single link
Should not partition the network into a large number of regions if this situation is
unavoidable, the switched LAN be partitioned into smaller LANs interconnected by
routers or non-Layer 2 devices
www.hanoictt.com
It may be necessary to manually configure the switches (IST master, PVST+ , MST
regions )
Example
Remove config.
no spanning-tree mst configuration
no instance instance-id [vlan vlan-
range]
no name
To re-enable PVST, use the no
spanning-tree mode or the
www.hanoictt.com
EtherChannel
www.hanoictt.com
EtherChannel background
EtherChannel is a Cisco-proprietary, "resiliency" with disaster link, hardware.
Standard EtherChannel (2-8 links)
Fast EtherChannel (FEC) (2-8 links) Depends on platform &
Gigabit EtherChannel (GEC) (2-8 links) IOS
10-Gigabit EtherChannel (2-8 links)
Ethernet trunks frequently go with EtherChannel links
All ports in each EtherChannel must be the same speed
www.hanoictt.com
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
Benefits of EtherChannel
Transparent to networked applications
Operates as either an access link or trunk link
Load balancing transparently across multiple links
Automatic recovery for loss of a link
www.hanoictt.com
Frame distribution
EtherChannel frame distribution uses a Cisco-proprietary hashing algorithm. The
algorithm is deterministic; if you use the same addresses and session
information, you always hash to the same port in the channel. This method
prevents out-of-order packet delivery.
Distribution based on source only (MAC, IP, or port), destination only (MAC, IP,
or port), or both source and destination (MAC, IP, or port)
destination
source
destination
source
IP IP
www.hanoictt.com
MAC MAC
port port
hash hash
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N
EtherChannel methods
www.hanoictt.com
ports
Etherchannel modes
www.hanoictt.com
It is preferable to set STP port costs to be equal for all ports in an EtherChannel (different STP
Port Costs can form an EtherChannel as long as they are compatible )
HANOICTT NETWORKING ACADEMY
CCNA
P SSeem
meesstteerr13 - B C M S N