What is Spanning Tree and Portfast, and how can they affect my Deployment Solution environment?
Deployment Solution 7.x, 8.x
The Spanning-Tree Protocol (STP) was created to overcome the problems of transparent bridging in redundant networks. The purpose of STP is to avoid and eliminate loops in the network by negotiating a loop-free path through a root bridge. This is done by determining where there are loops in the network and blocking links that are redundant.
Spanning-Tree Protocol executes an algorithm called the Spanning-Tree Algorithm (STA). In order to find redundant links, STA will choose a reference point called a Root Bridge, and then determines all the available paths to that reference point. If it finds a redundant path, it chooses for the best path to forward and for all other redundant paths to block. This effectively severs the redundant links within the network.
All switches participating in STP gather information on other switches in the network through an exchange of data messages. These messages are referred to as Bridge Protocol Data Units (BPDUs). The exchange of BPDUs in a switched environment will result in the election of a root switch for the stable spanning-tree network topology, election of designated switch for every switched segment, and the removal of loops in the switched network by placing redundant switch ports in a backup state.
During the execution of the Spanning-Tree Algorithm, Spanning-Tree will force the ports to go into five different states:
A description of each state follows:
The transitioning period from state to state takes the following times by default:
Spanning-Tree protocol is running by default on all ports of the switch. The spanning-tree protocol makes each port wait up to 50 seconds before data is allowed to be sent on the port. This Delay in turn can cause problems with some applications/protocols (PXE, Bootworks, etc.). To alleviate the problem, Porfast was implemented on Cisco devices, the terminology might differ between different vendor devices.
PortFast causes a port to enter the forwarding state almost immediately by dramatically decreasing the time of the listening and learning states. Portfast minimizes the time it takes for the server or workstation to come online, thus preventing problems with applications such as DHCP, DNS, Novell IPX, PXE, BootWorks, etc.
The spanning-tree protocol is always running even when the port is in forwarding state so that it can still detect loops, however the use of Portfast should only be implemented when the port on the switch is directly connected to a server/workstation and never to another hub/switch.
To enable portfast on Cisco switches you must enter the following command:On set based switches at the Switch>(enable)" prompt:
Set Spantree portfast <mod_number/port_number>
on IOS based switches: at the "switch(config-if)#" prompt:
spantree start-fowarding