Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation
Guide That Contains This Content
[+] Expand All
[-] Collapse All

    Configuring the Spanning Tree Protocol (CLI Procedure)

    Starting in Junos OS Release 15.1X49-D70, the Spanning Tree Protocol (STP) is supported on SRX300, SRX320, SRX340, SRX345, SRX550M, and SRX1500 devices.

    Spanning Tree Protocol (STP) is not supported from Junos OS Release 15.1X49-D40 to Junos OS Release 15.1X49-D60.

    This example shows how to configure the Spanning Tree Protocol by using the CLI.

    Requirements

    Before you begin, understand the Spanning Tree Protocol. See Understanding the Spanning Tree Protocol.

    Overview

    The default spanning-tree protocol for SRX Series devices 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 devices 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.

    This configuration runs a version of RSTP that is compatible with the classic, basic STP.

    Configuration

    CLI Quick Configuration

    To quickly configure this section of the example, copy the following commands, paste them into a text file, remove any line breaks, change any details necessary to match your network configuration, copy and paste the commands into the CLI at the [edit] hierarchy level, and then enter commit from configuration mode.

    set protocols rstp
    set protocols rstp interface ge-0/0/1
    set protocols rstp force-version stp interface all
    set protocols rstp force-version stp interface ge-0/0/1

    Step-by-Step Procedure

    The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

    To configure STP:

    1. Configure RSTP on the entire device or on a specific interfaces:
      • To configure RSTP on the entire device:
        [edit protocols]
        user@host# set rstp
      • To configure RSTP on a specific interface:
        [edit protocols]
        user@host# set rstp interface ge-0/0/1
    2. Enable STP either on all interfaces or on a specific interface:
      • To enable STP on all interfaces:
        [edit protocols]
        user@host# set rstp force-version stp interface all
      • To enable STP on a specific interface:
        [edit protocols]
        user@host# set rstp force-version stp interface ge-0/0/1

    Results

    From configuration mode, confirm your configuration by entering the show protocols command. If the output does not display the intended configuration, repeat the configuration instructions in this example to correct it.

    l2-learning {
    global-mode switching;
    }
    rstp {
    interface ge-0/0/1;
    interface all;
    force-version stp;
    }

    If you are done configuring the device, enter commit from configuration mode.

    Verification

    Verifying STP

    Purpose

    Verify that STP is configured on your system.

    Action

    From operational mode, enter the show spanning-tree interface command.

    user@host> show spanning-tree interface
    Spanning tree interface parameters for instance 0
    
    Interface                  Port ID    Designated         Designated         Port    State  Role
                                           port ID           bridge ID          Cost
    ge-0/0/1                     128:2        128:2  32768.307c5e44b250        20000    BLK    DIS
    

    Meaning

    The output shows the STP is configured on an interface ge-0/0/1.

    Modified: 2017-08-31