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.
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 and IQ2-E interfaces, remove both the outer and inner VLAN tags of the frame.
- pop-swap—For Ethernet IQ2 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 and IQ2-E interfaces, push two VLAN tags in front of the frame.
- swap-push—For Ethernet IQ2 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 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 Not Tagged, Single-Tagged, and Dual-Tagged Frames
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:
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
As well as knowing if the VLAN rewrite operation is valid, and whether it 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.
