In this lab, you’ll test PortFast and UplinkFast on the network; then you’ll configure the 4000 series switch as an STP root and add EtherChannel between the 4000 and 2950 switches. Figure 5.2 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.
Figure 5.2: Network diagram for the hands-on lab
Configure both the 4000 series switch and the 2950 switch with the hands-on labs from Chapter 2, “Connecting the Switch Block,” and Chapter 3, “VLANs, Trunks, and VTP.” Each switch should have the hostname, interface descriptions, passwords, VTP domain information, and VLANs configured and trunk links on. Test by pinging from the workstation to the 2950 and 4000 switch.
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 fa0/4 of the 2950 switch and then from the DOS prompt of your workstation, ping the 4000 series switch.
Ping -t 172.16.10.4
The -t will keep the ping running. Go to the 2950 switch and perform a shutdown and no shutdown on interface fa0/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 might resume faster).
Leave the pings running. Go to int fa0/4 and type spanning-tree portfast, which turns on PortFast for that port.
Go to the 2950 switch and perform a shutdown, then a no shutdown on fa0/4. The pings will time out but should resume after only a few seconds.
Leave the Ping program running. Type show spanning-tree vlan 1 and notice which port is forwarding and which port is blocking.
Leave the Ping program running. Perform a shutdown on the forwarding interface. Notice that the pings have timed out, but they should resume after a few seconds.
Type show spanning-tree vlan 1 and notice which port is forwarding.
Perform a no shutdown on the port that you originally shut down. Notice that the pings have timed out again, but the pings should resume after a few moments.
Turn on UplinkFast on your 2950 forwarding port by typing spanning-tree uplink-fast from global configuration mode.
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.
Configure the 4000 series switch as the STP root switch by typing set spantree root 1-4 dia 2 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.
Verify the configuration by typing show spantree 1. Notice the root designation.
Make sure your links are trunked by typing show trunk on the 4000 series switch.
Go to the 2950 and verify the forwarding port. Change the cost of the forwarding port to 20, which should make the blocked port the forwarding port. Type spanning-tree cost 20 in interface configuration mode on the forwarding port.
Verify the configuration with the show spanning-tree command and notice that the blocked port is now forwarding and the forwarding port has been changed to blocked. Also notice the port costs.
Set the port priority on the forwarding port as well, to make sure that STP always uses this port to forward, by typing spanning-tree port-priority 64 from interface configuration, which is half of the 128 default interface priority.
Verify the configuration with the show spantree command.
Create an EtherChannel bundle between your two switches, but before you do, make sure your port configurations are exactly the same. Change the 2950 switch back to the default configuration. Type spanning-tree cost 10 and spanning-tree port-priority 128 from interface configuration mode. Also, set the duplex of the links to full-duplex on both the 2950 and 4000. Set the 4000 to be 100Mbps as well.
From the 2950 interface configuration mode, type duplex full on both ports.
From the 4000 series switch, type set port speed 100 and set port duplex full for ports 1/1 and 1/2.
Set the EtherChannel bundle to on for the 2950 switch by typing the interface command channel-group group_number mode mode_type.
From the 4000 series switch, turn on EtherChannel by typing set port channel 1/1-2 on.
Verify the EtherChannel bundle by typing show port channel.