Technical Documentation

Rewriting a VLAN Tag on Untagged Frames

On M320, M120, and MX Series routers with Gigabit Ethernet IQ, IQ2, and IQ2E PICs, 10-Gigabit Ethernet IQ, IQ2, and IQ2E PICs, and on MX Series 40-port Gigabit Ethernet R, 40-port Gigabit Ethernet R EQ, 4-port 10-Gigabit Ethernet R, and 4-port 10-Gigabit Ethernet R EQ DPCs, you can rewrite VLAN tags on untagged incoming and outgoing frames under ethernet-ccc and ethernet-vpls encapsulations. On MX Series routers with IQ2 and IQ2-E PICs, you can perform all rewrite VLAN tag operations. These features provide added flexibility.

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.

Note: 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.

Table 1: Input VLAN Map Statements Allowed for ethernet-ccc and ethernet-vpls Encapsulations

Operation

vlan-id

tag-protocol-id

inner-vlan-id

inner-tag-protocol-id

push

Yes

Optional

No

Optional

push-push

Yes

Optional

Yes

Optional

Table 2: Output VLAN Map Statements Allowed for ethernet-ccc and ethernet-vpls Encapsulations

Operation

vlan-id

tag-protocol-id

inner-vlan-id

inner-tag-protocol-id

pop

No

No

No

No

pop-pop

No

No

No

No

Table 3: Rules for Applying Rewrite Operations to VLAN Maps

 

Output VLAN Map

Input VLAN Map

None

pop

pop-pop

None

Yes

No

No

push

No

Yes

No

push-push

No

No

Yes

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;}}

You can use the show interface interface-name command to display the status of a modified VLAN map for the specified interface.

Related Topics


Published: 2010-07-14

Help
|
My Account
|
Log Out