How does spanning tree portfast work




















Use loop guard only in topologies where there are blocked ports. Topologies that have no blocked ports, which are loop free, do not need to enable this feature.

Enabling loop guard on a root switch has no effect but provides protection when a root switch becomes a nonroot switch. Note We recommend that you enable loop guard on root ports and alternate root ports on access switches.

Loop guard is effective only if the port is a root port or an alternate port. Do not enable loop guard and root guard on a port at the same time. Because a PortFast-enabled port will not be a root port or alternate port, loop guard and PortFast cannot be configured on the same port. Do not configure a loop guard-enabled port with dynamic VLAN membership.

The port transitions out of the inconsistent state after the message age expires. Loop guard ignores the message age expiration on type-inconsistent ports and PVID-inconsistent ports. If the port is already blocked by loop guard, misconfigured BPDUs that are received on the port make loop guard recover, but the port is moved into the type-inconsistent state or PVID-inconsistent state.

The newly activated supervisor engine recovers the port only after receiving a BPDU on that port. However, to form a channel, all the physical ports grouped in the channel must have compatible configurations. PAgP enforces uniform configurations of root guard or loop guard on all the physical ports to form a channel.

If that link becomes unidirectional, loop guard blocks the channel, even if other links in the channel are functioning properly. The individual physical ports may obtain the forwarding state with the designated role, even if one or more of the links that formed the channel are unidirectional.

A loop may occur until UDLD detects the failure, but loop guard will not be able to detect it. Enable PortFast on a switch port that is connected to a single workstation, switch, or server.

This example shows how to enable PortFast on port 1 of module 4 and verify the configuration the PortFast status is shown in the "Fast-Start" column :. Enable PortFast on a trunk port that is connected to a single workstation, switch, or server.

Note If you enter the set spantree portfast command on a trunk port without entering the trunk keyword, the trunk port stays in disable mode.

This example shows how to enable PortFast on port 1 of module 4 of a trunk port, bring the trunk port to a forwarding state, and verify the configuration the PortFast status is shown in the "Fast-Start" column :. Note When you enable PortFast between two switches, the system will verify that there are no loops in the network before bringing the blocking trunk to a forwarding state.

To disable PortFast on a switch or trunk port, perform this task in privileged mode:. To reset PortFast on a switch or trunk port to its default settings, perform this task in privileged mode:.

This example shows how to reset PortFast to its default settings on port 1 of module The port configuration overrides the global configuration unless the port configuration is set to default. If the port configuration is set to default, the global configuration is checked.

If the port configuration is enabled, the port configuration is used and the global configuration is not used. By default, BPDU filtering is set for each port. The following sections describe how to configure the UplinkFast feature on the switch. When you enable UplinkFast on the switch, UplinkFast processing is enabled and the spanning tree bridge priority for all VLANs is set to 49,, making it unlikely that the switch will become the root switch. The spanning tree port cost and port-VLAN cost of all ports on the switch is increased by Enter the all-protocols on keywords on switches that have UplinkFast enabled, but do not have protocol filtering enabled, and that are connected to upstream switches in the network that have protocol filtering enabled.

The all-protocols on keywords cause the switch to generate multicasts for each protocol-filtering group. On switches with both UplinkFast and protocol filtering enabled, or if no other switches have protocol filtering enabled, you do not need to use the all-protocols on keywords.

This example shows how to enable UplinkFast with a station-update rate of 40 packets per ms and verify that UplinkFast is enabled:. To disable UplinkFast and restore the default spanning tree bridge priority, port cost, and port-VLAN cost values to their default values, enter the clear spantree uplinkfast command.

You can disable only spanning tree UplinkFast processing on the switch using the set spantree uplinkfast disable command. This command does not affect the bridge priority, port cost, and port-VLAN cost values on the switch. This example shows how to disable UplinkFast on the switch and restore the default bridge priority, port cost, and port-VLAN cost values:.

Note You must enable BackboneFast on all switches in the network. This feature is supported for use with third-party switches. Hello Lazaros, Thanks for answering my question. You have cleared things up for me. Also thanks for the additional reading info…. Can you tell me what is the difference between the commands listed below: spanning-tree portfast edge spanning-tree portfast network spanning-tree normal and when should you use which one?

Hello Cecil! All ports directly connected to end devices cannot create bridging loops in the network. Therefore, the edge port directly transitions to the forwarding state, and skips the listening and learning stages. However, the specific command configures a port such that if it receives a BPDU, it immediately loses its edge port status and becomes a normal spanning-tree port.

A switch will never generate a topology change notification for an interface that has portfast enabled. The main purpose of STP is to ensure that you do not create loops when you have redundant paths in your network.

Loops are deadly to a network. Connecting switches to PortFast-enabled ports can cause Layer 2 loops or topology changes. To display a detailed summary of interface information, run "show spanning-tree detail" command as shown below.

Not configuring spanning tree at all As I said, spanning tree is a good thing. But for some reason, a lot of switch vendors disable it by default. So out of the box, you might have to enable the protocol. You can always disable spanning - tree with mode portfast, and then enable bpduguard to prevent switching loops.

This is also beneficial for detecting rouge switching devices. Be warned that the port will be disabled when a switch is plugged in. We don't have STP enabled on any of the ports connected to devices. Enabling the PortFast feature causes a switch or a trunk port to enter the STP forwarding-state immediately or upon a linkup event, thus bypassing the listening and learning states.

When PortFast feature is enabled on a switch or a trunk port , the port immediately transitions to the STP forwarding state.

Eliminating loops with spanning tree If your switches are connected in a loop without STP, each switch would infinitely duplicate the first broadcast packet heard because there's nothing at Layer 2 to prevent a loop. STP prevents loops by blocking one or more of the links. Enter configuration commands, one per line. The Spanning Tree Protocol STP is responsible for identifying links in the network and shutting down the redundant ones, preventing possible network loops.

In order to do so, all switches in the network exchange BPDU messages between them to agree upon the root bridge.



0コメント

  • 1000 / 1000