Help us improve your experience.

Let us know what you think.

Do you have time for a two-minute survey?

 
 

Stacking and Rewriting Gigabit Ethernet VLAN Tags

You can configure rewrite operations to stack (push), remove (pop), or rewrite (swap) tags on single-tagged frames and dual-tagged frames. If a port is not tagged, rewrite operations are not supported on any logical interface on that port. Stacked and rewriting Gigabit-Ethernet VLAN Tags are also referred to as Q-in-Q tunneling.

You can configure the following VLAN rewrite operations:

  • pop—Remove a VLAN tag from the top of the VLAN tag stack. The outer VLAN tag of the frame is removed.

  • pop-pop—For Ethernet IQ2, 10-Gigabit Ethernet LAN/WAN PIC, and IQ2-E interfaces, remove both the outer and inner VLAN tags of the frame.

  • pop-swap—For Ethernet IQ2, 10-Gigabit Ethernet LAN/WAN PIC, and IQ2-E interfaces, remove the outer VLAN tag of the frame, and replace the inner VLAN tag of the frame with a user-specified VLAN tag value. The inner tag becomes the outer tag in the final frame.

  • push—Add a new VLAN tag to the top of the VLAN stack. An outer VLAN tag is pushed in front of the existing VLAN tag.

  • push-push—For Ethernet IQ2, 10-Gigabit Ethernet LAN/WAN PIC, and IQ2-E interfaces, push two VLAN tags in front of the frame.

  • swap-push—For Ethernet IQ2, 10-Gigabit Ethernet LAN/WAN PIC, and IQ2-E interfaces, replace the outer VLAN tag of the frame with a user-specified VLAN tag value. A user-specified outer VLAN tag is pushed in front. The outer tag becomes an inner tag in the final frame.

  • swap-swap—For Ethernet IQ2, 10-Gigabit Ethernet LAN/WAN PIC, and IQ2-E interfaces, replace both the inner and the outer VLAN tags of the incoming frame with a user-specified VLAN tag value.

You configure VLAN rewrite operations for logical interfaces in the input VLAN map for incoming frames and in the output VLAN map for outgoing frames. To configure the input VLAN map, include the input-vlan-map statement:

To configure the output VLAN map, include the output-vlan-map statement:

You can include both statements at the following hierarchy levels:

  • [edit interfaces interface-name unit logical-unit-number]

  • [edit logical-systems logical-system-name interfaces interface-name unit logical-unit-number]

The type of VLAN rewrite operation permitted depends upon whether the frame is single-tagged or dual-tagged. Table 1 shows supported rewrite operations and whether they can be applied to single-tagged frames or dual-tagged frames. The table also indicates the number of tags being added or removed during the operation.

Table 1: Rewrite Operations on Untagged, Single-Tagged, and Dual-Tagged Frames

Rewrite Operation

Untagged

Single-Tagged

Dual-Tagged

Number of Tags

pop

No

Yes

Yes

– 1

push

Sometimes

Yes

Yes

+1

swap

No

Yes

Yes

0

push-push

Sometimes

Yes

Yes

+2

swap-push

No

Yes

Yes

+1

swap-swap

No

No

Yes

0

pop-pop

No

No

Yes

– 2

pop-swap

No

No

Yes

– 1

The rewrite operations push and push-push can be valid in certain circumstances on frames that are not tagged. For example, a single-tagged logical interface (interface 1) and a dual-tagged logical interface (interface 2) have the following configurations:

Interface 1

Interface 2

When a frame is received on the interface as a result of the input-vlan-map operation, the frame is not tagged. As it goes out of the second interface, the output-vlan-map operation push-push is applied to it. The resulting frame will be dual-tagged at the logical interface output.

Depending on the VLAN rewrite operation, you configure the rewrite operation for the interface in the input VLAN map, the output VLAN map, or in both the input VLAN map and the output VLAN map. Table 2 shows what rewrite operation combinations you can configure. “None” means that no rewrite operation is specified for the VLAN map.

Table 2: Applying Rewrite Operations to VLAN Maps
 

Output VLAN Map

Input VLAN Map

none

push

pop

swap

push-push

swap-push

swap-swap

pop-pop

swap-pop

none

Yes

No

No

Yes

No

No

Yes

No

No

push

No

No

Yes

No

No

No

No

No

No

pop

No

Yes

No

No

No

No

No

No

No

swap

Yes

No

No

Yes

No

No

No

No

No

push-push

No

No

No

No

No

No

No

Yes

No

swap-push

No

No

No

No

No

No

No

No

Yes

swap-swap

Yes

No

No

No

No

No

Yes

No

No

pop-pop

No

No

No

No

Yes

No

No

No

No

pop-swap

No

No

No

No

No

Yes

No

No

No

You must know whether the VLAN rewrite operation is valid and is applied to the input VLAN map or the output VLAN map. You must also know whether the rewrite operation requires you to include statements to configure the inner and outer TPIDs and inner and outer VLAN IDs in the input VLAN map or output VLAN map. For information about configuring inner and outer TPIDs and inner and outer VLAN IDs, see Configuring Inner and Outer TPIDs and VLAN IDs.