PortFast:
Enabled only on edge ports and once it is enabled and if the port receives an electric signal immediately transitions to Forwarding state.
BPDUGuard:
If enabled along with Portfast and if the port receives BPDU port will be moved to err-disabled state.
Uplink Fast:
Enabled only on edge ports and once it is enabled and if the port receives an electric signal immediately transitions to Forwarding state.
BPDUGuard:
If enabled along with Portfast and if the port receives BPDU port will be moved to err-disabled state.
Uplink Fast:
In this section, refer to the previous diagram, which uses a minimal backbone. The behavior of the STP is inspected in the event of uplink failure. Each step is followed with a diagram.
D1 and D2 are core switches. D1 is configured as the root bridge of the network. A is an access switch with one of its uplinks in blocking mode
- Assume that the primary uplink from A to D1 fails.
- Port P1 goes down immediately and switch A declares its uplink to D1 as down.
Switch A considers its link to D2, which still receives BPDUs from the root, as an alternate root port. Bridge A can start to transition port P2 from the blocking state to the forwarding state. In order to achieve this, it has to go through the listening and learning stages. Each of these stages last forward_delay (15 seconds by default), and holds port P2 blocking for 30 seconds. - Once port P2 reaches the forwarding state, the network connectivity is re-established for hosts attached to switch A.
The network outage lasted 30 seconds.
The minimum value allowed for the forward_delay timer is seven seconds. Tuning the STP parameters can lead to a recovery time of 14 seconds. This is still a noticeable delay for a user, and this kind of tuning should be done with caution. This section of this document shows how UplinkFast dramatically reduces the downtime.
Backbone Fast:
This scenario is based on the first example, but, this time with backbone fast enabled on the three switches.
- If link L1 goes down, switch B immediately detects the failure and assumes it is the root. It starts to send BPDUs to S and claims to be the new root.
- As soon as S receives the inferior BPDU from B, it starts to reconfirm its non-designated ports instead of waiting max_age. It sends a RLQ query on its root port for root bridge R.
- Root bridge R receives the query and immediately answers with a RLQ response that specifies there is still a root R in that direction.
- S has now checked all its non-designated ports, and it still has connectivity to the root. It can then age out immediately the information stored on port P. P transitions to listening and starts to send BPDUs. At that stage, you have already saved max_age seconds, and the standard Spanning-Tree Algorithm (STA) applies then.
- B receives the better BPDU from S (R better root than B) and considers now the ports that lead to L3 as its root port.
Root Guard:
The Root Guard feature can be enabled on all switch ports in the network off of which the root bridge should not appear (that is, every port that is not a root port , the port on each switch that is considered to be closest to the root
bridge). If a port configured for Root Guard receives a superior BPDU, instead of believing the BPDU, the port goes into a root-inconsistent state. While a port is in the root-inconsistent state, no user data is sent across it. However, after the superior BPDUs stop, the port returns to the forwarding state.