Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Configuring VSTP

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

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

VSTP Restrictions

VSTP has the following restrictions:

  • Devices running Layer 2 next-generation (L2NG) software support 510 VLANs on VSTP.

  • SRX Series Firewalls support only STP, RSTP, and MSTP; VSTP is not supported.

  • In devices that does not support Enhanced Layer 2 Software (ELS), VSTP can support up to 253 VLANs.

Recommended Uses of VSTP

You can use Juniper Networks devices with VSTP, which maintains a separate spanning tree instance per VLAN. One Spanning Tree per VLAN allows fine grain load balancing but requires more BPDU CPU processing as the number of VLANs increases. Juniper Networks devices only inter-operate with PVST+ and Rapid-PVST+. For more information, see VSTP and RPVST+ convergence on native-vlan 1 for EX Switches .

Tip:

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 devices 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 devices that support ELS uses RSTP. This topic describes options for configuring VSTP on devices that support ELS.

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.

  • If STP is needed on all the VLANs and the VLANs configured in the system are more than the maximum allowed VLANs for VSTP, then you must use RSTP instead of VSTP.

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 devices that support ELS 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.