Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

close
keyboard_arrow_left
Junos CLI Reference
Table of Contents Expand all
list Table of Contents
file_download PDF
{ "lLangCode": "en", "lName": "English", "lCountryCode": "us", "transcode": "en_US" }
English
keyboard_arrow_right

vlan-rewrite

date_range 20-Nov-23

Syntax

content_copy zoom_out_map
vlan-rewrite {
    translate from-vlan-id to-vlan-id;
}

Hierarchy Level

content_copy zoom_out_map
[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.

external-footer-nav