Routelearn.net
Course menu

Course 4: VLANs and TrunksLesson 1.5 (5 of 7 in this course)13 of 91 in the CCNA series

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

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.

In simple terms: VLAN translation swaps one VLAN number for another at the border, so traffic arriving with the customer’s VLAN number uses the provider’s number inside, and gets its original number back on the way out.

The situation

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.

What happens

trunktrunkVLAN 10Customer switchProvider edgemaps 10 ↔ 510VLAN 510Provider network
  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.

Configuration

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.

How to verify

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).

Practice

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?