Rewriting a VLAN Tag on Untagged Frames
Overview
You can rewrite VLAN tags on untagged incoming and outgoing frames with the ethernet-ccc and the ethernet-vpls encapsulations for the following routers:
MX240, MX480, and MX960 routers with:
Gigabit Ethernet Enhanced DPC with SFP
Gigabit Ethernet Enhanced Queuing IP Services DPCs with SFP
10-Gigabit Ethernet Enhanced DPCs with XFP
10-Gigabit Ethernet Enhanced Queuing IP Services DPC with XFP
Consider a network where two provider edges (PE) are connected by a Layer 2 circuit. PE1 is receiving traffic on an untagged port while the corresponding port on PE2 is tagged. In the normal case, packets coming from PE1 will be dropped at PE2 because it is expecting tagged packets. However, if PE1 can push a VLAN tag on the incoming packet before sending it across to PE2, you can ensure that packets are not dropped. To make it work in both directions, PE1 must strip the VLAN tag from outgoing packets. Therefore, a push on the ingress side is always paired with a pop on the egress side.
The rewrite operations represented by the following statement
options are supported under ethernet-ccc and ethernet-vpls encapsulations:
push—A VLAN tag is added to the incoming untagged frame.pop—VLAN tag is removed from the outgoing frame.push-push—An outer and inner VLAN tag are added to the incoming untagged frame.pop-pop—Both the outer and inner VLAN tags of the outgoing frame are removed.
IQ2 and 10-Gigabit Ethernet PICs support all rewrite operations described above. Details on the possible combinations of usage are explained later in this section.
The push-push and pop-pop operations
are not supported on the Gigabit Ethernet IQ PIC.
For the input-vlan-map statement, only the push and push-push options are supported because it does not
make sense to remove a VLAN tag from an incoming untagged frame. Similarly,
only the pop and pop-pop options are supported
for the output-vlan-map statement. Also, with the push and push-push options, the tag parameters have
to be explicitly specified. Apart from this, the other rules for configuring
the input-vlan-map and output-vlan-map statements
are the same as for tagged frames. Table 1 through Table 3 explain the rules in more detail.
For the input-vlan-map statement, only the push and push-push options are supported because it does not
make sense to remove a VLAN tag from an incoming untagged frame. Similarly,
only the pop and pop-pop options are supported
for the output-vlan-map statement. Also, with the push and push-push options, the vlan-id parameters (vlan-id for push and vlan-id or inner-vlan-id for push-push) have to be
explicitly specified. TPID however, is optional and the default value
of 0x8100 is set if not configured. Apart from this, the
other rules for configuring the input-vlan-map and output-vlan-map statements are the same as for tagged frames.
| Operation | vlan-id |
tag-protocol-id |
inner-vlan-id |
inner-tag-protocol-id |
|
Yes |
Optional |
No |
Optional |
|
Yes |
Optional |
Yes |
Optional |
| Operation | vlan-id |
tag-protocol-id |
inner-vlan-id |
inner-tag-protocol-id |
|
No |
No |
No |
No |
|
No |
No |
No |
No |
Output VLAN Map |
|||
| Input VLAN Map | None |
pop |
pop-pop |
|
Yes |
No |
No |
|
No |
Yes |
No |
|
No |
No |
Yes |
You can use the show interface interface-name command to display the status of a modified VLAN map for the
specified interface.
Example: push and pop with Ethernet CCC Encapsulation
ge-3/1/0 {
encapsulation ethernet-ccc;
unit 0 {
encapsulation ethernet-ccc;
input-vlan-map {
push;
tag-protocol-id 0x8100;
vlan-id 600;
}
output-vlan-map pop;
family ccc;
}
}
Example: push-push and pop-pop with Ethernet CCC Encapsulation
ge-3/1/0 {
encapsulation ethernet-ccc;
unit 0 {
encapsulation ethernet-ccc;
input-vlan-map {
push-push;
tag-protocol-id 0x8100;
inner-tag-protocol-id 0x8100;
vlan-id 600;
inner-vlan-id 575;
}
output-vlan-map pop-pop;
family ccc;
}
}
Example: push and pop with Ethernet VPLS Encapsulation
ge-3/1/0 {
encapsulation ethernet-vpls;
unit 0 {
encapsulation ethernet-vpls;
input-vlan-map {
push;
tag-protocol-id 0x8100;
vlan-id 700;
}
output-vlan-map pop;
family vpls;
}
}
Example: push-push and pop-pop with Ethernet VPLS Encapsulation
ge-3/1/0 {
encapsulation ethernet-vpls;
unit 0 {
encapsulation ethernet-vpls;
input-vlan-map {
push-push;
tag-protocol-id 0x8100;
inner-tag-protocol-id 0x8100;
vlan-id 600;
inner-vlan-id 575;
}
output-vlan-map pop-pop;
family vpls;
}
}