Course contents

Chapter 4: VLANs and TrunksLesson 17 of 18

Beyond CCNA (optional). This topic is not on the CCNA 200-301 exam. It is useful at work and in later study; skip it if you are preparing for the exam. (VLAN translation is not in the exam topics.)

VLAN translation

Changing a frame's VLAN ID as it crosses a link, so two different VLAN numbering plans can work together.

Advanced · 5 min read · Before this: VLAN

Technical definition

VLAN translation is a switch feature that rewrites the VLAN ID in a frame’s 802.1Q tag as the frame crosses a port, mapping one VLAN number to another in each direction. It lets two networks with different VLAN numbering plans exchange traffic without renumbering either side.

A customer VLAN that clashes with the provider's

A customer hands over its employee traffic tagged VLAN 10, but inside the provider's network VLAN 10 already belongs to someone else. The provider wants to carry this customer's traffic as VLAN 510. VLAN translation (also called VLAN mapping) rewrites the VLAN ID at the edge, in both directions. The same trick helps when two companies merge and their VLAN numbers clash.

Rewriting the tag in both directions

Diagram
VLAN translation at a network edge
VLAN translation at a network edge
trunktrunkVLAN 10Customer switchProvider edgemaps 10 ↔ 510VLAN 510Provider network

Device key: Provider edge (switch) · Provider network (network / service)

Lines show the example’s network connections. Thick links: uplinks/WAN, as labelled. The coloured path and envelope follow the current step; its text identifies the sender, receiver and traffic type.

  1. 1. Arrives as VLAN 10. The customer's frame comes in on the trunk tagged 10.
  2. 2. Leaves as VLAN 510. The edge switch rewrites the tag to 510 and forwards it inside the provider network.
  3. 3. Return traffic. Replies come back tagged 510…
  4. 4. Translated back. …and are rewritten to 10 before reaching the customer. Neither side knows the other's numbering.

Why it's different from QinQ: translation replaces the VLAN ID (one tag in, one tag out), while QinQ adds an outer tag and keeps the original. Translation also doesn't touch IP addresses; it's purely a Layer 2 relabel.

In practice the feature lives mostly on provider-edge and metro Ethernet switches. Many campus access switches don't offer it at all, so check the platform before designing a merger around it.

Mapping VLAN 10 to 510 on the trunk

interface GigabitEthernet1/0/1 description Trunk to customer switchport mode trunk switchport vlan mapping 10 510

One-to-one mapping on the customer-facing trunk: frames arriving tagged 10 are switched in VLAN 510, and VLAN 510 leaves this port tagged 10. Syntax and support vary by platform (and some need VLAN 510 allowed on the trunk), so check your switch's documentation.

Checking that each side sees its own number

show interfaces vlan mapping

Lists each interface's original and translated VLAN IDs.

Then confirm in practice: the customer still sees VLAN 10 on its side (show interfaces trunk on the customer switch), while inside the provider network the traffic appears in VLAN 510 (for example show mac address-table vlan 510 lists the customer's MAC addresses).

Test yourself on VLAN translation

Predict · scenario 1

After translating 10 → 510, does the customer's IP addressing need to change?

Predict · scenario 2

Two customers both use VLAN 10 and the provider wants to keep each customer's tags intact end to end. Translation or QinQ?