Supported Platforms
Related Documentation
- EX Series, QFX Series standalone switches
- Understanding Q-in-Q Tunneling
- Configuring All-in-One Bundling
- Configuring Many-to-Many Bundling
Configuring a Specific Interface Mapping with VLAN ID Translation Option
You can configure Q-in-Q tunneling by mapping packets from a specified C-VLAN to a specified S-VLAN. In addition, you can configure the system to replace a C-VLAN tag with an S-VLAN tag or replace an S-VLAN tag with a C-VLAN tag (instead of double tagging). This is call VLAN translation or VLAN rewriting. VLAN translation is particularly useful if a service provider’s Layer 2 network that connects a customer’s sites does not support double tagged packets.
When you use VLAN translation, both ends of the link normally must be able to swap the tags appropriately. That is, both ends of the link must be configured to swap the C-VLAN tag for the S-VLAN tag and swap the S-VLAN tag for the C-VLAN tag so that traffic in both directions is tagged appropriately while in transit and after arrival.
First configure the S-VLAN and its interface:
- Assign a logical interface to be a member of the S-VLAN.
Do not use unit 0.
[edit vlans vlan-name]
user@switch# interface interface-name.unit-number
Note: Note that you do not create a VLAN ID for the S-VLAN. The ID is created automatically for the appropriate logical interface.
- Enable the interface to transmit packets with 802.1Q VLAN
tags:
[edit interfaces interface-name]
user@switch# flexible-vlan-tagging
- Enable the S-VLAN interface to send and receive untagged
packets:
[edit interfaces interface-name]
user@switch# native-vlan-id vlan-id
- Enable extended VLAN bridge encapsulation on the interface:
[edit interfaces interface-name]
user@switch# encapsulation extended-vlan-bridge
- Bind the logical interface (unit) of the interface that
you specified earlier to the VLAN ID for the S-VLAN:
[edit interfaces interface-name unit logical-unit-number]
user@switch# vlan-id number
For example, the following configuration creates S-VLAN v200, makes xe-0/0/0.200 a member of that VLAN, enables Q-in-Q tunneling on interface xe-0/0/0, enables xe-0/0/0 to accept untagged packets, and binds a logical interface of xe-0/0/0 to the VLAN ID of VLAN v200.
set vlans v200 interface xe-0/0/0.200
set interfaces xe-0/0/0 flexible-vlan-tagging
set interfaces xe-0/0/0 native-vlan-id 10
set interfaces xe-0/0/0 encapsulation extended-vlan-bridge
set interfaces xe-0/0/0 unit 200 vlan-id 200
Now configure a specific interface mapping with optional VLAN ID translation on the C-VLAN interface:
- Assign a logical interface of the C-VLAN interface to
be a member of the S-VLAN.
[edit vlans vlan-name]
user@switch# interface interface-name.unit-number
- Enable the interface to transmit packets with 802.1Q VLAN
tags:
[edit interfaces interface-name]
user@switch# flexible-vlan-tagging
- Enable the C-VLAN interface to send and receive untagged
packets:
[edit interfaces interface-name]
user@switch# native-vlan-id vlan-id
- Enable extended VLAN bridge encapsulation on the interface:
[edit interfaces interface-name]
user@switch# encapsulation extended-vlan-bridge
- Configure a logical interface (unit) to receive and forward
any tagged packet whose VLAN ID tag matches the VLAN IDs you specify:
[edit interfaces interface-name unit logical-unit-number]
user@switch# vlan-id number
- Configure the system to remove the existing C-VLAN tag
and replace it with the S-VLAN tag when packets ingress on the C-VLAN
interface and are forwarded to the S-VLAN:
[edit interfaces interface-name unit logical-unit-number]
user@switch# input-vlan-map swap
- Configure the system to remove the existing S-VLAN tag
and replace it with the C-VLAN tag when packets are forwarded from
the S-VLAN interface to the C-VLAN interface:
[edit interfaces interface-name unit logical-unit-number]
user@switch# output-vlan-map swap
- To configure an S-VLAN and associate it with the appropriate
C-VLAN interface:
[edit vlans vlan-name]
user@switch# interface interface-name
For example, the following configuration on C-VLAN interface xe-0/0/1 enables Q-in-Q tunneling, enables xe-0/0/1 to accept untagged packets, and maps incoming packets from C-VLAN 150 to logical interface 200, which is a member of S-VLAN 200. Also, when packets egress from C-VLAN interface xe-0/0/1 and travel to the S-VLAN interface, the C-VLAN tag of 150 is removed and replaced with the S-VLAN tag of 200. When packets travel from the S-VLAN interface to the C-VLAN interface, the S-VLAN tag of 200 is removed and replaced with the C-VLAN tag of 150.
set vlans v200 interface xe-0/0/1.200
set interfaces xe-0/0/1 flexible-vlan-tagging
set interfaces xe-0/0/1 native-vlan-id 10
set interfaces xe-0/0/1 encapsulation extended-vlan-bridge
set interfaces xe-0/0/1 unit 200 vlan-id 150
set interfaces xe-0/0/1 unit 200 output-vlan-map
swap
set interfaces xe-0/0/1 unit 200 input-vlan-map
swap
Related Documentation
- EX Series, QFX Series standalone switches
- Understanding Q-in-Q Tunneling
- Configuring All-in-One Bundling
- Configuring Many-to-Many Bundling
Modified: 2015-06-08
Supported Platforms
Related Documentation
- EX Series, QFX Series standalone switches
- Understanding Q-in-Q Tunneling
- Configuring All-in-One Bundling
- Configuring Many-to-Many Bundling