Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

Navigation

Configuring Q-in-Q Tunneling

Q-in-Q tunneling and VLAN translation allow service providers to create a Layer 2 Ethernet connection between two customer sites. Providers can segregate different customers’ VLAN traffic on a link (for example, if the customers use overlapping VLAN IDs) or bundle different customer VLANs into a single service VLAN. Data centers can use Q-in-Q tunneling to isolate customer traffic within a single site or when customer traffic flows between cloud data centers in different geographic locations.

Note: This task uses a Junos OS release that does not support the Enhanced Layer 2 Software (ELS) configuration style. If your switch runs software that supports ELS, see Configuring Q-in-Q Tunneling.

Before you begin setting up Q-in-Q tunneling, make sure you have created and configured the necessary customer VLANs on the neighboring switches. See Configuring VLANs.

To configure Q-in-Q tunneling:

  1. Create the service VLAN (S-VLAN) and configure an ID for it:
    [edit vlans]
    user@switch# set s-vlan-name vlan-id s-vlan-ID
  2. Enable Q-in-Q tunneling on the S-VLAN:
    [edit vlans]
    user@switch# set s-vlan-name dot1q-tunneling
  3. Set the allowed customer VLANs (C-VLANs) on the S-VLAN (optional). Here, the C-VLANs are identified by a range:
    [edit vlans]
    user@switch# set s-vlan-name dot1q-tunneling customer-vlans range
  4. Configure a global value for the tag protocol identifier (EtherType) of the service VLAN tags (optional):
    [edit]
    user@switch# set ethernet-switching-options dot1q-tunneling ether-type ether-type-value

Depending on your interface configuration, you might need to adjust the MTU value on your trunk or access ports to accommodate the 4 bytes used for the tag added by Q-in-Q tunneling. For example, if you use the default MTU value of 1514 bytes on your access and trunk ports, you need to make one of the following adjustments:

  • Reduce the MTU on the access links by at least 4 bytes so that the frames do not exceed the MTU of the trunk link when S-VLAN tags are added.
  • Increase the MTU on the trunk link so that the link can handle the larger frame size.

Published: 2014-09-30