Configuring STP Protocol
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 MX Routers
Beginning with Release 14.1R1, these enhancements are supported on STP logs in the MX Series support:
Logging of information in the internal ring buffer about events like Spanning Tree (such as STP, MSTP, RSTP, or VSTP) interface role or state change without having to configure STP traceoptions.
Capturing information as to what triggered the spanning-tree role or state change.
STP on SRX Firewalls
Spanning Tree Protocol (STP) is not supported on SRX devices from Junos Os Release 15.1X49-D40 to Junos OS Release 15.1X49-D60.
Starting in Junos OS Release 15.1X49-D70, the Spanning Tree Protocol (STP) is supported on SRX300, SRX320, SRX340, SRX345, SRX550M, and SRX1500 devices.
STP on EX Series Switches
EX Series switches configured to use STP actually run RSTP force version 0, which is compatible with STP. If you are using Junos OS for EX Series switches with support for the Enhanced Layer 2 Software (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 on EX Series Switches (CLI Procedure)
The default spanning-tree protocol for EX Series switches 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:
- Either delete RSTP on the entire switch or disable RSTP
on specific interfaces:
To delete RSTP on the entire switch:
user@switch# delete rstp
To disable RSTP on a specific interface:
user@switch# set rstp interface interface-name disable
- Enable STP either on all interfaces or on a specific interface:
- (Optional) Only if a routed VLAN interface (RVI) is configured,
enable the Address Resolution Protocol (ARP) for faster MAC address
To enable ARP on STP on all interfaces:
To enable ARP on STP on a specific interface: