Applying IEEE 802.1p Rewrite Rules to Dual VLAN Tags
By default, when you apply an IEEE 802.1p rewrite rule to an output logical interface, the software rewrites the IEEE bits in the outer VLAN tag only.
You can rewrite the IEEE bits in both the outer and inner VLAN tags of the tagged Ethernet frames. When you enable class of service (CoS) rewrite for both tags, the same IEEE 802.1p rewrite table is used for the inner and outer VLAN tag.
To rewrite both the outer and inner VLAN tags, include the vlan-tag
outer-and-inner statement at the [edit class-of-service interfaces
interface-name unit logical-unit-number
rewrite-rules ieee-802.1 (rewrite-name | default)]
hierarchy level:
[edit class-of-service interfaces interface-name unit logical-unit-number rewrite-rules ieee-802.1 (rewrite-name | default)] vlan-tag outer-and-inner;
To explicitly specify the default behavior, include the vlan-tag outer
statement at the [edit class-of-service interfaces
interface-name unit logical-unit-number
rewrite-rules ieee-802.1 (rewrite-name | default)]
hierarchy level:
[edit class-of-service interfaces interface-name unit logical-unit-number rewrite-rules ieee-802.1 (rewrite-name | default)] vlan-tag outer;
For more information about VLAN tags, see the Junos OS Network Interfaces Library for Routing Devices.
On MX routers and EX Series
switches, you can perform IEEE 802.1p and DEI rewriting based on forwarding class and
PLP at the VPLS ingress PE. You rewrite (mark) the IEEE 802.1p or DEI bits on frames at
the VPLS ingress PE based on the value of the forwarding class and PLP established for
the traffic. You can rewrite either the outer tag only or the outer and inner tag. When
both tags are rewritten, both get the same value. To configure these rewrite rules,
include the ieee-802.1 statement at the [edit class-of-services
routing-instance routing-instance-name rewrite-rules]
hierarchy level.
For MX80, MX240, MX480, and MX960 routers with MPC/MICs, rewrite on LSI interfaces is not supported (the routers, with DPC, do support rewrite on LSI interfaces).
On routing devices with IQ2 or IQ2-E PICs, you can perform IEEE 802.1p and DEI rewriting based on forwarding-class and packet loss priority (PLP) at the VPLS ingress provider edge (PE) router. You rewrite (mark) the IEEE 802.1p or DEI bits on frames at the VPLS ingress PE based on the value of the forwarding-class and PLP established for the traffic. You can rewrite either the outer tag only or both the outer and inner tags. When both tags are rewritten, both get the same value.
The 10-port 10-Gigabit OSE PIC does not support DEI rewriting based on forwarding class and PLP at the VPLS ingress PE.
To configure these rewrite rules, include the ieee-802.1 statement at
the [edit class-of-services routing-instance
routing-instance-name rewrite-rules] hierarchy
level.
Example: Applying an IEEE 802.1p Rewrite Rule to Dual VLAN Tags
Apply the ieee8021p-rwrule1 rewrite rule to both inner and outer
VLAN tags of Ethernet-tagged frames exiting the ge-0/0/0.0
interface:
class-of-service {
interfaces {
ge-0/0/0 {
unit 0 {
rewrite-rules {
ieee-802.1 ieee8021p-rwrule1 vlan-tag outer-and-inner;
}
}
}
}
}