home

Supported platforms

Vyatta documentation

Learn how to install, configure, and operate the Vyatta Network Operating System (Vyatta NOS) and Orchestrator, which help drive our virtual networking and physical platforms portfolio.

Show Page Sections

Q-in-Q Interface

Overview and configuration information for the Q-in-Q interface is covered in the following section.

Q-in-Q interface overview

This section presents the following topics:

With services such as metro Ethernet, the demand for VLAN IDs can increase beyond the original space limit of 4K. Q-in-Q enables the VLAN ID space to be extended from 4K to 16M, while also reducing the number of VLANs that must be managed.

The vRouter Q-in-Q implementation is based on IEEE 802.1ad—multiple VLAN tags in an IP packet frame. The Q-in-Q interface is able to insert two VLAN tags into the Ethernet frame of a packet.

The Q-in-Q interface is supported on the data plane interface and must be configured as a virtual interface (vif). You configure the inner VLAN and the outer VLAN by using the VIF CLI commands, modify the data plane to be able to process packets with two VLAN tags, and then display the VLAN IDs of the VIF interface.

Only the outer VLAN tag is used when scheduling QoS packets. The outer VLAN tag can use EtherTypes 0x8100, 0x9100, 0x9200, 0x9300 and 0x88A8. The inner VLAN tag uses only 0x8100.

The outer VLAN is also referred to as “service VLAN” (S-VLAN) while the inner VLAN is called “customer VLAN” (C-VLAN).

When a Q-in-Q VIF is configured, two logical interfaces are created in the Linux kernel and the data plane—one representing the outer VLAN and the other representing the inner VLAN. In the data plane, the Q-in-Q logical interfaces are created after the corresponding netlink link messages are received.

Most forwarding features are performed based on the specifications of the interface regardless of whether the packet has a VLAN.

Q-in-Q interface features

The vRouter implementation of the Q-in-Q interface supports the same set of features as that of the single VLAN VIF:

  • IPv4 and IPv6
  • Bridging
  • QoS
  • Firewall
  • Routing protocols
  • PBR policy

Packet processing using QoS schedulers

To manage traffic bandwidth, use the QoS scheduler to shape traffic based on Q-in-Q packets with VLAN IDs by using the following command:

  • set policy qos name policy-name shaper vlan outer-vid

    The VLAN ID is the outer VLAN ID of a Q-in-Q interface.

For more information on QoS, refer to QoS Reference Guide.

You can configure the aggregated scheduler to handle traffic that traverses the Q-in-Q interface.

  • All inner VLANs share the same scheduler.
  • Only the outer VLAN must be specified in the configuration.
  • Use the following command to configure an aggregated scheduler:

    set policy qos name policy-name shaper vlan outer-vid

  • A subport is created for the outer VLAN and all inner VLANs under this outer VLAN share the same subport.

VLAN map

The three-bit priority of a VLAN tag in the frame can be used to map an incoming packet to a queue. For Q-in-Q packets, the priority applies only to the outer VLAN tag.

Configuring the Q-in-Q interface

To configure the VIF attributes and the QoS behavior, perform the following steps in configuration mode:

Step

Command

Create the VIF.

vyatta@R1# set interfaces dataplane interface-name vif vif-id 
vlan outer-vid 
  
vyatta@R1# set interfaces dataplane interface-name vif vif-id 
inner-vlan inner-vid
 

Assign the interface address.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
address address

Set the EtherType for VLAN packets.

vyatta@R1# set interfaces dataplane interface-name
vlan-protocol ethertype

Add this interface to a bridge group.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
bridge-group ... 

Define the IP routing parameters.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
ip ...
 

Define the IPv6 routing parameters.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
ipv6 ...

Define the firewall rules for this interface.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
firewall ... 

Create an interface description.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
description ...

Define the interface MTU.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
mtu

Define the policy-based routing parameters.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
policy ... 

Define the l2tp cross-connect interface parameters.

vyatta@R1# set interfaces dataplane interface-name vif vif-id
xconnect ...

Configure the QoS behavior on the interface.

vyatta@R1# set policy qos name shaper vlan outer-vid
  

Disabling the interface

To disable the interface, use the following command:

vyatta@R1# set interfaces dataplane interface-name vif vif-id disable ...

Ignoring link state changes

To configure the system to ignore link state changes, use the following command:

vyatta@R1# set interfaces dataplane interface-name vif vif-id disable-link-detect ...

Viewing interface queuing

To view the queuing of the logical interfaces, use the following command:

vyatta@R1# show queuing