Example: Configuring VSTP on a Trunk Port with Tagged Traffic
VSTP on a Trunk Port with Tagged Traffic Overview
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.
Example: Configuring VSTP on a Trunk Port with Tagged Traffic
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 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:
- Configure the network interfaces.[edit interfaces]user@PE1# set ge-2/0/1 flexible-vlan-tagginguser@PE1# set ge-2/0/1 encapsulation flexible-ethernet-servicesuser@PE1# set ge-2/0/1 unit 1 vlan-id 100user@PE1# set ge-2/0/1 unit 1 family bridge interface-mode trunkuser@PE1# set ge-2/0/1 unit 1 family bridge inner-vlan-id-list 1-100user@PE1# set ge-2/0/1 unit 2 vlan-id 200user@PE1# set ge-2/0/1 unit 2 family bridge interface-mode trunkuser@PE1# set ge-2/0/1 unit 2 family bridge inner-vlan-id-list 1-100
user@PE1# set ge-2/0/4 encapsulation ethernet-vplsuser@PE1#set ge-2/0/4 unit 0 description to_CE1 user@PE1# set ge-2/0/4 unit 0 family bridge interface-mode trunkuser@PE1#set ge-2/0/4 unit 0 family bridge vlan-id-list 1-100
user@PE1# set ge-2/1/1 unit 0 description to_CE2user@PE1# set ge-2/1/1 unit 0 family bridge interface-mode trunkuser@PE1# set ge-2/1/1 unit 0 family bridge vlan-id-list 1-100 - Configure the routing instances.[edit routing-instances]user@PE1# set vs1 instance-type virtual-switchuser@PE1# set vs1 interface ge-2/0/1.1user@PE1# set vs1 interface ge-2/0/4.0user@PE1# set vs1 protocols vstp vlan 100 interface ge-2/0/1user@PE1# set vs1 protocols vstp vlan 100 interface ge-2/0/4 access-trunkuser@PE1# set vs1 bridge-domains bd vlan-id-list 1-100
user@PE1# set vs2 instance-type virtual-switchuser@PE1# set vs2 interface ge-2/0/1.2user@PE1# set vs2 interface ge-2/1/1.0user@PE1# set vs2 protocols vstp vlan 200 interface ge-2/0/1user@PE1# set vs2 protocols vstp vlan 200 interface ge-2/1/1 access-trunkuser@PE1# set vs2 bridge-domains bd vlan-id-list 1-100
Step-by-Step Procedure
To configure Device PE2:
- Configure the interfaces.[edit interfaces]user@PE2# set ge-2/0/1 flexible-vlan-tagginguser@PE2# set ge-2/0/1 encapsulation flexible-ethernet-servicesuser@PE2# set ge-2/0/1 unit 1 vlan-id 100user@PE2# set ge-2/0/1 unit 1 family bridge interface-mode trunkuser@PE2# set ge-2/0/1 unit 1 family bridge inner-vlan-id-list 1-100user@PE2# set ge-2/0/1 unit 2 vlan-id 200user@PE2# set ge-2/0/1 unit 2 family bridge interface-mode trunkuser@PE2# set ge-2/0/1 unit 2 family bridge inner-vlan-id-list 1-100
user@PE2# set ge-2/1/3 description to_CE1user@PE2# set ge-2/1/3 unit 0 family bridge interface-mode trunkuser@PE2# set ge-2/1/3 unit 0 family bridge vlan-id-list 1-100
user@PE2# set ge-2/0/5 description to_CE2user@PE2# set ge-2/0/5 unit 0 family bridge interface-mode trunkuser@PE2# set ge-2/0/5 unit 0 family bridge vlan-id-list 1-100 - Configure the routing instances.[edit routing-instances]user@PE2# set vs1 instance-type virtual-switchuser@PE2# set vs1 interface ge-2/0/1.1user@PE2# set vs1 interface ge-2/1/3.0user@PE2# set vs1 protocols vstp vlan 100 interface ge-2/0/1user@PE2# set vs1 protocols vstp vlan 100 interface ge-2/1/3 access-trunkuser@PE2# set vs1 bridge-domains bd vlan-id-list 1-100
user@PE2# set vs2 instance-type virtual-switchuser@PE2# set vs2 interface ge-2/0/1.2user@PE2# set vs2 interface ge-2/0/5.0user@PE2# set vs2 protocols vstp vlan 200 interface ge-2/0/1user@PE2# set vs2 protocols vstp vlan 200 interface ge-2/0/5 access-trunkuser@PE2# set vs2 bridge-domains bd vlan-id-list 1-100
Step-by-Step Procedure
To configure CE1:
- Configure the interfaces.[edit interfaces]user@CE1# set ge-2/0/7 unit 0 description to_PE1user@CE1# set ge-2/0/7 unit 0 family bridge interface-mode trunkuser@CE1# set ge-2/0/7 unit 0 family bridge vlan-id-list 1-100
user@CE1# set ge-2/1/4 unit 0 description to_PE2user@CE1# set ge-2/1/4 unit 0 family bridge interface-mode trunkuser@CE1# set ge-2/1/4 unit 0 family bridge vlan-id-list 1-100 - Configure the protocols.[edit protocols]user@CE1# set rstp interface ge-2/0/7user@CE1# set rstp interface ge-2/1/4
- Configure the bridge domain.[edit bridge-domains]user@CE1# set bd vlan-id-list 1-100
Step-by-Step Procedure
To configure CE2:
- Configure the interfaces.[edit interfaces]user@CE2# set ge-2/0/8 unit 0 description to_PE2user@CE2# set ge-2/0/8 unit 0 family bridge interface-mode trunkuser@CE2# set ge-2/0/8 unit 0 family bridge vlan-id-list 1-100
user@CE2# set ge-2/1/1 unit 0 description to_PE1user@CE2# set ge-2/1/1 unit 0 family bridge interface-mode trunkuser@CE2# set ge-2/1/1 unit 0 family bridge vlan-id-list 1-100 - Configure the protocols.[edit protocols]user@CE2# set rstp interface ge-2/0/8user@CE2# set rstp interface ge-2/1/1
- Configure the bridge domain.[edit bridge-domains]user@CE2# set bd vlan-id-list 1-100
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
- Verifying the STP Bridge Parameters of the Routing Instances
- Displaying STP Statistics for the Configured Bridge
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.
user@PE1> show spanning-tree interface routing-instance
vs1
Spanning tree interface parameters for VLAN 100 Interface Port ID Designated Designated Port State Role port ID bridge ID Cost ge-2/0/1 128:82 128:82 32868.0021590f37d0 20000 FWD DESG ge-2/0/4 128:85 128:85 32868.0021590f37d0 20000 FWD DESG
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.
user@PE1> show spanning-tree bridge routing-instance
vs1
STP bridge parameters Routing instance name : vs1 Enabled protocol : RSTP STP bridge parameters for VLAN 100 Root ID : 32868.00:21:59:0f:37:d0 Hello time : 2 seconds Maximum age : 20 seconds Forward delay : 15 seconds Message age : 0 Number of topology changes : 2 Time since last topology change : 687 seconds Local parameters Bridge ID : 32868.00:21:59:0f:37:d0 Extended system ID : 100
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.
user@PE1> show spanning-tree statistics bridge
STP Context : default STP Instance : 0 Number of Root Bridge Changes: 0 Number of Root Port Changes: 0 STP Context : x/default STP Instance : 0 Number of Root Bridge Changes: 0 Number of Root Port Changes: 0 STP Context : vs1 STP Instance : 0 Number of Root Bridge Changes: 2 Last Changed: Thu Sep 20 15:12:18 2012 Number of Root Port Changes: 1 Last Changed: Thu Sep 20 15:01:13 2012 Recent TC Received: ge-2/0/1.1 Received : Thu Sep 20 15:01:17 2012 STP Context : vs2 STP Instance : 0 Number of Root Bridge Changes: 2 Last Changed: Thu Sep 20 15:10:25 2012 Number of Root Port Changes: 2 Last Changed: Thu Sep 20 15:10:25 2012 Recent TC Received: ge-2/1/1.0 Received : Thu Sep 20 15:10:47 2012 STP Context : CE1/default STP Instance : 0 Number of Root Bridge Changes: 0 Number of Root Port Changes: 0 Recent TC Received: ge-2/1/4.0 Received : Thu Sep 20 15:12:15 2012
Meaning
The command output shows spanning-tree statistics for the configured bridge.