Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?


Configuring STP

Understanding STP

Spanning Tree Protocol (STP), defined in IEEE 802.1D, creates a tree of links in the Ethernet switched network. Links that cause loops in the network are disabled, thereby providing a single active link between any two devices.

Benefits of Using the Original STP

Some benefits of using the original STP are:

  • Some legacy networks require the slower convergence times of basic STP.

  • STP supports older 802.1D 1998 bridges.

  • You can run RSTP on some switches and STP on others with 802.1D 1998 bridges. They are compatible.

STP on Devices That Support Enhanced Layer 2 Software (ELS)

Devices configured to use STP run RSTP force version 0, which is compatible with STP. If you are using Junos OS for devices that support ELS configuration style, you can force the original IEEE 802.1D Spanning Tree Protocol (STP) version to run in place of RSTP or VSTP by setting force-version.

STP Operation Mode Commands

You can use the operational mode commands show spanning-tree statistics message-queues, show spanning-tree stp-buffer see-all, show spanning-tree statistics bridge, and show spanning-tree statistics interface to get the information from ring-buffer, bridge, and port statistics. clear spanning-tree stp-buffer clears the stp-buffer, and clear spanning-tree statistics bridge clears the statistics of the bridge.

Understanding System Identifiers for Bridges in STP or RSTP Instances

Spanning tree protocols work by creating bridges. A root bridge (switch) is a bridge at the top of a Spanning Tree. Ethernet connections branch out from the root switch, connecting to other switches in the Local Area Network (LAN). An extended system identifier is assigned to bridges in STP or RSTP routing instances—see extended-system-id.

When you configure STP or RSTP, you specify the extended system identifier.

Configuring STP

The default spanning-tree protocol for devices that support Enhanced Layer 2 Software (ELS) is Rapid Spanning Tree Protocol (RSTP). RSTP provides faster convergence times than the original Spanning Tree Protocol (STP). However, some legacy networks require the slower convergence times of basic STP that work with 802.1D 1998 bridges.

If your network includes 802.1D 1998 bridges, you can remove RSTP and explicitly configure STP. When you explicitly configure STP, the switches use the IEEE 802.1D 2004 specification, force version 0. This configuration runs a version of RSTP that is compatible with the classic, basic STP.

To configure STP:

  1. Either delete RSTP on the entire switch or disable RSTP on specific interfaces:
    • To delete RSTP on the entire switch:

    • To disable RSTP on a specific interface:

  2. Enable STP either on all interfaces or on a specific interface:
    • To enable STP on all interfaces:

    • To enable STP on a specific interface:

  3. (Optional) Only if a routed VLAN interface (RVI) is configured, enable the Address Resolution Protocol (ARP) for faster MAC address recovery:
    • To enable ARP on STP on all interfaces:

    • To enable ARP on STP on a specific interface: