vlan-rewrite
Syntax
vlan-rewrite { translate from-vlan-id to-vlan-id; }
Hierarchy Level
[edit interfaces interface-name unit number family bridge ] [edit interfaces interface-name unit number family ethernet-switching]
Description
Translate a VLAN ID (the from-vlan-id) in an incoming packet to another VLAN ID (the to-vlan-id) that you have configured on an interface. The device does the corresponding translation in reverse at egress.
You can configure VLAN translation with the vlan-rewrite translate
statement as follows:
-
Only on trunk mode interfaces.
-
The to-vlan-id is a VLAN you configure on the device with the specified interface as a member of that VLAN.
-
The from-vlan-id and to-vlan-id VLAN IDs can have values between 1 and 4094.
After you set up a VLAN mapping, the device accepts incoming packets tagged with from-vlan-id and translates that VLAN ID into the to-vlan-id to process the packet. We refer to the to-vlan-id as the mapped VLAN value.
The device also accepts packets with VLAN IDs for which you did not configure VLAN translation on an interface, and passes those through to the packet processing pipeline without translation.
Required Privilege Level
interface—To view this statement in the configuration.
interface-control—To add this statement to the configuration.
Release Information
Statement introduced in Junos OS Release 9.4.