[an error occurred while processing this directive] [an error occurred while processing this directive]

Example: Setting Up Q-in-Q Tunneling on EX Series Switches

Service providers can use Q-in-Q tunneling to transparently pass Layer 2 VLAN traffic from a customer site, through the service provider network, to another customer site without removing or changing the customer VLAN tags or class-of-service (CoS) settings. You can configure Q-in-Q tunneling on EX Series switches.

This example describes how to set up Q-in-Q:

Requirements

This example requires one EX Series switch with JUNOS Release 9.3 or later for EX Series switches.

Before you begin setting up Q-in-Q tunneling, make sure you have created and configured the necessary customer VLANs. See Configuring VLANs for EX Series Switches (CLI Procedure) or Configuring VLANs for EX Series Switches (J-Web Procedure).

Overview and Topology

In this service provider network, there are multiple customer VLANs mapped to one service VLAN.

Table 1 lists the settings for the example topology.

Table 1: Components of the Topology for Setting Up Q-in-Q Tunneling

Interface Description

ge-0/0/11.0

Tagged S-VLAN trunk port

ge-0/0/12.0

Untagged customer-facing access port

ge-0/0/13.0

Untagged customer-facing access port

ge-0/0/14.0

Tagged S-VLAN trunk port

Configuration

CLI Quick Configuration

To quickly create and configure Q-in-Q tunneling, copy the following commands and paste them into the switch terminal window:


[edit]


set vlans qinqvlan vlan-id 4001


set vlans qinqvlan dot1q-tunneling customer-vlans 1-100


set vlans qinqvlan dot1q-tunneling customer-vlans 201-300


set interfaces ge-0/0/11 unit 0 family ethernet-switching port-mode trunk


set interfaces ge-0/0/11 unit 0 family ethernet-switching vlan members 4001


set interfaces ge-0/0/12 unit 0 family ethernet-switching port-mode access


set interfaces ge-0/0/12 unit 0 family ethernet-switching vlan members 4001


set interfaces ge-0/0/13 unit 0 family ethernet-switching port-mode access


set interfaces ge-0/0/13 unit 0 family ethernet-switching vlan members 4001


set interfaces ge-0/0/14 unit 0 family ethernet-switching port-mode trunk


set interfaces ge-0/0/14 unit 0 family ethernet-switching vlan members 4001


set ethernet-switching-options dot1q-tunneling ether-type 0x9100

Step-by-Step Procedure

To configure Q-in-Q tunneling:

  1. Set the VLAN ID for the S-VLAN:

    [edit vlans]
    user@switch# set qinqvlan vlan-id 4001
  2. Enable Q-in-Q tuennling and specify the customer VLAN ranges:

    [edit vlans]
    user@switch# set qinqvlan dot1q-tunneling customer-vlans 1-100
    user@switch# set qinqvlan dot1q-tunneling customer-vlans 201-300
  3. Set the port mode and VLAN information for the interfaces:

    [edit interfaces]
    user@switch# set ge-0/0/11 unit 0 family ethernet-switching port-mode trunk
    user@switch# set ge-0/0/11 unit 0 family ethernet-switching vlan members 4001
    user@switch# set ge-0/0/12 unit 0 family ethernet-switching port-mode access
    user@switch# set ge-0/0/12 unit 0 family ethernet-switching vlan members 4001
    user@switch# set ge-0/0/13 unit 0 family ethernet-switching port-mode access
    user@switch# set ge-0/0/13 unit 0 family ethernet-switching vlan members 4001
    user@switch# set ge-0/0/14 unit 0 family ethernet-switching port-mode trunk
    user@switch# set ge-0/0/14 unit 0 family ethernet-switching vlan members 4001
  4. Set the Q-in-Q Ethertype value:

    [edit]
    user@switch# set ethernet-switching-options dot1q-tunneling ether-type 0x9100

Results

Check the results of the configuration:

user@switch> show configuration vlans qinqvlan
vlan-id 4001;
dot1q-tunneling {
customer-vlans [ 1-100 201-300 ];
}

Verification

To confirm that the configuration is working properly, perform these tasks:

Verifying That Q-in-Q Tunneling Was Enabled

Purpose

Verify that Q-in-Q tunneling was properly enabled on the switch.

Action

Use the show vlans command:


user@switch> show vlans qinqvlan extensive
VLAN: qinqvlan, Created at: Thu Sep 18 07:17:53 2008
802.1Q Tag: 4001, Internal index: 18, Admin State: Enabled, Origin: Static
Dot1q Tunneling Status: Enabled
Customer VLAN ranges:
                     1-100
                     201-300
Protocol: Port Mode
Number of interfaces: Tagged 2 (Active = 0), Untagged  4 (Active = 0)
      ge-0/0/11.0, tagged, trunk
      ge-0/0/14.0, tagged, trunk
      ge-0/0/12.0, untagged, access
      ge-0/0/13.0, untagged, access

Meaning

The output indicates that Q-in-Q tunneling is enabled and that the VLAN is tagged and shows the associated customer VLANs.


Published: 2009-07-22

[an error occurred while processing this directive]