Content

| 3.3 |  | STP Enhancements |
| 3.3.2 |  | PortFast |

Spanning tree PortFast is a Catalyst feature that causes a switch or trunk port to enter the spanning tree Forwarding state immediately, bypassing the Listening and Learning states. IOS-based switches only use PortFast on access ports connected to end stations, as shown in Figure .

When a device is connected to a port, the port normally enters the spanning tree Listening state. When the Forward Delay timer expires, the port enters the Learning state. When the Forward Delay timer expires a second time, the port is transitioned to the Forwarding or Blocking state. When PortFast is enabled on a switch or trunk port, the port is immediately transitioned to the Forwarding state. As soon as the switch detects the link, the port is transitioned to the Forwarding state (less than 2 seconds after the cable is plugged in).

If a loop is detected and PortFast is enabled, the port is transitioned to the Blocking state. It is important to note that PortFast begins only 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 processes are performed (note the difference here from the usual PortFast operation when a link first initializes).

A prime reason for enabling PortFast is in cases where a PC boots in a period less than the 30 seconds it takes a switch to put a port into forwarding mode from disconnected state. Some NICs do not enable a link until the MAC layer software driver is actually loaded. Most operating systems try to use the network almost immediately after loading the driver, as in the case of DHCP. This can create a problem because the 30 seconds of STP delay from listening to Forwarding states begins right when the IOS begins trying to access the network. In the case of DHCP, the PC will not obtain a valid IP address from the DHCP server. This problem is common with PC Card (PCMCIA) NICs used in laptop computers. Additionally, there is a race between operating systems and CPU manufacturers. CPU manufacturers keep making the chips faster, while at the same time, operating systems keep slowing down, but the chips are speeding up at a greater rate than the operating systems are slowing down. As a result, PCs are booting faster than ever. In fact, modern machines are often finished booting and need to use the network before the STP 30-second delay is over.

This problem motivates some network administrators to disable STP altogether. This certainly fixes any STP booting problems, but it can easily create other problems. If this strategy is employed, all physical loops must be eliminated meaning no redundancy. STP cannot be disabled for a single port so the PortFast feature should be considered. The PortFast feature gives the best of both worlds, immediate end-station access and the safety net of STP.