Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

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



    vstp { bpdu-block-on-edge; disable; force-version stp; vlan (all | vlan-id | vlan-name) { bridge-priority priority; forward-delay seconds; hello-time seconds; interface (all | interface-name) {arp-on-stp;bpdu-timeout-action {block;log;} cost cost;disable; edge; mode mode; no-root-port; priority priority;} max-age seconds; traceoptions {file filename <files number > <size size> <no-stamp | no-world-readable | world-readable>;flag flag;}}}

    Hierarchy Level

    [edit protocols]

    Release Information

    Statement introduced in Junos OS Release 9.4 for EX Series switches.


    Configure VLAN Spanning Tree Protocol (VSTP). VSTP is used to prevent loops in Layer 2 networks on a per-VLAN basis.

    You can have a maximum of 253 VSTP VLANs per switch.

    If the number of VLANs on your switch exceeds the VSTP VLAN limit, you must use the vlan (Spanning Trees) statement to specify which VLANs or VLAN groups use VSTP. You also cannot use the vlan all option to configure VSTP when your switch has more than the maximum allowed VSTP VLANs. To ensure all VLANs are running a spanning-tree protocol, run RSTP for networks with large numbers of VLANs .

    Note: When you configure VSTP with the set protocol vstp vlan all command, VLAN ID 1 is not set; it is excluded so that the configuration is compatible with Cisco PVST+. If you want VLAN ID 1 to be included in the VSTP configuration on your switch, you must set it separately with the set protocol vstp vlan 1 command.

    Note: Option vlan all is not supported in Junos OS Release 13.2X50.

    Best Practice: Configure RSTP when you configure VSTP. RSTP overhead is minimal and this configuration ensures that some spanning tree protocol is running on all VLANs on your switch, even when your switch has more than the maximum number of allowed VSTP VLANs.

    The remaining statements are explained separately.


    VSTP is not enabled by default.

    Required Privilege Level

    routing—To view this statement in the configuration.
    routing-control—To add this statement to the configuration.

    Modified: 2016-04-29