<CHAPTEROBJECTIVE>Setting STP port priorities</CHAPTEROBJECTIVE>
<CHAPTEROBJECTIVE>Setting the VLAN port priorities</CHAPTEROBJECTIVE>
<CHAPTEROBJECTIVE>Changing the STP timers</CHAPTEROBJECTIVE></CHAPTEROBJECTIVEBLOCK>
<PARA><DROPCAP>R</DROPCAP>edundancy is the ability to provide an immediate backup solution to a fault in the network that might otherwise cause a network or component service outage. When you're building a redundant network-which is a network with redundant power, hardware, links, and other network-critical components-network loops can occur. The Spanning Tree Protocol (STP) was created to overcome the problems associated with transparent bridging at layer 2. </PARA>
<PARA>This chapter will focus on providing link redundancy by using STP and the IEEE 802.1d algorithm used to support STP. The Spanning Tree Protocol uses timers to make the network stable. You'll learn how to manage the different STP timers to maximize the efficiency of your network. </PARA>
<SECTION ID="5.1"><TITLE>Cisco and IEEE 802.1q Committee</TITLE>
<PARA><DROPCAP>C</DROPCAP>isco and the IEEE do not see everything eye-to-eye when it comes to using spanning tree and VLANs. Per-VLAN Spanning Tree (PVST) is a Cisco proprietary implementation of STP. PVST uses Inter-Switch Link (ISL) routing and runs a separate instance of STP for each and every VLAN.</PARA>
<PARA>The IEEE uses what is called Common Spanning Tree (CST), which is defined with IEEE 802.1q. The IEEE 802.1q defines one spanning tree instance for all VLANs.</PARA>
<PARA> There is one more implementation of STP, and that is called PVST+. Because it ends with a plus sign, it must be better, right? Well, maybe. What it does is allow CST information to be passed into PVST. Cisco thinks it would be easier if you just had all Cisco switches; then you wouldn't even have to think about this issue. </PARA>
<!-- <PARA>The following list includes a brief explanation of each STP implementation:</PARA>
<RUNINBLOCK><RUNINHEAD>Per-VLAN Spanning Tree (PVST)</RUNINHEAD>
<RUNINPARA>Default for Cisco switches, it runs a separate instance of spanning tree for each VLAN. Makes smaller STP for easier convergence. </RUNINPARA></RUNINBLOCK>
<RUNINBLOCK><RUNINHEAD>Common Spanning Tree (CST)</RUNINHEAD>
<RUNINPARA>The 802.1q standard, it runs one large STP on the entire network regardless of the amount of VLANs. Problems with convergence can occur in large networks. </RUNINPARA></RUNINBLOCK>
<RUNINPARA>Allows Cisco switches to communicate with CST switches.</RUNINPARA></RUNINBLOCK> -->
<SLUG NONUM="g1"/>
<PARA>In the following sections, we'll go into more detail about each type of STP implementation and its use with VLANs.</PARA>
<SECTION ID="5.1.1" POS="1"><TITLE>Per-VLAN Spanning Tree (PVST)</TITLE>
<PARA>The STP protocol does not scale well with large switched networks. In large switched networks, there can be delays in receiving Bridge Protocol Data Units (BPDUs). These delays can cause instability in the STP database. Delays in larger switched networks can also cause convergence time problems, which means that the network will not be forwarding frames. </PARA>
<PARA>To solve late BPDU and convergence issues, Cisco created a separate instance of <KEYTERM>Per-VLAN Spanning Tree (PVST)</KEYTERM>. It basically makes smaller STP implementations, which is easier for the switches to manage. Also, with PVST, each VLAN has a unique Spanning Tree Protocol topology for its root, port cost, path cost, and priority.</PARA>
<PARA>By running PVST, you still provide a loop-free network, but it is based within each VLAN. The benefits of having a PVST are listed here:</PARA>
<LIST MARK="bullet">
<LISTITEM><PARA>It reduces the STP recalculation time when the switched network is converging.</PARA></LISTITEM>
<LISTITEM><PARA>The spanning tree topology is smaller.</PARA></LISTITEM>
<LISTITEM><PARA>It makes the switched network easier to scale.</PARA></LISTITEM>
<LISTITEM><PARA>Recovery is faster than with a large network with one STP instance.</PARA></LISTITEM>
<LISTITEM><PARA>It allows administrative control of forwarding paths on a subnet basis.</PARA></LISTITEM>
</LIST>
<PARA>However, there are some disadvantages of using a spanning-tree-per-instance implementation: </PARA>
<LIST MARK="bullet">
<LISTITEM><PARA>The utilization on the switch is a factor because it needs to manage all the STP instances. </PARA></LISTITEM>
<LISTITEM><PARA>You must take into consideration that the trunk links have to support all the VLAN STP information as well. </PARA></LISTITEM>
</LIST>
</SECTION>
<SECTION ID="5.1.2"><TITLE>Common Spanning Tree (CST)</TITLE>
<PARA>The IEEE 802.1q is referred to as the <KEYTERM>Common Spanning Tree (CST)</KEYTERM>. It is also called the Mono-Spanning Tree because it uses only one spanning tree instance regardless of the size of the switched layer 2 network. </PARA>
<PARA>The CST runs on all VLANs by default, and all switches are involved in the election process to find the root bridge. The switches then form an association with that root bridge. Typically, using CST does not allow for optimization of the root bridge placement. </PARA>
<PARA>There are some advantages to CST. With one STP instance, there are fewer BPDUs consuming bandwidth. Because there is only one instance of STP in the network, there is less STP processing performed by the switches.</PARA>
<PARA>However, the disadvantages typically outweigh the advantages in a larger network. With a single root bridge, the path that has been calculated as the best cost to the root bridge might not be the most efficient for some users to send their data. Another disadvantage with CST is that the STP topology increases in size to make sure all ports in the network are found. This can cause delays in the updates and convergence times if the network topology is too large. </PARA>
<PARA><KEYTERM>Per-VLAN Spanning Tree+ (PVST+)</KEYTERM> is an extension of the PVST standard. Starting with the Catalyst software 4.1 or later, PVST+ is supported on Cisco Catalyst switches. This allows Cisco switches to support the IEEE 802.1q standard. Basically, the PVST+ extension of the PVST protocol provides support for links across an IEEE 802.1q CST region. </PARA>
<PARA>PVST+ also supports the Cisco default PVST and adds checking mechanisms to make sure there are no configuration problems on trunked ports and VLAN IDs across switches. PVST+ is plug-and-play compatible with PVST with no configuration necessary. In order to provide support for the IEEE 802.1q standard, Cisco's existing PVST has been modified with additional features enabling it to support a link across the IEEE 802.1q Common Spanning Tree region. </PARA>
<PARA>PVST+ includes features such as the following:</PARA>
<LIST MARK="bullet">
<LISTITEM><PARA>Provides notification of inconsistencies related to port trunking or VLAN identification across the switches.</PARA></LISTITEM>
<LISTITEM><PARA>Adds mechanisms to ensure that there is no unknown configuration. </PARA></LISTITEM>
<LISTITEM><PARA>Tunnels PVST BPDUs through the 802.1q VLAN region as multi- cast data.</PARA></LISTITEM>
<LISTITEM><PARA>Provides compatibility with IEEE 802.1q's CST and Cisco's PVST protocols.</PARA></LISTITEM>
<LISTITEM><PARA>Interoperates with 802.1q-compliant switches using CST through 802.1q trunking. A CST BPDU is transmitted or received with an IEEE standard bridge group MAC address. </PARA></LISTITEM>
<LISTITEM><PARA>Blocks ports that receive inconsistent BPDUs in order to prevent forwarding loops. </PARA></LISTITEM>
<LISTITEM><PARA>Notifies users via syslog messages about all inconsistencies.</PARA></LISTITEM>
</LIST>
</SECTION>
</SECTION>
<SECTION ID="5.2"><TITLE>Scaling the Spanning Tree Protocol</TITLE>
<PARA><DROPCAP>T</DROPCAP>he STP prevents loops in layer 2 switched networks and is basically plug-and-play. However, it may be advantageous to change some of the default timers and settings to create a more stable environment. </PARA>
<PARA>In this section, we'll discuss how to scale the STP protocol on a large, switched internetwork. It is important to understand how to provide proper placement of the root bridge to create an optimal topology. If the root bridge is automatically chosen through an election, which is the default, the actual path the frames may take might not be the most efficient. The administrator can then change the root placement, which allows for a possibly more optimal path. However, you can cause more damage as well, but hopefully you'll have thought out your network design before making any changes. </PARA>
<PARA>To change the root placement, you need to do the following:</PARA>
<LIST MARK="bullet">
<LISTITEM><PARA>Determine the root device.</PARA></LISTITEM>
<LISTITEM><PARA>Configure the device.</PARA></LISTITEM>
<LISTITEM><PARA>Set the port priorities. </PARA></LISTITEM>
<LISTITEM><PARA>Set the VLAN port priorities. </PARA></LISTITEM>
<LISTITEM><PARA>Change the STP timers. </PARA></LISTITEM>
</LIST>
<SECTION ID="5.2.1" POS="1"><TITLE>Determining the Root</TITLE>
<PARA>Determining the root device is the most important decision that you make when configuring the STP protocol on your network. If you place the root in the wrong place in your network, it will be difficult to scale the network, and really, that is what you are trying to do: create a scalable layer 2 switched internetwork. </PARA>
<PARA>However, by placing the root switch as close as possible to the center of your network, more optimal and deterministic paths can be easily chosen. You can choose the root bridge and secondary and backup bridges as well. Secondary bridges are very important for network stability in case the root bridge fails.</PARA>
<PARA>Because the root bridge should be close to the center of the network, the device will typically be a distribution layer switch and not an access layer switch. </PARA>
<PARA>After the root bridge has been chosen and configured, all the connected switches must determine the best path to the root bridge. The STP uses several different costs in determining the best path to the root bridge: </PARA>
<LIST MARK="bullet">
<LISTITEM><PARA>Port cost</PARA></LISTITEM>
<LISTITEM><PARA>Path cost</PARA></LISTITEM>
<LISTITEM><PARA>Port priority</PARA></LISTITEM>
</LIST>
<PARA>When a BPDU is sent out a switch port, the BPDU is assigned a port cost. The path cost is then determined by the sum of all of the port costs. The STP will first look at the path cost to figure out the forwarding and blocking ports. If the path costs are equal on two or more links to the root bridge, the port ID is used to determine the root port. The port with the lowest port ID is determined to be the forwarding port. You can change the port ID on a switch by changing the port priority, but Cisco doesn't recommend this. However, we'll show you how to do it later in this section (so you can have some fun on a rainy Saturday). </PARA>
</SECTION>
<SECTION ID="5.2.2"><TITLE>Configuring the Root</TITLE>
<PARA>After you choose the best switch to become your root bridge, you can use the Cisco command-line interface (CLI) to configure the STP parameters in a switched network. </PARA>
<PARA>The command to configure the Spanning Tree Protocol (STP) is <INLINECODE>set spantree</INLINECODE>. The following switch output (from our Catalyst 5000) shows the different command parameters you can use when configuring the Spanning Tree Protocol. We are interested in the <INLINECODE>set spantree root</INLINECODE> and <INLINECODE>set spantree secondary</INLINECODE> commands at this point:</PARA>
<PARACONTINUED>The <INLINECODE>set spantree root</INLINECODE> command sets the primary root bridge for a specific VLAN, or even for all your VLANs. The <INLINECODE>set spantree root secondary</INLINECODE> command allows you to configure a backup root bridge. </PARACONTINUED>
<!-- <PARA>In the following switch output, notice the options that are available with the <INLINECODE>set spantree root</INLINECODE> command: </PARA>
<TABLEENTRY><PARA>Designation to change the switch to the root switch. The <INLINECODE>set spantree root</INLINECODE> command changes the bridge priority from 32768 to 8192.</PARA></TABLEENTRY>
<TABLEENTRY><PARA>Designation to change the switch to a secondary root switch if the primary fails. This automatically changes the bridge priority from a default of 32768 to 16384.</PARA></TABLEENTRY>
<TABLEENTRY><PARA>Optional command that changes the STP parameters on a specified VLAN. If no VLAN is specified, then it changes only VLAN 1 by default. You can change the parameters for VLANs 1-1005.</PARA></TABLEENTRY>
<TABLEENTRY><PARA>Another optional command that specifies the maximum number of bridges between any two points where end stations attach. You can set these parameters from 2 to 7. Figure the network diameter by starting at the root bridge and counting the number of bridges in the VLAN. The root bridge is 1, so if you have only one more switch, set the network diameter to 2. This changes the timers in the VLAN to reflect the new diameter. </PARA></TABLEENTRY>
<TABLEENTRY><PARA>Optional command that specifies in seconds the duration between configuration messages from the root switch. You can set this anywhere from 1 to 10 seconds (2 is the default). </PARA></TABLEENTRY>
</TABLEROW>
</TABLEBODY>
</TABLE>
<PARA>The following switch output is an example of using the <INLINECODE>set spantree root</INLINECODE> command: </PARA>
<CODESNIPPET><CODELINE>Todd5000> (enable) <EMPHASIS FORMAT="bold">set spantree root 1-4 dia 2</EMPHASIS></CODELINE>
<CODELINE>VLANs 1-2 bridge priority set to 8192.</CODELINE>
<CODELINE>VLANs 1-2 bridge max aging time set to 10.</CODELINE>
<CODELINE>VLANs 1-2 bridge hello time set to 2.</CODELINE>
<CODELINE>VLANs 1-2 bridge forward delay set to 7.</CODELINE>
<CODELINE>Switch is now the root switch for active VLANs 1-4.</CODELINE>
<PARA>The <INLINECODE>set spantree root</INLINECODE> command tells the switch to change the bridge priority to 8192, which will automatically change the switch to the root bridge. The <INLINECODE>1-4</INLINECODE> represents the VLANs for which the STP will change the parameters, and the <INLINECODE>dia 2</INLINECODE> is the network diameter. To figure the network diameter, we just counted the number of switches from the root, including the root bridge, which in our example equaled 2. </PARA>
<PARA>Notice the output after the command. The bridge priority was changed to 8192, max age time to 10, hello time is still 2 seconds, and the forward delay was set to 7 seconds. If the network diameter is set, the STP will set the timers to what it would consider efficient for that size network.</PARA> -->
<SLUG NONUM="g2"/>
<PARA>You can verify your STP configuration with the <INLINECODE>show spantree</INLINECODE> command. If you type the command <INLINECODEUSERINPUT>show spantree</INLINECODEUSERINPUT> with no parameters, it will show you the spanning tree configuration for all VLANs. You can type <INLINECODEUSERINPUT>show spantree </INLINECODEUSERINPUT><INLINECODEUSERINPUTVARIABLE>vlan</INLINECODEUSERINPUTVARIABLE> to see the parameters for just a particular VLAN. The following switch output shows the spanning tree information for VLAN 1: </PARA>
<PARACONTINUED>Notice that the bridge IP priority is set to 8192; the designated root and bridge IP MAC ADDR is the same because this is the root bridge. The Port-States are both 19, which is the default for 100Mbps. Because both ports are in forwarding state, the 1900 switch must have one of its FastEthernet ports in blocking mode. Let's take a look by using the <INLINECODE>show spantree</INLINECODE> command on the 1900 CLI:</PARACONTINUED>
<CODESNIPPET><CODELINE>Port FastEthernet 0/26 of VLAN1 is Blocking</CODELINE>
<CODELINE> Port path cost 10, Port priority 128</CODELINE>
<CODELINE> Designated root has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated bridge has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated port is 2, path cost 0</CODELINE>
<CODELINE> Timers: message age 10, forward delay 7, hold 1</CODELINE>
<CODELINE></CODELINE>
<CODELINE>Port FastEthernet 0/27 of VLAN1 is Forwarding</CODELINE>
<CODELINE> Port path cost 10, Port priority 128</CODELINE>
<CODELINE> Designated root has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated bridge has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated port is 1, path cost 0</CODELINE>
<CODELINE> Timers: message age 10, forward delay 7, hold 1</CODELINE></CODESNIPPET>
<PARACONTINUED>Notice that port f0/26 is in blocking mode and port f0/27 is in forwarding mode. If we want port f0/26 to be in forwarding mode and f0/27 in blocking mode, we can set the port costs to help the switch determine the best path to use. Note that we are not saying you should do this; we just wanted to show you how. </PARACONTINUED>
</SECTION>
<SECTION ID="5.2.3"><TITLE>Setting the Port Cost</TITLE>
<PARA>The parameters in this next set are used to allow the network administrator to influence the path that spanning tree chooses when setting the port priority, port cost, and path cost. </PARA>
<PARA>Cisco does not recommend changing these settings unless it's absolutely necessary. However, the best way to get a good understanding of how the STP works is by changing the defaults. We do not recommend trying any of this on a production network unless you have permission from the network manager and they understand that you can bring the network down. </PARA>
<PARA>By changing the port cost, you can change the port ID, which means it can be a more desirable port to the STP protocol. Remember that STP only uses the port ID if there is more than one path to the root bridge and they are equal cost. Path cost is the sum of the costs between a switch and the root bridge. The STP calculates the path cost based on the media speed of the links between the switch and the port cost of each port forwarding the frames. In our lab, both links are 100Mbps, so the port ID is important and will be used. </PARA>
<PARA>To change the path used between a switch and the root bridge, first calculate the current path cost. Then change the port cost of the port you want to use, making sure that you keep in mind the alternate paths if the primary path fails before making any changes to your switch. Remember that ports with a lower port cost are more likely to be chosen; this doesn't mean they always will be chosen. </PARA>
<PARA>To change the port cost of a port on a 5000 series switch, use the <INLINECODE>set spantree portcost</INLINECODE> command: </PARA>
<PARA>The parameters to set the cost of a port are the module and port number and the cost you want to configure. The following example shows how to set the port cost on port 1/1 to 10 from the default of 19: </PARA>
<CODELINE>Spantree port 1/1 path cost set to 10.</CODELINE></CODESNIPPET>
<PARA>You would verify the change with the <INLINECODE>show spantree</INLINECODE> command. However, because both ports are in forwarding mode, the command shown above will not change the switch's STP parameters. Notice in the following switch output that both ports are forwarding, but the costs of the ports are different: </PARA>
<PARA>Remember that a root switch will be forwarding on all active ports, so the port IDs are irrelevant to the switch. However, the 1900 must then choose a port to perform blocking on the interface with the lowest cost. </PARA>
<PARA>To change the port cost on a 1900 CLI-based switch, use the <INLINECODE>spantree cost</INLINECODE> interface command. The cost values can be any number from 1 to 65535; however, you cannot make it less than the path cost of both links. For example, notice in the following switch output that we tried to set port f0/26 to a lower number than the default of 10. The switch would not allow us to do that because both f0/26 and f0/27 are running the default of 10. What we need to do is to raise the port priority of the port we don't want STP to use for forwarding. Notice that we changed the cost of port f0/27 to 20. This should make the f0/26 port a more desirable path: </PARA>
<PARA>To verify the port priorities, use the <INLINECODE>show spantree</INLINECODE> command: </PARA>
<CODESNIPPET><CODELINE>Port FastEthernet 0/26 of VLAN1 is Forwarding</CODELINE>
<CODELINE> Port path cost 10, Port priority 128</CODELINE>
<CODELINE> Designated root has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated bridge has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated port is 2, path cost 0</CODELINE>
<CODELINE> Timers: message age 10, forward delay 7, hold 1</CODELINE>
<CODELINE></CODELINE>
<CODELINE>Port FastEthernet 0/27 of VLAN1 is Blocking</CODELINE>
<CODELINE> Port path cost 20, Port priority 128</CODELINE>
<CODELINE> Designated root has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated bridge has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated port is 1, path cost 0</CODELINE>
<CODELINE> Timers: message age 10, forward delay 7, hold 1</CODELINE>
<CODELINE>1900A#</CODELINE></CODESNIPPET>
<PARA>In the preceding switch output, notice that port 0/26 is now forwarding and port f0/27 is now blocking. In the output, the port path cost is 10 for f0/26 and 20 for f0/27. This is a pretty simple and straightforward configuration, and our network never went down. However, caution should be used when changing the port costs in a real production network because you can cause havoc in a network if the configuration is not thought out carefully. </PARA>
</SECTION>
<SECTION ID="5.2.4"><TITLE>Setting the Port Priority</TITLE>
<PARA>Another option you can use to help the switch determine the path selection that STP uses in your network is to set the port priorities. Remember, this only influences STP; it doesn't demand that STP do anything. However, between setting the port cost and priority, STP should always make your path selection. </PARA>
<PARA>The port priority and port cost configurations work similarly. The port with the lowest port priority will forward frames for all VLANs. The command to set a port priority is <INLINECODE>set spantree portpri</INLINECODE>: </PARA>
<PARA>The possible port priority range is from 0 to 63, where the default is 32. If all ports have the same priority, then the port with the lowest port number will forward frames. For example, 2/1 is lower than 2/2. In the following example, the 5000 switch priority for port 1/1 is set to 20: </PARA>
<PARA>Notice that, because port 1/1 is a trunked port, all VLAN priorities were changed on that port. Also notice in the following output that the priority is 20 for 1/1, but the default of 32 is set for 1/2:</PARA>
<PARA>You can go one step further and set the port priority on a per-VLAN basis. The port with the lowest priority will forward frames for the VLAN for which you've set the priority. Again, if all the ports have the same priority, the lowest port number wins and begins forwarding frames.</PARA>
<PARA>There is an advantage to setting the port priority per VLAN. If you have a network with parallel paths, STP will stop at least one link from forwarding frames so a network loop will not occur. All traffic would then have to travel over only the one link. However, by changing the port priority for a specific group of VLANs, you can distribute the VLANs across the two links. </PARA>
<PARA>To change the priority of STP for a certain VLAN or group of VLANs, use the <INLINECODE>set spantree portvlanpri</INLINECODE> command:</PARA>
<PARA>The priority can be set for each VLAN from 0 to 63. In the following example, we'll set port 1/1 to forward only VLANs 1 and 2 and port 1/2 to forward VLANs 3 and 4: </PARA>
<CODESNIPPET><CODELINE>Todd5000> (enable<EMPHASIS FORMAT="bold">) set spantree portvlanpri 1/1 16 1-2</EMPHASIS></CODELINE>
<CODELINE>Port 1/1 vlans 1-2 using portpri 16.</CODELINE>
<CODELINE>Port 1/1 vlans 3-1004 using portpri 20.</CODELINE>
<CODELINE>Port 1/1 vlans 1005 using portpri 4.</CODELINE>
<PARA>The switch output above displays the VLAN priority information. We set both VLAN port priorities to 16. Notice that for VLANs 1-4, the priority is 16. However, on port 1/1, all the other VLANs are listed as having a port priority of 20 because that is what we set the port priority to earlier in this chapter. On port 1/2, the switch thinks all the other ports have a port priority of 32, except for VLAN 1005, which becomes a default priority of 4. </PARA>
<PARA>You can view the changes by using the <INLINECODE>show spantree slot/port</INLINECODE> command, as shown below: </PARA>
<PARA>We want to set the VLAN port priority on the 1900 switch now. Notice in the following switch output that f0/26 is in forwarding mode and f0/27 is blocking. Remember that we changed the port cost to 20 for f0/27, which makes port f0/26 more desirable to the switch: </PARA>
<CODESNIPPET><CODELINE>Port FastEthernet 0/26 of VLAN1 is Forwarding</CODELINE>
<CODELINE> Port path cost 10, Port priority 128</CODELINE>
<CODELINE> Designated root has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated bridge has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated port is 2, path cost 0</CODELINE>
<CODELINE> Timers: message age 10, forward delay 7, hold 1</CODELINE>
<CODELINE>Port FastEthernet 0/27 of VLAN1 is Blocking</CODELINE>
<CODELINE> Port path cost 20, Port priority 128</CODELINE>
<CODELINE> Designated root has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated bridge has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated port is 1, path cost 0</CODELINE>
<CODELINE> Timers: message age 10, forward delay 7, hold 1</CODELINE></CODESNIPPET>
<PARA>You can change the priority of the port, but not the VLAN priority as you can with the 5000 series switch. The command is <INLINECODE>spantree priority</INLINECODE>: </PARA>
<PARA>Once the priority is set, use the <INLINECODE>show spantree [vlan]</INLINECODE> command to see the port priority. Notice that, because both ports are equal 100Mbps ports, the switch will use the path cost to determine the forwarding or root port. The priority won't be used unless the path costs are the same. If both ports have the same priority, the interface f0/26 will be used because it is a lower port number:</PARA>
<CODELINE>Port FastEthernet 0/26 of VLAN1 is Forwarding</CODELINE>
<CODELINE> Port path cost 10, Port priority 128</CODELINE>
<CODELINE> Designated root has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated bridge has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated port is 2, path cost 0</CODELINE>
<CODELINE> Timers: message age 10, forward delay 7, hold 1</CODELINE>
<CODELINE>Port FastEthernet 0/27 of VLAN1 is Blocking</CODELINE>
<CODELINE> Port path cost 20, Port priority 16</CODELINE>
<CODELINE> Designated root has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated bridge has priority 8192, address 00E0.3488.FC00</CODELINE>
<CODELINE> Designated port is 1, path cost 0</CODELINE>
<CODELINE> Timers: message age 10, forward delay 7, hold 1</CODELINE>
<CODELINE>1900A#</CODELINE></CODESNIPPET>
<PARA>By changing either the port priority or the port cost, you can basically just persuade the switch to use your chosen paths. However, there are some miscellaneous other STP variables that you can change. We'll discuss those next. </PARA>
</SECTION>
<SECTION ID="5.2.5"><TITLE>Changing the STP Timers</TITLE>
<PARA>The timers are important in an STP network to stop network loops from occurring. The different timers are used to give the network time to update the correct topology information to all the switches and also to determine the whereabouts of all the redundant links. </PARA>
<!-- <PARA>The problem with the STP timers is that, if a link goes down, it can take up to 50 seconds for the backup link to take over forwarding frames. This is a convergence problem that can be addressed when instability is occurring in the network. The following timers can be changed:</PARA>
<RUNINBLOCK><RUNINHEAD>fwddlay</RUNINHEAD>
<RUNINPARA>This interval indicates how long it takes for a port to move from listening to learning state and then from learning to forwarding state. The default is 15 seconds, but it can be changed to anywhere from 4 to 30 seconds. If you set this too low, the switch won't be allowed ample time to make sure no loops will occur before setting a port in forwarding mode. The following switch output shows how to set the fwddelay to 10 seconds: </RUNINPARA></RUNINBLOCK>
<CODELINE>Spantree 1 forward delay set to 10 seconds.</CODELINE>
</CODESNIPPET>
<RUNINBLOCK><RUNINHEAD>hello</RUNINHEAD>
<RUNINPARA>This is the time interval for sending BPDUs from the root switch. It is set to 2 seconds by default; you would think it couldn't be set any lower, but it can. You can set it to 1 second to actually double the amount of BPDUs sent out that must be lost before triggering an unwanted convergence in the network. However, it doubles the CPU load and processing load as well. The following switch output shows how to change the BPDU timers to 1 second: </RUNINPARA></RUNINBLOCK>
<CODELINE>Spantree 1 hello time set to 1 seconds.</CODELINE>
</CODESNIPPET>
<RUNINBLOCK><RUNINHEAD>maxage</RUNINHEAD>
<RUNINPARA>The maxage is the amount of time that a switch will hold BPDU information. If a new BPDU is not received before the maxage expires, then the BPDU is discarded and is considered invalid. The default is 20 seconds; it can be set to as low as 6 seconds. However, network instability will happen if too many BPDUs are discarded because this timer is set too low. The following output shows how to change the maxage of a BPDU to 30 seconds: </RUNINPARA></RUNINBLOCK>
<CODELINE>Spantree 1 max aging time set to 30 seconds.</CODELINE>
<CODELINE>Todd5000> (enable)</CODELINE>
</CODESNIPPET> -->
<SLUG NONUM="g3"/>
<PARA>We have been discussing redundant links and STP, but most of the discussion has been about how to make STP run efficiently, and that is by making the nonroot port a blocking port. We discussed load balancing only when we showed you how to set the port priority on a per-VLAN basis. However, that really wasn't load balancing to the degree that is possible with a Cisco switched network. In the next section, we'll cover the most efficient ways of dealing with redundant links in a large, switched internetwork.</PARA>
</SECTION>
</SECTION>
<SECTION ID="5.3"><TITLE>Redundant Links with STP</TITLE>
<PARA><KEYTERM>Fast EtherChannel</KEYTERM> and <KEYTERM>Gigabit EtherChannel</KEYTERM> allow high-speed redundant links in a spanning tree environment by allowing dual parallel links to be treated as though they were one link. Cisco Fast EtherChannel technology uses the standards-based 802.3 Full-Duplex Fast Ethernet to provide a reliable high-speed solution for the campus network backbone. Fast EtherChannel can scale bandwidth within the campus, providing full-duplex bandwidth at wire speeds of 200Mbps to 800Mbps. It provides high bandwidth, load sharing, and redundancy of links in a switched internetwork. </PARA>
<PARA>Broadcast traffic, as well as unicast and multicast traffic, is distributed equally across the links in the channel. Fast EtherChannel also provides redundancy in the event of a link failure. If a link is lost in a Fast EtherChannel network, traffic is rerouted to one of the other links in just a few milliseconds, making the convergence transparent to the user.</PARA>
<SECTION ID="5.3.1" POS="1"><TITLE>Parallel Fast EtherChannel Links</TITLE>
<PARA>Fast EtherChannel uses load distribution to share the links in a bundle, which is a group of FastEthernet or Gigabit Ethernet links managed by the Fast EtherChannel process. Should one link in the bundle fail, the Ethernet Bundle Controller (EBC) informs the Enhanced Address Recognition Logic (EARL) ASIC of the failure, and the EARL in turn ages out all addresses learned on that link. The EBC and the EARL use hardware to recalculate the source and destination address pair on a different link. </PARA>
<PARA>The convergence time is sometimes referred to as the failover time, which is the time it takes for the new address to be relearned-about 10 microseconds. Windowing flow control techniques can make this process a touch longer, but that depends on the particular application in use. The key is not having the application time out, and the failover time is fast enough to stop the time-out from happening. </PARA>
<PARA>EtherChannel does not work under certain circumstances. This is to ensure that no network loops will occur if the bundle comes up. There are certain guidelines to follow when configuring EtherChannel technology:</PARA>
<LIST MARK="bullet">
<LISTITEM><PARA>All ports must be in the same VLAN or they must all be trunk ports. </PARA></LISTITEM>
<LISTITEM><PARA>All ports must be configured as the same trunk mode if trunking is used.</PARA></LISTITEM>
<LISTITEM><PARA>When trunking is used, all ports must be configured with the same VLAN range. If it is not the same, packets will be dropped and the ports will not form a channel when set to the auto or desirable mode. </PARA></LISTITEM>
<LISTITEM><PARA>All ports must be configured with the same speed and duplex settings.</PARA></LISTITEM>
<LISTITEM><PARA>If broadcast limits are configured on the ports, configure the limits for all the ports or packets may be dropped.</PARA></LISTITEM>
<LISTITEM><PARA>The ports cannot be configured in a channel as dynamic VLAN ports.</PARA></LISTITEM>
<LISTITEM><PARA>Port security must be disabled on channeled ports. </PARA></LISTITEM>
<LISTITEM><PARA>All ports must be enabled in the channel. If you disable a port, a link failure occurs.</PARA></LISTITEM>
<PARA>To create an EtherChannel bundle, use the <INLINECODE>set port channel</INLINECODE> command. You must first make sure that all the conditions for EtherChannel have been met. </PARA>
<PARA>Notice the switch output when we try to configure the ports on our 5000 switch as a bundle to the 1900 switch: </PARA>
<CODESNIPPET><CODELINE>Todd5000> (enable) <EMPHASIS FORMAT="bold">set port channel 1/1-2 on</EMPHASIS></CODELINE>
<CODELINE>Mismatch in trunk mode.</CODELINE>
<CODELINE>Mismatch in port duplex.</CODELINE>
<CODELINE>Mismatch in STP port priority.</CODELINE>
<CODELINE>Failed to set port(s) 1/1-2 channel mode to on.</CODELINE>
<PARACONTINUED>There is a mismatch in trunking, duplex, and STP port priority. All of the ports must be configured the same for EtherChannel to work. </PARACONTINUED>
<PARA>To view the configuration of a port, use the <INLINECODE>show port capability slot/port</INLINECODE> command: </PARA>
<CODESNIPPET><CODELINE>Todd5000> (enable) <EMPHASIS FORMAT="bold">sh port cap 1/1</EMPHASIS></CODELINE>
<PARA>The preceding output shows the card model number and the configuration of the port. The easiest way for us to make sure all the ports we want to channel are configured the same is to just clear the configuration. We're not suggesting that you just clear your config whenever any problems come up, but the configuration we created in this chapter is pretty extensive, and it's just easier to just clear it out of the switch to perform the next function: </PARA>
<PARA>Remember that you need to reset the switch after erasing the configuration to clear the configuration. We need to reconfigure the switch with an IP address and trunking on ports 1/1 and 1/2. Now, we're also going to delete the configuration on the 1900 so we then will have both switches back to our STP default:</PARA>
<CODELINE>This command resets the switch with factory defaults. All system</CODELINE>
<CODELINE>parameters will revert to their default factory settings. All</CODELINE>
<CODELINE>static and dynamic addresses will be removed.</CODELINE>
<CODELINE>Reset system with factory defaults, [Y]es or [N]o? Yes</CODELINE></CODESNIPPET>
<PARA>Now that we have both the switches back to their default configurations, we'll just configure the IP addresses and turn on trunking on ports 1/1 and 1/2 of the 5000 and ports 0/26 and 0/27 of the 1900: </PARA>
<PARA>You can see that the status is error disabled and that no neighbors are found. This is because we still need to configure Fast EtherChannel on the 1900 switch. If this were a remote switch, you would lose contact with the switch and have to go to the site and console into the switch to configure EtherChannel. You should configure the remote site first; then you will lose contact with it until you configure the local switch bundle.</PARA>
<PARA>To configure the EtherChannel bundle on a 1900 switch, use the <INLINECODE>port-channel mode</INLINECODE> command: </PARA>
<PARA>That is all you can configure on the 1900. The switch will look for the neighbor device ID and neighbor group capability that are the same and form the connections into a channel. In this case, ports 0/26 and 0/27 are connected to the same device ID (hostname). By using the command <INLINECODE>show spantree 1</INLINECODE>, you can see that ports 0/26 and 0/27 are now one port: </PARA>
<CODELINE>Port PortChannel of VLAN1 is Forwarding</CODELINE>
<CODELINE> Port path cost 10, Port priority 128</CODELINE>
<CODELINE> Designated root has priority 32768, address 0030.80CC.7B40</CODELINE>
<CODELINE> Designated bridge has priority 32768, address 0030.80CC.7B40</CODELINE>
<CODELINE> Designated port is 26, path cost 0</CODELINE>
<CODELINE> Timers: message age 20, forward delay 15, hold 1</CODELINE></CODESNIPPET>
<PARA>Ports 0/26 and 0/27 are now just listed as Port PortChannel. To verify the EtherChannel on the 5000 series switch, use the <INLINECODE>show port channel</INLINECODE> command:</PARA>
<CODESNIPPET><CODELINE>Todd5000> (enable) <EMPHASIS FORMAT="bold">sh port channel</EMPHASIS></CODELINE>
<CODELINE>Port Status Channel Channel Neighbor Neighbor</CODELINE>
<PARACONTINUED>The preceding switch output shows the port numbers, status, mode, channel status, neighbor device, and neighbor port ID. Our EtherChannel is working!</PARACONTINUED>
<PARA>The Port Aggregation Protocol (PAgP) is used to add more features to the EtherChannel technology. This protocol is used to learn the capabilities of the neighbors' EtherChannel ports. By doing this, it allows the switches to connect via Fast EtherChannel automatically. </PARA>
<PARA>The PAgP protocol groups the ports that have the same neighbor device ID and neighbor group capability into a channel. This channel is then added to the Spanning Tree Protocol as a single bridge port. </PARA>
<PARA>For PAgP to work, all the ports must be configured with static VLANs, not dynamic, and all the ports must also be in the same VLAN or be configured as trunk ports. All ports must be the same speed and duplex as well. In other words, all the ports must be configured the same or PAgP will not work. </PARA>
<PARA>If an EtherChannel bundle is already working and you make a change on a port, all ports in that bundle are changed to match the port. If you change the speed or duplex of one port, all ports will then run that speed or duplex. </PARA>
</SECTION>
<SECTION ID="5.3.5"><TITLE>PortFast</TITLE>
<PARA>By default, the Spanning Tree Protocol (STP) runs on all ports on a switch. Because most of the ports connect to workstations, printers, servers, routers, and so on, it's basically a waste of resources for these point-to-point ports to be running the Spanning Tree Protocol. When a device, let's say a workstation, powers up, it takes up to 50 seconds before the switch will forward data on the port because the STP is making sure no loops are going to occur when the port is in forwarding mode. Not only is this a waste of time (because a loop will not occur with point-to-point links), but some protocols or applications could time out. </PARA>
<PARA>PortFast is used to make a point-to-point port almost immediately enter into forwarding state by decreasing the time of the listening and learning states. This is very helpful for switch ports that have workstations or servers attached because these devices will connect immediately instead of waiting for the STP to converge. If you connect a hub to a port configured with PortFast and then accidentally connect another port into the switch from the hub, you will have a network loop and STP will not stop it. It is important to make sure that PortFast is used only on point-to-point links connected only to workstations or servers. </PARA>
<PARA>To configure PortFast on a switch, use the <INLINECODE>set spantree portfast</INLINECODE> command. The following switch output shows how to configure ports 2/1-12 with PortFast:</PARA>
<CODELINE>Usage: set spantree portfast <mod_num/port_num> <enable|disable></CODELINE>
<CODELINE> set spantree portfast <trcrf> <enable|disable></CODELINE>
<CODELINE></CODELINE>
<CODELINE>Todd5000> (enable) set spantree portfast 2/1-12 enable</CODELINE>
<CODELINE></CODELINE>
<CODELINE>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.</CODELINE>
<CODELINE>Spantree ports 2/1-12 fast start enabled.</CODELINE>
<PARACONTINUED>Notice the nice warning received on the switch console when PortFast was turned on. Also notice that we were able to turn on all 12 ports of our 10/100 card. </PARACONTINUED>
<PARA>To configure PortFast on a 1900 switch, use the <INLINECODE>spantree start-forwarding</INLINECODE> command: </PARA>
<PARACONTINUED>This must be configured on each port you want to run PortFast. </PARACONTINUED>
</SECTION>
<SECTION ID="5.3.7"><TITLE>UplinkFast</TITLE>
<PARA>UplinkFast is used to minimize network downtime by ensuring that network loops do not occur when the network topology changes. The problem is that STP convergence time is very time-consuming, so network loops can occur when the convergence is taking place. UplinkFast can reduce the convergence time during a link failure or a topology change. </PARA>
<PARA>Another problem with STP and the convergence time is that some hosts will not be available for communication during the convergence time because STP has disabled ports on a switch during convergence. The key is decreased convergence time, which UplinkFast was developed to provide. </PARA>
<PARA>UplinkFast allows a blocked port on a switch to begin forwarding frames immediately when a link failure is detected. For the switch to change a port from blocking to forwarding mode, UplinkFast must have direct knowledge of the link failure. </PARA>
<PARA>In order to utilize UplinkFast, several criteria must be met. First, UplinkFast must be enabled on the switch. The switch must have at least one blocked port, and the failure must be on the root port. If the failure is not on a root port, UplinkFast will ignore it and normal STP functions will occur. </PARA>
<PARA>When a link fault occurs on the primary root link, UplinkFast transitions the blocked port to a forwarding state. UplinkFast changes the port without passing through the listening and learning phases, which allows the switch to skip the normal convergence time and start forwarding in about 3 to 4 seconds instead of the normal 50 seconds.</PARA>
<PARA>Cisco has designed UplinkFast to work with its access layer switches, not its core switches, because the switch running UplinkFast must not be the root bridge. </PARA>
<PARA>When configuring UplinkFast, remember that all VLANs on the switch are affected and that you cannot configure UplinkFast on individual VLANs. </PARA>
<PARA>To configure UplinkFast on a set-based switch, use the <INLINECODE>set spantree uplinkfast</INLINECODE> command:</PARA>
<CODELINE>Usage: set spantree uplinkfast <enable> [rate <station_update_rate>] [all-protocols <off|on>]</CODELINE>
<CODELINE> set spantree uplinkfast <disable></CODELINE></CODESNIPPET>
<PARACONTINUED>The options are really just enable or disable. However, the station update rate value is the number of multicast packets transmitted per 100 milliseconds (by default, it is set to 15 packets per millisecond). It is not recommended that you change this value. </PARACONTINUED>
<PARA>The switch will provide you with an output describing what the command changed on the switch, as shown here:</PARA>
<PARACONTINUED>The VLAN priorities are automatically changed to 49152 and the port costs are set to above 3000. These are changed to make it unlikely that the switch will become the root switch. </PARACONTINUED>
<PARA>You can verify the UplinkFast configuration with the <INLINECODE>show spantree uplinkfast</INLINECODE> command: </PARA>
<PARA>To verify that UplinkFast is configured and running, use the commands <INLINECODEUSERINPUT>show uplink-fast</INLINECODEUSERINPUT> and <INLINECODEUSERINPUT>show uplink-fast statistics</INLINECODEUSERINPUT>:</PARA>
<CODELINE> Uplink fast Station Learning Frames 0</CODELINE>
<CODELINE>1900A#</CODELINE></CODESNIPPET>
<PARA>The default frame generation rate is 15, which is displayed with the <INLINECODE>show uplink-fast</INLINECODE> command. The next command used to help STP maintain a consistent network is BackboneFast.</PARA>
</SECTION>
<SECTION ID="5.3.9"><TITLE>BackboneFast</TITLE>
<PARA>Sometimes a switch may receive from a designated switch a BPDU that identifies the root bridge and the designated bridge as the same switch. This shouldn't happen, and the BPDU is then considered inferior. </PARA>
<PARA>BPDUs are considered inferior when a link from the designated switch has lost its link to the root bridge. The designated switch transmits the BPDUs with the information that it is now the root bridge as well as the designated bridge. The receiving switch will ignore the inferior BPDU for the maxage time. </PARA>
<PARA>After receiving inferior BPDUs, the receiving switch will try to determine if there is an alternate path to the root bridge. If the port that the inferior BPDUs are received on is already in blocking mode, then the root port and other blocked ports on the switch become alternate paths to the root bridge. However, if the inferior BPDUs are received on a root port, then all presently blocking ports become the alternate paths to the root bridge. Also, if the inferior BPDUs are received on a root port and there are no other blocking ports on the switch, the receiving switch assumes that the link to the root bridge is down and the maximum aging time expires, which turns the switch into the root switch.</PARA>
<PARA>If the switch finds an alternate path to the root bridge, it will use this new alternate path. This new path, and any other alternate paths, will be used to send a Root Link Query BPDU. By turning on BackboneFast, the Root Link Query BPDUs are sent out as soon as an inferior BPDU is received. This basically can enable faster convergence in the event of a backbone link failure.</PARA>
</SECTION>
<SECTION ID="5.3.10"><TITLE>Configuring and Verifying BackboneFast</TITLE>
<PARA>Configuring BackboneFast is pretty easy, but it sounds difficult, which is the cool part about this command. You turn it on with the <INLINECODE>set spantree backbonefast</INLINECODE> command. Here is an example of this command being enabled: </PARA>
<CODELINE>Backbonefast enabled for all VLANs</CODELINE></CODESNIPPET>
<PARA>Notice in the preceding switch output that BackboneFast is enabled for all VLANs and it must be enabled on all switches in your network to function. To verify that it is running on a switch, use the <INLINECODE>show spantree backbonefast</INLINECODE> command: </PARA>
<PARACONTINUED>The above command shows that BackboneFast is enabled. That's all there is to it. </PARACONTINUED>
</SECTION>
</SECTION>
<SECTION ID="5.4"><TITLE>Summary</TITLE>
<PARA><DROPCAP>T</DROPCAP>his chapter covered the detailed Spanning Tree Protocol information you need to be successful in the day-to-day maintenance of a layer 2 switched internetwork. Specifically, we covered the following:</PARA>
<LIST MARK="bullet">
<LISTITEM><PARA>Cisco and the IEEE 802.1q committee</PARA></LISTITEM>
<LISTITEM><PARA>Scaling the STP protocol</PARA></LISTITEM>
<LISTITEM><PARA>Redundant links with STP</PARA></LISTITEM>
<TABULARENTRY>Enables BackboneFast for a switch</TABULARENTRY>
</TABULARROW>
</TABULARBODY>
</TABULARDATA>
</SECTION>
</SECTION>
<TESTSECTION ID="5.5"><TITLE>Written Lab</TITLE>
<!-- <PARA>Write out the answers to the following questions:</PARA>
<TESTDATA>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Write the command to set a switch to the root for VLANs 50-1000 with four switches in the internetwork on a 5000 series switch.</QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>What command will show you the port cost and priority for VLAN 1 on a set-based switch?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Write the command to set the port cost on a 5000 switch port 2/1 to 10 from the default of 19. </QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Write the command to set the switch priority for port 1/1 to 20. </QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Once you change your port priority, you can verify the configuration with which command?</QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Write the command to set port 1/1 priority on a set-based switch to 16 for VLANs 1 and 2 only.</QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Write the command to turn on PortFast on ports 2/1-12 on a set-based switch.</QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Write the command to set UplinkFast on a set-based switch to on.</QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Write the command to create an EtherChannel bundle on a set-based switch using port 1/1-2.</QUESTION></QUESTIONBLOCK></TESTBLOCK>
<TESTBLOCK><QUESTIONBLOCK><QUESTION>Write the command to change the fwddelay to 10 seconds on a set-based switch.</QUESTION></QUESTIONBLOCK></TESTBLOCK>
</TESTDATA> -->
<SLUG NONUM="w1"/>
</TESTSECTION>
<SECTION ID="5.6"><TITLE>Hands-On Lab</TITLE>
<PARA>In this lab, you'll test PortFast and UplinkFast on the network, then you'll configure the 5000 series switch as an STP root and add EtherChannel between the 5000 and 1900 switch. Figure 5.1 shows the network configuration used in this lab. Make sure the configurations of your switches are deleted and the default STP configuration is on both switches. </PARA>
<SLUG NUM="5.1">Figure 5.1: Network diagram for the hands-on lab [f0501.eps]</SLUG>
<PARA>Configure both the 5000 series switch and the 1900 switch with the labs from <NOBR REF="2">Chapters 2</NOBR> and <NOBR REF="3">3</NOBR>. Each switch should have the hostname, interface descriptions, passwords, VTP domain information, and VLANs configured and trunked links on. Test by pinging from the workstation to the 1900 and 5000 switch. </PARA>
<LIST MARK="number">
<LISTITEM><PARA>Remember that PortFast is disabled on all ports of a switch by default. By turning on PortFast, you can start forwarding up to 50 seconds sooner when bringing up a device. To test this, connect your workstation into interface e0/4 of the 1900 switch and then from the DOS prompt of your workstation, ping the 5000 series switch. </PARA>
<LISTITEM><PARA>The -<INLINECODE>t</INLINECODE> will keep the ping running. Go to the 1900 switch and perform a <INLINECODEUSERINPUT>shut</INLINECODEUSERINPUT> and <INLINECODEUSERINPUT>no shut</INLINECODEUSERINPUT> on int e0/4, then notice how long it takes before the pings resume. This could be up to 50 seconds (although, if you have a small network, it may resume faster).</PARA></LISTITEM>
<LISTITEM><PARA>Leave the pings running. Go to int e0/4 and type <INLINECODEUSERINPUT>spantree start-forwarding</INLINECODEUSERINPUT>, which turns on PortFast for that port. </PARA></LISTITEM>
<LISTITEM><PARA>Go to the 1900 switch and perform a <INLINECODEUSERINPUT>shut</INLINECODEUSERINPUT>, then a <INLINECODEUSERINPUT>no shut</INLINECODEUSERINPUT> on e0/4. The pings will time out but should resume after only a few seconds. </PARA></LISTITEM>
<LISTITEM><PARA>Leave the Ping program running. Type <INLINECODEUSERINPUT>show spantree 1</INLINECODEUSERINPUT> and notice which port is forwarding and which port is blocking.</PARA></LISTITEM>
<LISTITEM><PARA>Leave the Ping program running. Perform a <INLINECODEUSERINPUT>shutdown</INLINECODEUSERINPUT> on the forwarding interface. Notice that the pings have timed out, but they should resume after a few seconds.</PARA></LISTITEM>
<LISTITEM><PARA>Type <INLINECODEUSERINPUT>show spantree 1</INLINECODEUSERINPUT> and notice which port is forwarding. </PARA></LISTITEM>
<LISTITEM><PARA>Perform a <INLINECODEUSERINPUT>no shutdown</INLINECODEUSERINPUT> on the port you originally shut down. Notice that the pings have timed out again, but the pings should resume after a few moments.</PARA></LISTITEM>
<LISTITEM><PARA>Turn on UplinkFast on your 1900 forwarding port by typing <INLINECODEUSERINPUT>uplink-fast</INLINECODEUSERINPUT> from global configuration mode. </PARA></LISTITEM>
<LISTITEM><PARA>Perform steps 5 through 8 again and notice that the ping's time-out and resume cycle was shorter. UplinkFast demonstrated an almost immediate transition to the second trunk link when the forwarding link was shut down. </PARA></LISTITEM>
<LISTITEM><PARA>Configure the 5000 series switch as the STP root switch by typing <INLINECODEUSERINPUT>set spantree root 1-4 dia 2</INLINECODEUSERINPUT> from the enable mode of the switch. The diameter of the network is determined by counting the switches connected to the root, including the root, which in this case is 2. The VLANs configured are 1-4.</PARA></LISTITEM>
<LISTITEM><PARA>Verify the configuration by typing <INLINECODEUSERINPUT>show spantree 1</INLINECODEUSERINPUT>. Notice the root designation. </PARA></LISTITEM>
<LISTITEM><PARA>Make sure your links are trunked by typing <INLINECODEUSERINPUT>show trunk</INLINECODEUSERINPUT> on the 5000 series switch.</PARA></LISTITEM>
<LISTITEM><PARA>Go to the 1900 and verify the forwarding port. Change the cost of the forwarding port to 20, which should make the blocked port the forwarding port. Type <INLINECODEUSERINPUT>spantree cost 20</INLINECODEUSERINPUT> from interface configuration of the forwarding port.</PARA></LISTITEM>
<LISTITEM><PARA>Verify the configuration with the <INLINECODEUSERINPUT>show spantree</INLINECODEUSERINPUT> command and notice that the blocked port is now forwarding and the forwarding port has been changed to blocked. Also notice the port costs. </PARA></LISTITEM>
<LISTITEM><PARA>Set the port priority on the forwarding port as well, to make sure that STP always uses this port to forward, by typing <INLINECODEUSERINPUT>spantree priority 64</INLINECODEUSERINPUT> from interface configuration, which is half of the 128 default interface priority. </PARA></LISTITEM>
<LISTITEM><PARA>Verify the configuration with the <INLINECODE>show spantree</INLINECODE> command. </PARA></LISTITEM>
<LISTITEM><PARA>Create an EtherChannel bundle between your two switches, but before you do, make sure your port configurations are exactly the same. Change the 1900 switch back to the default configuration. Type <INLINECODEUSERINPUT>spantree cost 10</INLINECODEUSERINPUT> and <INLINECODEUSERINPUT>spantree priority 128</INLINECODEUSERINPUT> from interface configuration mode. Also, set the duplex of the links to full duplex on both the 1900 and 5000. Set the 5000 to be 100Mbps as well.</PARA></LISTITEM>
<LISTITEM><PARA>From the 1900 interface configuration mode, type <INLINECODEUSERINPUT>duplex full</INLINECODEUSERINPUT> on both ports.</PARA></LISTITEM>
<LISTITEM><PARA>From the 5000 series switch, type <INLINECODEUSERINPUT>set port speed 100</INLINECODEUSERINPUT> and <INLINECODEUSERINPUT>set port duplex full</INLINECODEUSERINPUT> from port 1/1 and 1/2.</PARA></LISTITEM>
<LISTITEM><PARA>Set the EtherChannel bundle to on for the 1900 switch by typing <INLINECODEUSERINPUT>port-channel mode on</INLINECODEUSERINPUT> from global configuration mode.</PARA></LISTITEM>
<LISTITEM><PARA>From the 5000 series switch, turn on EtherChannel by typing <INLINECODEUSERINPUT>set port channel 1/1-2 on</INLINECODEUSERINPUT>.</PARA></LISTITEM>
<LISTITEM><PARA>Verify the EtherChannel bundle by typing <INLINECODEUSERINPUT>show port channel</INLINECODEUSERINPUT>. </PARA></LISTITEM>
</LIST>
</SECTION>
<TESTSECTION ID="5.7"><TITLE>Answers to Written Lab</TITLE>
<TESTDATA>
<TESTBLOCK><ANSWERBLOCK><ANSWER><INLINECODE>set spantree root 50-1000 dia 4</INLINECODE></ANSWER></ANSWERBLOCK></TESTBLOCK>