For some rewrite operations, you must configure the inner or outer TPID values and inner or outer VLAN ID values. These values can be applied to either the input VLAN map or the output VLAN map.
On Ethernet IQ and IQ2 interfaces, on MX-series router Gigabit Ethernet, Tri-Rate Ethernet copper, and 10-Gigabit Ethernet interfaces, and on aggregated Ethernet interfaces using Gigabit Ethernet IQ2 or 10-Gigabit Ethernet PICs on MX-series routing platforms, include the inner-tag-protocol-id statement to configure the inner TPID. For the inner VLAN ID, include the inner-vlan-id statement. For the outer TPID, include the tag-protocol-id statement. For the outer VLAN ID, include the vlan-id statement:
-
input-vlan-map {
- (pop | pop-pop | pop-swap | push | push-push | swap | swap-push | swap-swap);
-
inner-tag-protocol-id tpid;
-
inner-vlan-id number;
-
tag-protocol-id tpid;
-
vlan-id number;
- }
-
output-vlan-map {
- (pop | pop-pop | pop-swap | push | push-push | swap | swap-push | swap-swap);
-
inner-tag-protocol-id tpid;
-
inner-vlan-id number;
-
tag-protocol-id tpid;
-
vlan-id number;
- }
For aggregated Ethernet interfaces using Gigabit Ethernet IQ interfaces, include the tag-protocol-id statement for the outer TPID. For the outer VLAN ID, include the vlan-id statement:
-
input-vlan-map {
- (pop | push | swap);
-
tag-protocol-id tpid;
-
vlan-id number;
- }
-
output-vlan-map {
- (pop | push | swap);
-
tag-protocol-id tpid;
-
vlan-id number;
- }
For the input VLAN map, include these statements at the following hierarchy levels:
For the output VLAN map, include these statements at the following hierarchy levels:
The VLAN IDs you define in the input VLAN maps are stacked on top of the VLAN ID bound to the logical interface. For more information about binding a VLAN ID to the logical interface, see Configuring 802.1Q VLANs.
All TPIDs you include in input and output VLAN maps must be among those you specify at the [edit interfaces interface-name gigether-options ethernet-switch-profile tag-protocol-id [ tpids ]] hierarchy level or [edit interfaces interface-name aggregated-ether-options ethernet-switch-profile tag-protocol-id [ tpids ]] hierarchy level. For more information, see Configuring Frames with Particular TPIDs to Be Processed as Tagged Frames.
Table 50 and Table 51 specify when these statements are required. Table 50 indicates valid statement combinations for rewrite operations for the input VLAN map. “No” means the statement must not be included in the input VLAN map for the rewrite operation. “Optional” means the statement may be optionally specified for the rewrite operation in the input VLAN map. “Any” means that you must include the vlan-id statement, tag-protocol-id statement, inner-vlan-id statement, or inner-tag-protocol-id statement.
Table 50: Rewrite Operations and Statement Usage for Input VLAN Maps
Table 51 indicates valid statement combinations for rewrite operations for the output VLAN map. “No” means the statement must not be included in the output VLAN map for the rewrite operation. “Optional” means the statement may be optionally specified for the rewrite operation in the output VLAN map.
Table 51: Rewrite Operations and Statement Usage for Output VLAN Maps
The following examples use Table 50 and Table 51 and show how the pop-swap operation can be configured in an input VLAN map and an output VLAN map:
Input VLAN Map with inner-vlan-id Statement, Output VLAN Map with Optional inner-tag-protocol-id Statement
- [edit interfaces interface-name unit logical-unit-number]
-
input-vlan-map {
-
pop-swap;
-
inner-vlan-id number;
- }
-
output-vlan-map {
-
pop-swap;
-
inner-tag-protocol-id tpid;
- }
Input VLAN Map with inner-tag-protocol-id Statement, Output VLAN map with Optional inner-tag-protocol-id Statement
- [edit interfaces interface-name unit logical-unit-number]
-
input-vlan-map {
-
pop-swap;
-
inner-tag-protocol-id tpid;
- }
-
output-vlan-map {
-
pop-swap;
-
inner-tag-protocol-id tpid;
- }
Input VLAN Map with inner-tag-protocol-id and inner-vlan-id Statements
- [edit interfaces interface-name unit logical-unit-number]
-
input-vlan-map {
-
pop-swap;
-
inner-vlan-id number;
-
inner-tag-protocol-id tpid;
- }