How to Rewrite VLAN Number on Juniper EX

Object

Juniper VLAN Number Rewrite is very useful when you are executing a network transition project, scenarios can be you are trying to use the same subnets on both new and old environments, or the ISP gives you a VLAN number that overlaps your VLAN number in your current network.

Solution

The below example shows how to rewrite/translate the VLAN number 4 coming from Cisco devices (source) into VLAN 1 on Juniper devices (destination).

On Cisco Catalyst:

conf t

interface gi1/0/1

switchport mode trunk

switchport trunk allowed vlan 2,4

On Juniper EX:

set interfaces ge-0/0/4 description *to Cisco switch*
set interfaces ge-0/0/4 unit 0 family ethernet-switching interface-mode trunk
set interfaces ge-0/0/4 unit 0 family ethernet-switching vlan members 1
set interfaces ge-0/0/4 unit 0 family ethernet-switching vlan members 2
set interfaces ge-0/0/4 unit 0 family ethernet-switching vlan-rewrite translate 4 1

The last line “vlan-rewrite translate 4 1” did the trick, VLAN 4 is the incoming VLAN, and VLAN 1 is the VLAN being translated into.

Useful Links:

[EX/QFX] Example – Configuring VLAN translation by using ELS on Junos OS – Juniper

https://kb.juniper.net/InfoCenter/index?page=content&id=KB32859&actp=RSS

Ethernet Switching User Guide – vlan-rewrite

https://www.juniper.net/documentation/us/en/software/junos/multicast-l2/topics/ref/statement/vlan-rewrite-edit-interfaces.html

4 thoughts on “How to Rewrite VLAN Number on Juniper EX”

  1. Motorradoptionen

    Undeniably consider that which you said. Your favorite reason seemed to be on the net
    the simplest thing to remember of. I say to you, I definitely get annoyed while folks consider issues that
    they plainly don’t realize about. You managed to hit
    the nail upon the top and also outlined
    out the whole thing without having side-effects , other people can take a signal.
    Will likely be back to get more. Thanks

Leave a Comment

Your email address will not be published. Required fields are marked *