Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
keyboard_arrow_right

vstp

date_range 20-Nov-23

MX Series

content_copy zoom_out_map
vstp {
    bpdu-block-on-edge;
    force-version stp;
    interface interface-name {
        bpdu-timeout-action {
            alarm;
            block;
        }
        cost cost;
        edge;
        mode (p2p | shared);
        no-root-port;
        priority interface-priority;
    }
    priority-hold-time seconds;
    vlan vlan-id {
        bridge-priority priority;
        forward-delay seconds;
        hello-time seconds;
        max-age seconds;
        interface interface-name {
            access-trunk
            bpdu-timeout-action {
                alarm;
                block;
            }
            cost cost;
            edge;
            mode (p2p | shared);
            no-root-port;
            priority interface-priority;
            system-identifier 00:00:01:00:00:01
        }
    }
    traceoptions {
        file filename <files number> <size size> <world-readable | no-world-readable>;
        flag flag <flag-modifier> <disable>;
    }
}

EX Series, QFX Series, QFabric

content_copy zoom_out_map
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;
                                system-identifier 00:00:01:00:00:01
        traceoptions {
            file filename <files number > <size size> <no-stamp | no-world-readable | world-readable>;
            flag flag;
        }
    }
}

ELS versions: EX Series, QFX Series, NFX Series

content_copy zoom_out_map
vstp {
    bpdu-block-on-edge;
    disable;
    force-version stp;
    interface  (interface-name disable | interface-range-name | all ){
        bpdu-timeout-action {
            alarm;
            block;
        }
        cost cost;
        edge;
        mode (p2p | shared);
        no-root-port;
        priority interface-priority;
    }
priority-hold-time seconds;
    vlan (vlan-id | all){
        bridge-priority priority;
        forward-delay seconds;
        hello-time seconds;
        max-age seconds;
        interface (interface-name disable | interface-range-name | all ){
            bpdu-timeout-action {
                alarm;
                block;
            }
            cost cost;
            edge;
            mode (p2p | shared);
            no-root-port;
            priority interface-priority;
            system-identifier 00:00:01:00:00:01
        }
    }
    traceoptions {
        file filename <files number> <size size> <world-readable | no-world-readable>;
        flag flag <flag-modifier> <disable>;
    }
    vlan-group group group-name {
        vlansvlan-name (vlan-id |vlan-range | open-set-of-values) {
            interface all;
            interface interface-name {
                disable;
            }
        }
    }

Hierarchy Level

content_copy zoom_out_map
[edit protocols]
content_copy zoom_out_map
[edit logical-systems logical-system-name protocols],
[edit logical-systems logical-system-name routing-instances routing-instance-name protocols],
content_copy zoom_out_map
[edit protocols],
content_copy zoom_out_map
[edit routing-instances routing-instance-name protocols]

Description

Configures 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 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. 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.

By default, the chassis MAC address is advertised as the bridge address in the BPDU. If you want to change the bridge address advertised in the BPDU, you must configure the system identifier by using the system-identifier option.

The remaining statements are explained separately. See CLI Explorer.

Default

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.

Release Information

Statement introduced in Junos OS Release 9.0.

bpdu-block-on-edge statement added in Junos OS Release 9.4.

bpdu-timeout-action statement added in Junos OS Release 9.4.

Support for logical systems added in Junos OS Release 9.6.

Statement updated in Junos OS Release 15.1 for EX Series switches to support configuration of spanning tree parameters globally on all interfaces.

system-identifier statement added in Junos OS Release 11.3.

Note:

You cannot disable spanning tree parameters globally on all interfaces.

external-footer-nav