Lab 3.5 - QinQ (802.1ad) VLAN

Share
Lab 3.5 - QinQ (802.1ad) VLAN

Introduction

Lab 3.4 separated hosts into VLANs and carried several VLANs over one trunk with IEEE 802.1Q. That works inside one organization, where the switches share one administrator and one VLAN numbering plan. A service provider faces a different problem. Each customer brings its own VLANs, often the same numbers as every other customer, and the provider must carry each customer's traffic across its own network without mixing it with anyone else's. A single 802.1Q tag cannot do this. It offers 4094 VLAN IDs for the whole network, and it gives the provider no way to keep its numbering separate from the customer's.

IEEE 802.1ad, called QinQ or VLAN stacking, solves this by placing a second tag in front of the customer's tag. The outer tag, the service tag or S-tag, belongs to the provider and identifies the customer's service across the provider network. The inner tag, the customer tag or C-tag, belongs to the customer and is carried unchanged. The provider core switches read only the outer tag. They never see the customer's VLAN numbers.

This lab builds a provider network that serves two customers, each with two sites. Both customers use the same customer VLANs, 10 and 20. The provider keeps them apart with two service tags: customer A uses S-VID 100, and customer B uses S-VID 101. Each customer's traffic stays inside its own S-VID, so customer A and customer B cannot reach each other, even though their VLANs and subnets are identical. The lab uses six routers and eight VPCs. Two routers are provider edges, and four are customer switches.

Work through the steps in order. Each step is verified before the next one changes the network.

Terminology Definitions

QinQ (IEEE 802.1ad): A VLAN stacking standard that places a provider service tag in front of a customer's 802.1Q tag. It lets a provider carry many customers' VLANs over one network without a conflict in VLAN numbering (e.g. two different customers can both have VLAN 10 on their network without seeing each other's individual networks)

S-Tag (Service Tag): The outer VLAN tag added by the provider. It carries the TPID 0x88a8 and identifies a customer's service across the provider network.

C-Tag (Customer Tag): The inner 802.1Q tag that belongs to the customer. It carries the TPID 0x8100. The provider carries it unchanged inside the S-tag.

S-VID: The VLAN ID in the S-tag. This lab uses S-VID 100 for customer A and S-VID 101 for customer B.

C-VID: The VLAN ID in the C-tag. Both customers use C-VIDs 10 and 20.

TPID (Tag Protocol Identifier): The 16-bit field that identifies the type of tag that follows. 0x8100 marks an 802.1Q tag, and 0x88a8 marks an 802.1ad service tag.

Customer Edge (CE): The customer-owned switch at a customer site. It sends C-tagged frames to the provider. In this lab, R3 through R6 are CE devices.

Provider Edge (PE): The provider-owned device where customer sites connect. The PE adds the S-tag on ingress and removes it on egress. In this lab, R1 and R2 are PE devices.

Provider Trunk: The link between two PE devices. It carries the S-tagged frames for every service, and the core reads only the S-VID.

Customer Uplink: A PE port that faces a customer site's CE. Each uplink belongs to one S-VID, set with its pvid, and uses tag-stacking to push that S-tag in front of the customer's C-tagged frames.

Tag Stacking: A bridge port option in RouterOS. It pushes an outer VLAN tag on every ingress frame, using the port's PVID as the VLAN ID and the bridge's ether-type as the TPID, even when the frame already carries a tag.

Bridge EtherType: The ether-type property of a RouterOS bridge. It sets which TPID the bridge treats as its VLAN tag when VLAN filtering is on. The PE bridge uses 0x88a8, and the CE bridge keeps the default 0x8100.

Service Isolation: The separation between two S-VIDs. Frames in one S-VID are never forwarded to ports that belong only to another S-VID, so two customers on one provider network share no broadcast domain.

BPDU: (Bridge Protocol Data Unit) is the message switches send to each other to run spanning tree. Each BPDU carries the sender's bridge ID and path cost to the root bridge, which is how the switches agree on one root and decide which ports forward and which block. A BPDU is addressed to a reserved multicast MAC, 01:80:C2:00:00:00.

RSTP: (Rapid Spanning Tree Protocol) is a way for switches to detect and block loops in a network. When switches are wired in a loop, traffic can circle forever and bring the network down. RSTP has the switches talk to each other, decide which links to use, and turn off the rest. If a link fails, it switches to a backup path within seconds.

Lab Topology

R1 and R2 are provider edge routers. R3 and R4 are the two sites of customer A. R5 and R6 are the two sites of customer B. Each customer site has a switch with two access ports, one in C-VLAN 10 and one in C-VLAN 20. Each site connects to its PE on an uplink, and the PEs are joined by a provider trunk that carries both service tags.

img

Along the path, a customer frame changes shape:

  • On the customer's CE uplink it carries one tag, the C-tag 0x8100 with VID 10 or 20.
  • On the provider trunk it carries two tags: the S-tag 0x88a8 with VID 100 or 101 outside, and the C-tag inside.
  • On the far customer uplink it carries one tag again, the C-tag. The far PE removed the S-tag.

Customer A's frames travel only in S-VID 100, and customer B's only in S-VID 101. Both customers use the same C-VIDs and the same subnets, so isolation depends entirely on the service tag.

No IP addresses are configured on the routers, so every test in this lab is a test of the QinQ configuration.

Both customers use the same subnets on purpose. Customer A's VPC1 and customer B's VPC5 share the subnet 10.10.10.0/24, so an ARP request from VPC1 for 10.10.10.30 is a real test of Layer 2 isolation. If the provider leaks frames between S-VIDs, the request reaches VPC5 and the ping succeeds. If isolation holds, the request never arrives and the ping fails. The VPCs have no gateway, so a failure cannot be blamed on routing.