Introduction to Virtual LANs in Layer 2 VPNs
Feature Name |
Release Information |
Feature Description |
Dot1Q Q-in-Q (0x8100/0x8100) Tunneling for VLAN Subinterface Encapsulation |
Release 24.1.1 |
We have optimized VLAN implementation by enabling service providers to:
Such optimization is possible because this release supports Dot1Q Q-in-Q (0x8100/0x8100) encapsulation for VLAN subinterfaces. This involves configuring these subinterfaces to add an outer 802.1Q tag to packets that are already carrying an 802.1Q VLAN tag. The feature introduces these changes: CLI: New L2VPN commands YANG Data Model:
This feature is supported on Cisco 8000 series routers that are based on the Q200 silicon chip application-specific integrated circuit (ASIC). |
Double-Tagged 802.1ad Encapsulation Options for Layer 3 Physical and Bundle Subinterfaces |
Release 7.3.2 | This feature enables you to increase the number of VLAN tags in an interface and an subinterface. You can enable this feature
either on a physical interface or a bundle interface. When you configure this feature with the dual tag, interfaces check
for IP addresses along with MAC addresses. Verified Scalability Limits:
|
The Layer 2 Virtual Private Network (L2VPN) feature enables Service Providers (SPs) to provide L2 services to geographically disparate customer sites.
A virtual local area network (VLAN) is a group of devices on one or more LANs that are configured so that they can communicate as if they were attached to the same wire, when in fact they are located on a number of different LAN segments. The IEEE's 802.1Q specification establishes a standard method for inserting VLAN membership information into Ethernet frames.
VLANs are very useful for user and host management, bandwidth allocation, and resource optimization. Using VLANs addresses the problem of breaking large networks into smaller parts so that broadcast and multicast traffic does not consume more bandwidth than necessary. VLANs also provide a higher level of security between segments of internal networks.
The 802.1Q specification establishes a standard method for inserting VLAN membership information into Ethernet frames. Cisco IOS XR software supports VLAN subinterface configuration on four hundred Gigabit Ethernet and one hundred Gigabit Ethernet interfaces.
The configuration model for configuring VLAN Attachment Circuits (ACs) is similar to the model used for configuring basic VLANs, where the user first creates a VLAN subinterface, and then configures that VLAN in subinterface configuration mode. To create an Attachment Circuit, you need to include the l2transport keyword in the interface command string to specify that the interface is a L2 interface.
-
Basic Dot1Q Attachment Circuit—The Attachment Circuit covers all frames that are received and sent with a specific VLAN tag.
-
Q-in-Q Attachment Circuit—The AC covers all frames received and sent with a specific outer VLAN tag and a specific inner VLAN tag. Q-in-Q is an extension to basic dot1q and uses a stack of two tags.
Dot1Q Q-in-Q (0x8100/0x8100) Tunneling for VLAN Subinterface Encapsulation
802.1Q tunneling (or Q-in-Q), as defined by IEEE 802.1ad, extends VLAN capacity by appending an extra 802.1Q tag to packets that are already 802.1Q-tagged. Q-in-Q encapsulation, also known as stacked VLAN tagging or double VLAN is a technique used in networking to add an extra layer of VLAN tagging to Ethernet frames.
In a standard VLAN configuration, each Ethernet frame has a single VLAN tag that identifies the VLAN to which it belongs. Q-in-Q adds another layer of VLAN tagging, allowing for the creation of multiple VLAN domains within a larger network. Q-in-Q enables a more scalable VLAN implementation. The outer VLAN tag represents the service provider VLAN, and the inner VLAN tag represents the customer VLAN. This enables the service provider to support multitenancy and manage a large number of customers with overlapping VLAN IDs over the same carrier network.
In addition to the advantages associated with expanding VLAN space, Q-in-Q tunneling also facilitates service mapping. The use of inner and outer VLAN tags allows the differentiation of packets based on users and services.
In Q-in-Q encapsulation, there are two levels of VLAN tags:
-
Outer VLAN Tag:
-
Identifies the VLAN of the service provider network.
-
Added by the service provider when the frame enters its network.
-
The EtherType can be either dot1q (0x8100) or dot1ad (0x88A8), depending on the configuration or platform.
-
-
Inner VLAN Tag:
-
Identifies the VLAN of the customer within the service provider's VLAN.
-
Added by the customer network.
-
The EtherType must be dot1q (0x8100).
-
Before a sub-interface is allowed to pass traffic, it must have a valid tagging protocol encapsulation and VLAN identifier assigned. All Ethernet subinterfaces always default to the 802.1Q VLAN encapsulation. However, the VLAN identifier must be explicitly defined.
Configure Dot1Q Q-in-Q (0x8100/0x8100) Tunneling for VLAN Subinterface Encapsulation
To configure a dot1q Q-in-Q tunneling for VLAN sub-interfaces with an outer tag of 0x8100, use the following example configuration:
Router#configure
Router(config)#interface TenGigE 0/0/0/1.102 l2transport
Router(config-subif)#encapsulation dot1q 200 second-dot1q 201
Router(config-subif)#commit
Router(config-subif)#exit
Router(config)#exit
Running Configuration
configure
interface TenGigE 0/0/0/1.102
l2transport
encapsulation dot1q 200 second-dot1q 201
!
!
Verification
Verify that the VLAN subinterface is in Q-in-Q mode:
Router# show interfaces TenGigE 0/0/0/1.102
Wed Sep 8 14:50:15.691 UTC
HundredGigE0/0/0/1.102 is up, line protocol is up
Interface state transitions: 1
Hardware is VLAN sub-interface(s), address is 0029.c201.3f0c
Internet address is 40.40.50.1/24
MTU 1522 bytes, BW 100000000 Kbit (Max: 100000000 Kbit)
reliability 255/255, txload 0/255, rxload 0/255
Encapsulation 802.1Q-802.1Q Virtual LAN,
Last link flapped 00:01:25
ARP type ARPA, ARP timeout 04:00:00
Last input never, output never
Last clearing of "show interface" counters never
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes, 0 total input drops
0 drops for unrecognized upper-level protocol
Received 0 broadcast packets, 0 multicast packets
0 packets output, 0 bytes, 0 total output drops
Output 0 broadcast packets, 0 multicast packets
Configure Dot1Q Q-in-Q (0x8100/0x8100) Tag Rewrite for VLAN Sub-interface
Optional: To add or modify double Dot1q Q-in-Q VLAN tags on Layer 2 Ethernet frames with an outer tag of 0x8100, use the following example configurations.
Router#configure
Router(config)#interface TenGigE 0/0/0/1.102 l2transport
Router(config-subif)#encapsulation dot1q 200 second-dot1q 201
Router(config-subif)#rewrite ingress tag pop 2 symmetric
Router(config-subif)#commit
Router(config-subif)#exit
Router(config)#exit
Running Configuration/* Configure Dot1Q Q-in-Q Tag Rewrite: Pop 2 */
interface HundredGigE0/0/0/0.1 l2transport
encapsulation dot1q 200 dot1q 201
rewrite ingress tag pop 2 symmetric
!
!
/* Configure Dot1Q Q-in-Q Tag Rewrite: Push */
interface HundredGigE0/0/0/0.1 l2transport
encapsulation dot1q 200 dot1q 201
rewrite ingress tag push dot1q 200 second-dot1q 201 symmetric
!
!
/* Configure Dot1Q Q-in-Q Tag Rewrite: Translate 1-to-2 */
interface HundredGigE0/0/0/0.1 l2transport
encapsulation dot1q 200 dot1q 201
rewrite ingress tag translate 1-to-2 dot1q 200 second-dot1q 201 symmetric
!
!
/* Configure Dot1Q Q-in-Q Tag Rewrite: Translate 2-to-2 */
interface HundredGigE0/0/0/0.1 l2transport
encapsulation dot1q 200 dot1q 201
rewrite ingress tag translate 2-to-2 dot1q 200 second-dot1q 201 symmetric
!
!
Double-Tagged 802.1ad Encapsulation Options for Layer 2 and Layer 3 Physical and Bundle Subinterfaces
Subinterfaces are logical interfaces created on a hardware interface. These software-defined interfaces allow for segregation of traffic into separate logical channels on a single hardware interface as well as allowing for better utilization of the available bandwidth on the physical interface.
Before a subinterface is allowed to pass traffic it must have a valid tagging protocol encapsulation and VLAN identifier assigned. All Ethernet subinterfaces always default to the 802.1Q VLAN encapsulation. However, the VLAN identifier must be explicitly defined.
Supported Encapsulation
Interface Type |
Encapsulation |
Standard |
Support Status |
---|---|---|---|
Layer 3 interface Layer 3 subinterface Layer 3 bundle subinterface |
Single-Tag Encapsulation |
dot1ad |
Not supported. |
dot1q |
Supported. |
||
Double-Tag Encapsulation |
dot1ad <> dot1q<> |
Supported. |
|
dot1q <> dot1q<> |
1Not supported. |
Interface Type |
Encapsulation |
Standard |
Support Status |
---|---|---|---|
Layer 2 interface Layer 2 subinterface Layer 2 bundle subinterface |
Single-Tag Encapsulation |
dot1ad |
Not supported. |
dot1q |
Supported. |
||
Double-Tag Encapsulation |
dot1ad <> dot1q<> |
Supported. |
|
dot1q <> dot1q<> |
2Supported. |