Supported Platforms
Configuring VLAN Spanning Tree Protocol
VLAN Spanning Tree Protocol (VSTP) enables the device to run one or more Spanning Tree Protocol (STP) or Rapid Spanning Tree Protocol (RSTP) instances for each VLAN on which VSTP is enabled. For networks with multiple VLANs, VSTP improves intelligent tree spanning by defining the best paths within the VLANs instead of within the entire network.
![]() | Note: This task uses Junos OS software that does not support the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that supports ELS, see Configuring VLAN Spanning-Tree Protocol. |
To configure VSTP:
- (Optional) Enable Rapid Spanning Tree Protocol (RSTP):
[edit protocols]
user@switch# set rstpVSTP can run on a maximum of 253 VLANs; RSTP runs on the remaining VLANs if configured. Enabling RSTP ensures that a spanning-tree protocol runs on all VLANs.
- Enable VSTP.
- To enable VSTP on multiple VLANs using a VLAN group:
[edit protocols]
user@switch# set vstp vlan-group group group-name vlan vlan-id-range - To enable VSTP on all VLANs:
[edit protocols]
user@switch# set vstp vlan allNote: You must enable RSTP if you used the set vstp vlan all statement to enable VSTP and if the switch has more than 253 VLANs. If you use the set vstp vlan all statement to enable VSTP on a switch with more than 253 VLANs, the configuration cannot be committed.
- To enable VSTP on a VLAN using a single VLAN ID:
[edit protocols]
user@switch# set vstp vlan vlan-id - To enable VSTP on a VLAN using a single VLAN name:
[edit protocols]
user@switch# set vstp vlan vlan-name
- To enable VSTP on multiple VLANs using a VLAN group: