STP PDF
STP PDF
1
Again, this frame will travel to all nodes on the lower Ethernet
segment, including Cat-2:Port1/2 (Step 4). Cat-2 will flood the
broadcast frame out Port 1/1 (Step 5) and, once again, the frame will
show up at Cat-1:Port-1/1 (Step 6). Cat-1, being a good little switch,
will follow orders and send the frame out Port 1/2 for the second time
(Step 7). By now I think you can see the pattern—there is a pretty
good loop going on here.
Additionally, notice that Figure 6-2 quietly ignored the broadcast that
arrived at Cat-2:Port-1/1 back in Step 2. This frame would have also
been flooded onto the bottom Ethernet segment and created a loop in
the reverse direction. In other words, don't forget that this "feedback"
loop would occur in both directions.
Figure 6-4 Without STP, Even Unicast Frames Can Loop and
Corrupt Bridging Tables
2
For example, suppose that Host-A, possessing a prior ARP entry for
Host-B, wants to send a unicast Ping packet to Host-B. However,
Host-B has been temporarily removed from the network, and the
corresponding bridge-table entries in the switches have been flushed
for Host-B. Assume that both switches are not running STP. As with
the previous example, the frame travels to Port 1/1 on both switches
(Step 2), but the text only considers things from Cat-1's point of view.
Because Host-C is down, Cat-1 does not have an entry for the MAC
address BB-BB-BB-BB-BB-BB in its bridging table, and it floods the
frame (Step 3). In Step 4, Cat-2 receives the frame on Port 1/2. Two
things (both bad) happen at this point:
As frames loop in the reverse direction (recall that the feedback loop
exists in both directions), you actually see Host-A's MAC address
flipping between Port 1/1 and Port 1/2.
3
Two Key Spanning-Tree Protocol Concepts
Bridge ID (BID)
Path Cost
Bridge IDs
Path Cost
Bridges use the concept of cost to evaluate how close they are to
other bridges. 802.1D originally defined cost as 1000 Mbps divided by
the bandwidth of the link in Mbps. For example, a 10BaseT link has a
cost of 100 (1000/10), Fast Ethernet and FDDI use a cost of 10
(1000/100).
4
622 Mbps 6
1 Gbps 4
10 Gbps 2
Tip
In addition, this "saving the best BPDU" process also controls the
sending of BPDUs. When a bridge first becomes active, all of its ports
are sending BPDUs every 2 seconds (when using the default timer
5
values). However, if a port hears a BPDU from another bridge that is
more attractive than the BPDU it has been sending, the local port
stops sending BPDUs. If the more attractive BPDU stops arriving
from a neighbor for a period of time (20 seconds by default), the local
port can once again resume the sending of BPDUs.
Note
When the network first starts, all of the bridges are announcing a
chaotic mix of BPDU information. However, the bridges immediately
begin applying the four-step decision sequence discussed in the
previous section. This allows the bridges to hone in on the set of
BPDUs that form a single tree spanning the entire network. A single
Root Bridge is elected to act as the "center of the universe" for
this network (Step 1). All of the remaining bridges calculate a set
of Root Ports (Step 2) and Designated Ports (Step 3) to build a
loop-free topology. You can think of the resulting topology as a
wheel—the Root Bridge is the hub with loop-free active paths
(spokes) radiating outward. In a steady-state network, BPDUs flow
from the Root Bridge outward along these loop-free spokes to every
segment in the network.
6
After the network has converged on a loop-free active topology
utilizing this three-step process, additional changes are handled using
the Topology Change process. This subject is covered later in the
"Topology Change Process" section.
For the discussion that follows in the rest of the chapter, refer to
Figure 6-6 as the model layout of a three switches/bridges network.
The switches first need to elect a single Root Bridge by looking for
the bridge with the lowest Bridge ID (BID). Remember, in "STP
economics", the lowest BID wins! This process of selecting the bridge
with the lowest BID often goes by the exciting title of a Root War.
7
Okay, but how did the bridges learn that Cat-A had the lowest BID?
This is accomplished through the exchange of BPDUs. As discussed
earlier, BPDUs are special packets that bridges use to exchange
topology and Spanning Tree information with each other. By default,
BPDUs are sent out every two seconds. BPDUs are bridge-to-bridge
traffic; they do not carry any end-user traffic (such as Doom or, if you
are boring, e-mail traffic). Figure 6-8 illustrates the basic layout of a
BPDU. (BPDU formats are covered in detail in the "Two Types of
BPDUs" section.)
8
real names come later). When a bridge generates a BPDU every 2
seconds, it places who it thinks is the Root Bridge at that instant in
time in the Root BID field. The bridge always places its own BID in
the Sender BID field.
Tip
It turns out that a bridge is a lot like a human in that it starts out
assuming that the world revolves around itself. In other words, when
a bridge first boots, it always places its BID in both the Root BID and
the Sender BID fields. Suppose that Cat-B boots first and starts
sending out BPDUs announcing itself as the Root Bridge every 2
seconds. A few minutes later, Cat-C boots and boldly announces
itself as the Root Bridge. When Cat-C's BPDU arrives at Cat-B, Cat-B
discards the BPDU because it has a lower BID saved on its ports (its
own BID). As soon as Cat-B transmits a BPDU, Cat-C learns that it is
not quite as important as it initially assumed. At this point, Cat-C
starts sending BPDUs that list Cat-B as the Root BID and Cat-C as
the Sender BID. The network is now in agreement that Cat-B is the
Root Bridge.
Five minutes later Cat-A boots. As you saw with Cat-B earlier, Cat-A
initially assumes that it is the Root Bridge and starts advertising this
fact in BPDUs. As soon as these BPDUs arrive at Cat-B and Cat-C,
these switches abdicate the Root Bridge position to Cat-A. All three
switches are now sending out BPDUs that announce Cat-A as the
Root Bridge and themselves as the Sender BID.
After the bloodshed of the Root War is behind them, the switches
move on to selecting Root Ports. A bridge's Root Port is the port that
is closest to the Root Bridge. Every non-RootBridge must select one
Root Port.
9
Tip
Figure 6-9 Every Non-Root Bridge Must Select One Root Port
When Cat-A (the Root Bridge) sends out BPDUs, they contain a Root
Path Cost of 0 (Step 1). When Cat-B receives these BPDUs, it adds
the Path Cost of Port 1/1 to the Root Path Cost contained in the
received BPDU. Assume the network is running Catalyst 5000 switch
code greater than version 2.4 and that all three links in Figure 6-9
are Fast Ethernet. Cat-B receives a Root Path Cost of 0 and adds in
10
Port 1/1's cost of 19 (Step 2). Cat-B then uses the value of 19
internally and sends BPDUs with a Root Path Cost of 19 out Port 1/2
(Step 3).
When Cat-C receives these BPDUs from Cat-B (Step 4), it increases
the Root Path Cost to 38 (19+19). However, Cat-C is also receiving
BPDUs from the Root Bridge on Port 1/1. These enter Cat-C:Port-1/1
with a cost of 0, and Cat-C increases the cost to 19 internally (Step
5). Cat-C has a decision to make: it must select a single Root Port,
the port that is closest to the Root Bridge. Cat-C sees a Root Path
Cost of 19 on Port 1/1 and 38 on Port 1/2—Cat-C:Port-1/1 becomes
the Root Port (Step 6). Cat-C then begins advertising this Root Path
Cost of 19 to downstream switches (Step 7).
Although not detailed in Figure 6-9, Cat-B goes through a similar set
of calculations: Cat-B:Port-1/1 can reach the Root Bridge at a cost of
19, whereas Cat-B:Port-1/2 calculates a cost of 38…Port-1/1
becomes the Root Port for Cat-B. Notice that costs are incremented
as BPDUs are received on a port.
Tip
Tip
11
field. In a bridge, this value is calculated by adding the
receiving port's Path Cost to the value contained in the
BPDU.
The loop prevention part of STP becomes obvious during the third
step of initial STP convergence: electing Designated Ports. Each
segment in a bridged network has one Designated Port. This port
functions as the single bridge port that both sends and receives traffic
to and from that segment and the Root Bridge. The idea is that if only
one port handles traffic for each link, all of the loops have been
broken! The bridge containing the Designated Port for a given
segment is referred to as the Designated Bridge for that segment.
As with the Root Port selection, the Designated Ports are chosen
based on cumulative Root Path Cost to the Root Bridge (see Figure
6-10).
12
To locate the Designated Ports, take a look at each segment in turn.
First look at Segment 1, the link between Cat-A and Cat-B. There are
2 bridge ports on the segment: Cat-A:Port-1/1 and Cat-B:Port-1/1.
Cat-A:Port-1/1 has a Root Path Cost of 0 (after all, it is the Root
Bridge), whereas Cat-B:Port-1/1 has a Root Path Cost of 19 (the
value 0 received in BPDUs from Cat-A plus the Path Cost of 19
assigned to Cat-B:Port1/1). Because Cat-A:Port-1/1 has the lower
Root Path Cost, it becomes the Designated Port for this link.
13
Designated Port for Segment 3. Cat-C:Port-1/2 therefore becomes a
non-Designated Port.
First, the bridged network elects a single Root Bridge. Second, every
non-Root Bridge elects a single Root Port, the port that is the closest
to the Root Bridge. Third, the bridges elect a single Designated Port
for every segment.
14
Table 6-4 documents the symbols used throughout the book to
represent Spanning Tree states.
15
Figure 6-14 Using show spantree to Locate t he Root Bridge
16
One Root Bridge, three Root Ports, and 404 Designated Ports (one
per segment, including the 400 segments connected to end users)
17
18
The network is partitioned into two halves. Each half elects its
own Root Bridge. There is a partial outage of approximately 50
19
seconds. After the Root Bridges have been established, connectivity
resumes within the two halves, but the two halves cannot
communicate.
20
Learning Building bridging table
Listening Building "active" topology
Blocking Receives BPDUs only
Disabled Administratively down
21
Three STP Timers
22
For example, assume that the Segment 3 link in Figure 6-12 uses a
hub and Cat-B:Port-1/2's transceiver falls out. Cat-C has no
immediate notification of the failure because it's still receiving
Ethernet link from the hub. The only thing Cat-C notices is that
BPDUs stop arriving. Twenty seconds (Max Age) after the failure,
Cat-C:Port-1/2 ages out the stale BPDU information that lists Cat-B
as having the best Designated Port for Segment 3. This causes Cat-
C:Port-1/2 to transition into the Listening state in an effort to become
the Designated Port. Because Cat-C:Port-1/2 now offers the most
attractive access from the Root Bridge to this link, it eventually
transitions all the way into Forwarding mode. In practice, it takes 50
seconds (20 Max Age + 15 Listening + 15 Learning) for Cat-C to take
over after the failure of Port 1/2 on Cat-B.
23
Figure 6-13 Failure of a Link Directly Connected to the Root Port
of Cat-C
24
goes into Learning mode in an attempt to become the new Root Port.
This has the effect of reducing the STP convergence time from 50
seconds to 30 seconds (15 Listening + 15 Learning).
Tip
You can only modify the timer values from the Root Bridge.
Modifying the values on other bridges has no effect. However,
don't forget to update any "backup" Root Bridges.
Look at Figure 6-20 for a more complex topology, and see how all
this STP detail adds up in the real world.
25
26
Figure 6-20 illustrates a network of seven switches connected in a
highly redundant (that is, looped) configuration. Link costs are
indicated—all are Fast Ethernet (cost of 19) except for the vertical link
on the far left that is 10BaseT (cost of 100).
Assuming that Cat-4 wins the Root War, Figure 6-21 shows the
active topology that results.
27
28
The setup in Figure 6-21 clearly illustrates the basic objective of the
Spanning-Tree Protocol: make one bridge the center of the universe
and then have all other bridges locate the shortest path to that
location ("all roads lead to Rome"). This results in an active topology
consisting of spoke-like branches that radiate out from the Root
Bridge.
Notice that the Root Bridge is acting as the central switching station
for all traffic between the four branches and must be capable of
carrying this increased load. For example, Cat-7 and Cat-5 on
Branch-D must send all traffic through the Root Bridge (Cat-4) to
reach any of the other switches. In other words, don't use your
slowest bridge in place of Cat-4!
29
30
In this scenario, the network has converged into two branches with all
traffic flowing through the Root Bridge. However, notice how
suboptimal the flows are—Doom traffic between Host-A and Host-B
must now flow through all seven bridges!
Types of STP
So far, this chapter has discussed STP in terms of its operation to
prevent loops and to recover
from topology changes in a timely manner. STP was originally
developed to operate in a bridged
environment, basically supporting a single LAN (or one VLAN).
Implementing STP into a switched
environment has required additional consideration and modification to
support multiple VLANs.
Because of this, the IEEE and Cisco have approached STP
differently. This section reviews the three traditional types of STP that
are encountered in switched networks and how they relate to one
another. No specific configuration commands are associated with the
various types of STP. Rather,you need a basic understanding of how
they interoperate in a network.
31
Cisco has a proprietary version of STP that offers more flexibility than
the CST version. Per-VLAN
Spanning Tree (PVST) operates a separate instance of STP for each
individual VLAN. This allows the STP on each VLAN to be configured
independently, offering better performance and tuning for specific
conditions. Multiple Spanning Trees also make load balancing
possible over redundant links when the links are assigned to different
VLANs.
Due to its proprietary nature, PVST requires the use of Cisco Inter-
Switch Link (ISL) trunking
encapsulation between switches. In networks where PVST and CST
coexist, interoperability
problems occur. Each requires a different trunking method, so
BPDUs will never be exchanged between STP types.
32
33
34
35
36
Two Types of BPDUs
To this point, the chapter has referred to all BPDUs as a single type.
Actually, there are two types of BPDUs:
Configuration BPDUs
Topology Change Notification (TCN) BPDUs
37
Bridge. Topology Change Notification BPDUs flow upstream (toward
the Root Bridge) to alert the Root Bridge that the active topology has
changed.
38
illustrates how this process propagates Configuration BPDUs away
from the Root Bridge.
39
Exception Configuration BPDU Processing
Figure 7-5 The Root Bridge Failed Just Before Cat-C Was
Connected
40
such. Because the Root Bridge is currently down, Cat-B:Port-1/2 has
stopped sending Configuration BPDUs as a part of the normal
processing. However, because Cat-B:Port-1/2 is the Designated Port
for this segment, it immediately responds with a Configuration BPDU
announcing Cat-A as the Root Bridge. By doing so, Cat-B prevents
Cat-C from accidentally trying to become the Root Bridge or creating
loops in the active topology.
Tip
41
When non-Root Bridges receive a Configuration BPDU
on their Root Port, they send (propagate) updated
Configuration BPDUs on all of their Designated Ports
(normal processing).
When a Designated Port hears an inferior Configuration
BPDU from another switch, it sends a Configuration
BPDU of its own to suppress the less attractive
information.
TCN BPDUs are sent in three cases. It is useful to group these into
two categories, change detection and propagation:
Change detection—
Occurs in the event that a bridge port is put into the Forwarding
state and the bridge has at least one Designated Port. Change
detection also occurs when a port in the Forwarding or Learning
states transitions to the Blocking state.
Propagation—
42
The first two conditions categorized under change detection
constitute a change in the active topology that needs to be reflected
in bridging tables throughout the network. The last condition is used
to propagate TCN BPDUs up through the branches of the Spanning
Tree until they reach the Root Bridge.
Tip
43
TCN BPDUs are acknowledged even if the normal
Configuration BPDU processing discussed earlier has stopped
(because the flow of Configuration BPDUs from the Root Bridge
has stopped flowing).
Spanning tree operation requires that each switch have a unique BID. In the
original 802.1D
standard, the BID was composed of the Priority Field and the MAC address
of the switch, and
all VLANs were represented by a CST. Because PVST requires that a
separate instance of
spanning tree run for each VLAN, the BID field is required to carry
VLAN ID (VID)
information. This is accomplished by reusing a portion of the Priority
field as the extended
system ID to carry a VID.
To accommodate the extended system ID, the original 802.1D 16-bit Bridge
Priority field is
split into two fields, resulting in these components in the BID:
44
Bridge Priority: A 4-bit field still used to carry bridge priority. Because of
the limited bit
count, priority is now conveyed in discreet values in increments of 4096
rather than
discreet values in increments of 1, as they would be with the full 16-bit
field available. The
default priority, in accordance with IEEE 802.1D, is 32,768, which is the
midrange value.
Extended System ID: A 12-bit field carrying, in this case, the VID for
PVST.
MAC Address: A 6-byte field with the MAC address of a single switch.
By virtue of the MAC address, a BID is always unique. When the priority
and extended system
ID are appended to the switch MAC address, each VLAN on the switch can
be represented by a
unique BID.
If no priority has been configured, every switch will have the same default
priority, and the
election of the root for each VLAN will be based on the MAC address. This
is a fairly random
means of selecting the ideal root bridge; for this reason, it is advisable to
assign a lower priority
to the switch that should serve as root bridge.
45
Only four bits are now used to set the bridge priority. Because of the
limited bit count, priority is now configurable only in increments of
4096.
A switch responds with possible priority values if an incorrect value is
entered:
Switch(config)#spanning-tree vlan 1 priority 1234
% Bridge Priority must be in increments of 4096.
% Allowed values are:
0 4096 8192 12288 16384 20480 24576 28672
32768 36864 40960 45056 49152 53248 57344 61440
If no priority has been configured, every switch will have the same
default priority of
32768.
Assuming that all other switches are at default priority, the spanning-
tree vlan vlan-id
root primary command will set a value of 24576.
Assuming that all other switches are at default priority, the spanning-
tree vlan vlan-id
root secondary command will set a value of 28672.
46
The switch with the lowest BID becomes the root bridge for a VLAN.
Specific configuration
commands are used to determine which switch will become the root bridge.
To configure a switch to become the root bridge for a specified VLAN, use
the command
spanning-tree vlan vlan-ID root primary.
47
A secondary root is a switch that may become the root bridge for a VLAN if
the primary root
bridge fails. To configure a switch as the secondary root bridge for the
VLAN, use the
command spanning-tree vlan vlan-ID root secondary. Assuming that the
other bridges in the
VLAN retain their default STP priority, this switch will become the root
bridge in the event that
the primary root bridge fails. This command can be executed on more
than one switch to
configure multiple backup root bridges.
48
Use the following interface configuration command to set a switch port’s
path cost:
Switch (config-if)# spanning-tree [vlan vlan-id] cost cost
If the vlan parameter is given, the port cost is modified only for the specified
VLAN. Otherwise, the
cost is modified for the port as a whole (all active VLANs). Table 10-2 lists
the cost value ranges
from 1 to 65,535, according to the standard IEEE values.
49
Obviously, switch port’s Port Number is fixed because it is based on
hardware location. The Port ID,
however, can be modified to influence an STP decision by using the Port
Priority. You can configure
the Port Priority with this interface configuration command:
You can modify the Port Priority for a specific VLAN by using the vlan
parameter. Otherwise, the
Port Priority is set for the port as a whole (all active VLANs). The value of
port-priority can range
from 0 to 255 and defaults to 128.
50
This network contains two VLANs. Cat-A is the Root Bridge for VLAN
2, and Cat-B is the Root Bridge for VLAN 3. From Cat-C's
perspective, the available bandwidth to the servers has been
doubled. First, examine VLAN 2. Cat-C has two possible paths to the
Root Bridge: Cat-C:Port-1/1 can reach the Root Bridge with a cost of
19, whereas Cat-C:Port-1/2 can get there at a cost of 38. Obviously,
Port 1/1 is chosen as Cat-C's Root Port for VLAN 2. VLAN 3 also has
two paths to the Root Bridge, but this time the costs are reversed: 38
through Port 1/1 and 19 through Port 1/2. Therefore, VLAN 3's traffic
uses Cat-C:Port-1/2. Both links are active and carrying traffic.
However, if either link fails, Spanning Tree places all bandwidth on
the remaining link to maintain connectivity throughout the network.
51
defined (or understood) for this technique to be effective. In other
cases, the traffic between the VLANs is too similar.
52
shows the active topology for the Sales VLAN. By placing the
Root Bridge at the servers, the Spanning Tree topology
automatically mirrors the traffic flow. Part C of Figure 7-12
shows the active topology for the Human Resources VLAN.
Again, the paths are optimal for traffic destined to the servers in
that VLAN. Consider what happens if the Root Bridges for both
VLANs are placed on Cat-F. This forces a large percentage of the
Sales VLAN's traffic to take an inefficient path through Cat-F.
The first command lowers the Bridge Priority on Cat-A to 100 for
VLAN 2 (the Sales VLAN) so that it wins the Root Bridge election. In
53
a similar fashion, the second command configures Cat-F to be the
Root Bridge for VLAN 3 (the Human Resources VLAN).
54
a tie. In an effort to break the tie, Cat-A considers the Sending
BID that it is receiving over both links. However, both ports are
connected to the same bridge, causing Cat-A to receive the
same Sending BID (100.BB-BB-BB-BB-BB-BB) on both links.
This results in another tie. Finally, Cat-A evaluates the Port ID
values received in Configuration BPDUs on both ports. Cat-
A:Port-1/1 is receiving a Port ID of 0x8001, and Cat-A:Port-1/2 is
receiving a Port ID of 0x8002. Cat-A chooses the lower value for
a Root Port, causing it to send all traffic out Port 1/1 while
Blocking on Port 1/2.
Note
55
Recall that all ports on the Root Bridge become Designated
Ports and enter the Forwarding state. Therefore, it is the non-
Root Bridge that must select a single Root Port and place the
other port in a Blocking state. It is precisely this decision
process that must be influenced to implement load balancing.
Second, it is the received values that are being used here. Cat-A
is not evaluating its own BID and Port ID; it is looking at the
values contained in the BPDUs being received from Cat-B.
Note
56
Figure 7-14 Using the Local Port ID Value As a Tie-
Breaker
How does all this bit-twiddling cause traffic to flow across multiple
paths? Figure 7-16 redraws the VLANs originally presented in
Figure 7-13 to locate the Root Bridge for both VLANs on Cat-B.
57
As was the case with Part A of Figure 7-13, the default
Configuration BPDUs received on Port 1/1 of Cat-A contains a Port
ID of 0x8001, but Port 1/2 receives the value 0x8002. Because
0x8001 is lower, Port 1/1 becames the Root Port for all VLANs by
default. However, if you lower VLAN 3's Port Priority to 31 on Cat-
B:Port-1/2, it lowers the Port ID that Cat-A:Port-1/2 receives for VLAN
3 to 0x7C01. Because 0x7C01 is less than 0x8001, Cat-A now elects
Port 1/2 as the Root Port for VLAN 3 and sends traffic over this link.
The syntax to implement this change is as follows:
Voilá, you have load balancing—VLAN 2 is using the left link and
VLAN 3 is using the right link.
Tip
Note that the portvlanpri value must be less than the value
specified by portpri.
58
By default, Cat-A is already sending traffic over the 1/1 link, so it is
not necessary to add any commands to influence this behavior.
However, it is probably a good idea to explicitly put in the command
so that you can document your intentions and avoid surprises later:
This command lowers Cat-B's Port Priority on Port 1/1 to 31 for VLAN
2 and reinforces Cat-A's default behavior of sending traffic over this
link for VLAN 2.
PortFast
This magic only occurs when the port first initializes. If the port
is forced into the Blocking state for some reason and later needs
to return to the Forwarding state, the usual Listening and
Learning processing is done.
You will probably run into people who recommend that you only
enable PortFast if it is absolutely necessary. The stern warning that
Catalysts issue when you enable this feature backs up this opinion:
59
Warning: Spantree port fast start should only be
enabled on ports connected
to a single host. Connecting hubs, concentrators,
switches, bridges, etc. to
a fast start port can cause temporary Spanning Tree
loops. Use with caution.
Tip
Tip
60
Finally, you cannot use PortFast on trunk ports. Although
Catalysts allow the command to be entered on trunk links, it is
ignored. In short, PortFast is like any other power tool: it is
extremely useful, but only if used correctly.
Tip
UplinkFast
UplinkFast is an exciting feature that Cisco rolled out in the 3.1 NMP
release. This exclusive feature (it is patented) allows wiring closet
switches to converge in two to three seconds!
61
Cat-D is an IDF switch that is connected to two MDF switches
(Cat-B and Cat-C). Although set spantree uplinkfast is a global
command that applies to all VLANs, this section only analyzes a
single VLAN: VLAN 2. Cat-A, the server farm switch, is the Root
Bridge for VLAN 2. Cat-D has two uplink ports that are potential
Root Port candidates. Utilizing the load balancing techniques
discussed earlier, the cost on Port 1/2 has been increased to
62
1000 to force VLAN 2's traffic across the 1/1 link. Notice that Port
1/1 becomes the Root Port. UplinkFast is then enabled on Cat-D with
the following command:
This causes Cat-D to notice that Port 1/2 is Blocking and therefore
constitutes a redundant connection to the Root Bridge. By making a
note of this backup uplink port, Cat-D can set itself up for a quick
rollover in the event that Port 1/1 fails. The list of potential uplink ports
can be viewed with the show spantree uplinkfast command as in
Example 7-15.
Tip
Tip
63
To enforce the requirement of leaf-node status, Cisco modifies
several STP parameters when UplinkFast is enabled. Take a look at
the output of the set spantree uplinkfast command in Example 7-
16.
Notice the third line in the output in Example 7-16 (in bold).
This is evidence of a subtle trick that is the crux of what
UplinkFast is all about. It should probably be fairly obvious by
now that a failure on Cat-D:Port-1/1 forces Cat-D to take all MAC
addresses associated with Port 1/1 in the Bridging Table and
points them to Port 1/2. However, a more subtle process must
take place to convert the bridging tables in other switches. Why
is this extra step necessary? Figure 7-23 shows the network
with the left-hand link broken.
64
Cat-D changes MAC address 00-AA-00-12-34-56 (Host-A) to Port
1/2 so that it has a correct view of the network. However, notice
that Cat-A, Cat-B, and Cat-C are still trying to send traffic for 00-
00-1D-2B-DE-AD (Host-B) to the broken link! This is where the
real ingenuity of UplinkFast comes in: Cat-D sends out a dummy
multicast frame for the addresses in its local Bridging Table.
One frame is sent for each MAC address that is not associated
with one of the uplink ports. These packets are sent to a
multicast 01-00-0C-CD-CD-CD destination address to ensure that
they are flooded throughout the bridged network. Recall from
Chapter 3 that multicast addresses are flooded as with broadcast
frames. However, note that Cisco does not use the traditional
multicast address of 01-00-0C-CC-CC-CC. Because this multicast
address is reserved for single hop protocols such as Cisco Discovery
Protocol (CDP), VLAN Trunk Protocol (VTP), Dynamic ISL (DISL),
and Dynamic Trunk Protocol (DTP), Cisco devices have been
65
programmed to not flood the 01-00-0C-CC-CC-CC. To avoid this
behavior, a new multicast address needed to be introduced.
BackboneFast
66
it never eliminates Forwarding Delay and provides no assistance
in the case of a direct failure (recall from the "Tuning Max Age"
section that direct failures do not use Max Age).
Tip
Tip
67
How does BackboneFast magically eliminate Max Age from the
STP convergence delay? By taking advantage of the following
two mechanisms:
68
RLQ Requests are sent to query upstream bridges if their connection
to the Root Bridge is stable. RLQ Responses are used to reply to
RLQ Requests. The switch that originates the RLQ Request sends
RLQ frames out all non-Designated Ports except the port that
received the inferior BPDU. A switch that receives an RLQ Request
replies with an RLQ Response if it is the Root Bridge or it knows that
it has lost its connection to the Root Bridge. If neither of these
conditions is true, the switches propagate the RLQ Requests out their
Root Ports until the stability of the Root Bridge is known and RLQ
Responses can be sent. If the RLQ Response is received on an
existing Root Port, the switch knows that its path to the Root Bridge is
stable. On the other hand, if the RLQ Response is received on some
port other than the current Root Port, it knows that it has lost its
connection to the Root Bridge and can immediately expire the Max
Age timer. A switch propagates BPDUs out all Designated Ports until
the switch that originated the RLQ Request is reached.
69
As discussed earlier, BackboneFast must be enabled on all three
switches in this network. Assume that Cat-A is the Root Bridge. This
results in Cat-B:Port-1/2 and Cat-C:Port-1/1 becoming Root Ports.
Because Cat-B has the lower BID, it becomes the Designated Bridge
for Segment 3, resulting in Cat-C:Port-1/2 remaining in the Blocking
state.
70
Step 1. Segment 1 breaks.
Step 2. Cat-B immediately withdraws Port 1/2 as its Root Port and
begins sending Configuration BPDUs announcing itself as the new
Root Bridge on Port 1/1. This is a part of the normal STP behavior
(Steps 3–7 are specific to BackboneFast).
Step 6. When Cat-C receives the RLQ Response on its existing Root
Port, it knows that it still has a stable connection to the Root Bridge.
71
Because Cat-B originated the RLQ Request, it does not need to
forward the RLQ Response on to other switches.
Step 8. As soon as the Max Age timer expires in Step 7, the normal
rules of STP require Port Cat-C:Port-1/2 to start sending
Configuration BPDUs. Because these BPDUs list Cat-A as the Root
Bridge, Cat-B quickly learns that it is not the Root Bridge and it has
an alternate path to Cat-A.
Although this allows Cat-B to learn about the alternate path to the
Root Bridge within several seconds, it still requires that Cat-C:Port-
1/2 go through the normal Listening and Learning states (adding 30
seconds of delay to the convergence with the default values and 8
seconds with the minimum value for Forward Delay).
72
73