Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring VSTP Protocol

Virtual Spanning-Tree Protocol works with VLANs that require device compatibility.

Understanding VSTP

When using VSTP, we recommend that you enable VSTP on all VLANs that can receive VSTP bridge protocol data units (BPDUs).

Benefits of VSTP

VSTP has the following benefits:

  • Connects devices that are not part of the network

  • Compatible with Cisco PVST+

  • VSTP and RSTP are the only spanning-tree protocols that can be configured concurrently on a device.

VSTP Restrictions

VSTP has these restrictions:

  • The EX Series switches EX4300, EX4600 and the QFX platforms QFX5100,QFX3500,QFX3600 support 510 Vlans on VSTP.

  • VSTP is not supported on the SRX platform - just STP/RSTP/MSTP are supported on SRX Series.

  • On EX Series (except EX9200) and QFX Series switches running Junos OS that supports ELS—VSTP can support up to 510 VLANs.

  • On EX9200 switches—VSTP can support up to 4000 VLANs.

  • On an EX Series switch running Junos OS that does not support ELS—VSTP can support up to 253 VLANs.

Recommended Uses of VSTP

You can use Juniper Networks switches with VSTP and Cisco switches with PVST+ and Rapid-PVST+ in the same network. Cisco supports a proprietary Per-VLAN Spanning Tree (PVST) protocol, which maintains a separate spanning tree instance per each VLAN. One Spanning Tree per VLAN allows fine grain load balancing but requires more BPDU CPU processing as the number of VLANs increases. PVST runs on Cisco proprietary ISL trunks which is not supported by Juniper. Juniper switches only inter-operate with PVST+ and Rapid-PVST+. For more information, see VSTP and RPVST+ convergence on native-vlan 1 for EX Switches .

Tip:

If your device interoperates with a Cisco device running Rapid per VLAN Spanning Tree (Rapid PVST+), we recommend that you enable both VSTP and RSTP on the EX Series or QFX Series interface.

VSTP and RSTP are the only spanning-tree protocols that can be configured concurrently on a device. The maximum number of VLANs that can be supported by VSTP on a switch depends upon whether you are using Junos OS for EX Series and QFX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style or Junos OS that does not support ELS. For ELS details, see Using the Enhanced Layer 2 Software CLI. For additional VLANs, use RSTP.

The maximum number of VLANs supported by VSTP on a switch depends upon whether you are using Junos OS for EX Series and QFX Series switches with support for the Enhanced Layer 2 Software (ELS) configuration style or Junos OS that does not support ELS.

Global and Specific VSTP Configurations for Switches

Juniper Networks EX Series Ethernet Switches provide Layer 2 loop prevention through Spanning Tree Protocol (STP), Rapid Spanning Tree Protocol (RSTP), Multiple Spanning Tree Protocol (MSTP), and VLAN Spanning Tree Protocol (VSTP). The default factory configuration for EX Series switches uses RSTP. This topic describes options for configuring VSTP on an EX Series or QFX Series switch.

Note:

On EX Series (other than EX9200) and QFX switches running Junos OS that supports ELS—VSTP can support up to 510 VLANs. However, on EX9200 switches, VSTP can support only up to 253 VLANs.

Note:

When you configure VSTP, we recommend that you enable VSTP on all VLANs that can receive VSTP bridge protocol data units (BPDUs).

Where Can I Configure VSTP?

You can configure VSTP at the global level:

  • For all interfaces on the switch

  • For all interfaces within all VLANs

  • For all interfaces within a specified VLAN

  • For all interfaces within a specified VLAN group

You can configure or disable VSTP for specific interfaces:

  • For a specific interface on the switch

  • For a specific interface within all VLANs

  • For a specific interface within a specified VLAN

  • For a specific interface within a specified VLAN group

Note:
  • If you configure VSTP on an interface at both the global and the specific VLAN level, the interface configuration that is defined at the specific VLAN level overrides the interface configuration that is defined at the global level.

  • If you specify VSTP to be configured on an interface that is not configured to belong to the VLAN (or VLANs), an error message is displayed.

  • On EX Series (other than EX9200) and QFX switches running Junos OS that supports ELS—VSTP can support up to 510 VLANs. However, on EX9200 switches, VSTP can support only up to 253 VLANs.

  • When you configure VSTP, we recommend that you enable VSTP on all VLANs that can receive VSTP bridge protocol data units (BPDUs).

    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.

VSTP Commands to Configure All Interfaces

Command to configure VSTP on an individual interface on a switch:

Command to configure all VSTP interfaces on a switch:

Command to configure all VSTP interfaces for all VLANs:

Note:

When you issue the set protocols vstp vlan all interface all command, you might not receive an error message when you have exceed the limit of 5119 vports.

Command to configure all VSTP interfaces within a specified VLAN:

Note:

When you configure VSTP with the set protocol vstp vlan vlan-id interface interface-name command, the VLAN named default is excluded. You must manually configure a VLAN with the name default to run VSTP.

Command to configure all VSTP interfaces within a specified VLAN group:

VSTP Commands to Configure Specific Interfaces

Command to configure a specific interface on a switch:

Command to configure a specific interface within all VLANs:

CAUTION:

Ensure that the interface is a member of all VLANs before you add the interface to the VSTP configuration. If the interface is not a member of all VLANs, this VSTP configuration will fail when you try to commit it.

Command to configure a specific interface within a specific VLAN:

Command to configure a specific interface within a specific VLAN group:

VSTP Commands to Disable Interfaces

Command to disable VSTP on an individual interface on a switch:

Command to disable VSTP on a specific interface within a specific VLAN on a switch:

Command to disable one specific VSTP interface on all the VLANs on the switch:

Command to disable a specific VSTP interface within a specific VLAN group:

Note:

You cannot disable the VSTP VLAN parameters for all VSTP interfaces.

Example: Configuring VSTP on a Trunk Port with Tagged Traffic

In 802.1ad provider bridge networks (stacked VLANs), single-tagged access ports and double-tagged trunk ports can co-exist in a single spanning tree context. In this mode, the VLAN Spanning Tree Protocol (VSTP) can send and receive untagged Rapid Spanning Tree Protocol (RSTP) bridge protocol data units (BPDUs) on Gigabit Ethernet (ge), 10 -Gigabit Ethernet (xe), and aggregated Ethernet (ae) interfaces. The untagged RSTP BPDUs interoperate with tagged VSTP BPDUs sent over the double-tagged trunk ports.

Double-tagging can be useful for Internet service providers, allowing them to use VLANs internally while mixing traffic from clients that are already VLAN-tagged.

This example shows how to configure the VSTP to send and receive standard untagged Rapid Spanning Tree Protocol (RSTP) bridge protocol data units (BPDUs) on access trunks that interoperate with tagged VSTP BPDUs sent over the double-tagged trunk ports.

Requirements

This example uses the following hardware and software components:

  • Two CE devices (MX Series routers with DPCE or MPC cards)

  • Two PE devices (MX Series routers with DPCE or MPC cards)

  • Junos OS Release 12.3 or later running on the PE devices

Overview

This example shows how to configure VSTP on a trunk port with tagged traffic.

Topology

Figure 1 shows a sample topology in which two customer edge (CE) bridges are dual-homed to two provider edge (PE) devices. All of the PE-CE links are single-tagged trunks using C-VLANs 1-100. The core link between Devices PE1 and PE2 is a double-tagged trunk that carries traffic from both CE devices, using S-VLANs 100 and 200 to distinguish the CE traffic.

Two VSTP instances are created on the PE devices, one for each S-VLAN. The CE devices run the standard RSTP. The PE devices run VSTP on the core link while sending standard untagged RSTP BPDUs toward the CE devices.

Figure 1: Topology for VSTP Configured on a Trunk Port with Tagged TrafficTopology for VSTP Configured on a Trunk Port with Tagged Traffic

Configuration

CLI Quick Configuration

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

Device PE1

Device PE2

Device CE1

Device CE2

Configuring PE1, PE2, CE1, and CE2

Step-by-Step Procedure

The following example requires you to navigate various levels in the configuration hierarchy. For information about navigating the CLI, see Using the CLI Editor in Configuration Mode in the CLI User Guide.

To configure Device PE1:

  1. Configure the network interfaces.

  2. Configure the routing instances.

Step-by-Step Procedure

To configure Device PE2:

  1. Configure the interfaces.

  2. Configure the routing instances.

Step-by-Step Procedure

To configure CE1:

  1. Configure the interfaces.

  2. Configure the protocols.

  3. Configure the bridge domain.

Step-by-Step Procedure

To configure CE2:

  1. Configure the interfaces.

  2. Configure the protocols.

  3. Configure the bridge domain.

Results

From configuration mode, confirm your configuration by entering the show interfaces, show routing-instances, show protocols, and show bridge-domains commands. If the output does not display the intended configuration, repeat the instructions in this example to correct the configuration.

Device PE1

Device PE2

Device CE1

Device CE2

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

Verification

Confirm that the configuration is working properly.

Verifying That the Interfaces Are Operational

Purpose

Verify that the interfaces are operational.

Action

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

Meaning

The output shows the status of the interfaces configured for VLAN 100.

Verifying the STP Bridge Parameters of the Routing Instances

Purpose

Verify the STP bridge parameters configured for the routing instances.

Action

From operational mode, enter the show spanning-tree bridge routing-instance command.

Meaning

The output shows the status of the STP bridge parameters for routing instance vs1.

Displaying STP Statistics for the Configured Bridge

Purpose

Display spanning-tree statistics for the configured bridge.

Action

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

Meaning

The command output shows spanning-tree statistics for the configured bridge.

Reverting to RSTP or VSTP from Forced IEEE 802.1D STP

On MX Series routers and EX Series and QFX Series switches on which Rapid Spanning Tree Protocol (RSTP) or VLAN Spanning Tree Protocol (VSTP) has been forced to run as the original IEEE 802.1D Spanning Tree Protocol (STP) version, you can revert back to RSTP or VSTP.

To revert from the forced instance of the original IEEE 802.1D STP version to the originally configured RSTP or VSTP version:

  1. Remove the force-version statement from the following RSTP or VSTP configuration:

    Include this statement at the following hierarchy levels:

    • [edit logical-systems routing-instance-name protocols rstp]

    • [edit protocols rstp]

    • [edit protocols vstp]

    • [edit routing-instances routing-instance-name protocols rstp]

    • [edit routing-instances routing-instance-name protocols vstp]

  2. Revert the forced IEEE 802.1D STP to run as the configured RSTP or VSTP:

    To revert the STP protocol globally, issue the statement without options (clear spanning-tree protocol-migration).

    To revert the STP protocol for the specified interface only, specify the interface interface-name option.

    To revert the STP protocol for a particular routing instance only, specify the routing-instance routing-instance-name option.