Skip to content
Ask AI

VLAN Translation

[Command] show interface vlan-mapping [* interface_id***]**

[Purpose] View global VLAN translation rules.

[View] System View

[Use Cases]

Terminal window
sonic# show interface vlan-mapping
Port Stage Original Vlan Mapping Vlan
--------- ------- --------------- --------------
Ethernet1 egress Vlan20 Vlan10
Ethernet1 ingress Vlan10 Vlan20
Ethernet2 egress Vlan200 Vlan100
Ethernet2 ingress Vlan100 Vlan200

[Command] show interface vlan-mapping [ingress|egress] [* interface_id***]**

[Purpose] View global interface inbound/outbound VLAN translation rules.

[View] System View

[Use Cases]

Terminal window
sonic# show interface vlan-mapping ingress
Port Stage Original Vlan Mapping Vlan
--------- ------- --------------- --------------
Ethernet1 ingress Vlan10 Vlan20
Ethernet2 ingress Vlan100 Vlan200
sonic# show interface vlan-mapping egress
Port Stage Original Vlan Mapping Vlan
--------- ------- --------------- --------------
Ethernet1 egress Vlan20 Vlan10
Ethernet2 egress Vlan200 Vlan100

vlan-mapping ingress original-vlan mapping-vlan

Section titled “vlan-mapping ingress original-vlan mapping-vlan”

[Command] vlan-mappping ingress original-vlan vlanid mapping-vlan vlanid no vlan-mappping ingress original-vlan vlanid

[Purpose] Configure VLAN translation rules for inbound traffic on the interface

[View] Interface View

[Comment] When configuring VLAN translation rules, both the original and translated VLANs must be added to the interface.

[Use Cases]

Terminal window
sonic(config-if-1)# vlan-mapping ingress original-vlan 10 mapping-vlan 20

vlan-mapping egress original-vlan mapping-vlan

Section titled “vlan-mapping egress original-vlan mapping-vlan”

[Command] vlan-mappping egress original-vlan vlanid mapping-vlan vlanid no vlan-mappping egress original-vlan vlanid

[Purpose] Configure VLAN translation rules for outbound traffic on the interface

[View] Interface View

[Comment] When configuring VLAN translation rules, both the original and translated VLANs must be added to the interface.

[Use Cases]

Terminal window
sonic(config-if-1)# vlan-mapping egress original-vlan 20 mapping-vlan 10