Resurrecting an old post of mine.

Today I was googling something and found this post as a source of what I wanted to know. I didn't trust the author though. There's a very important mistake below.

On Thu, Nov 6, 2014 at 3:39 PM, Dave Mill <dave@mill.net.nz> wrote:

In our test case interface [2] is actually xe-1/2/0.388 . And a simple fix for the issue is under the class-of-service section implement:

interfaces {
�� �� xe-1/2/0 {
�� �� �� �� unit 388 {
�� �� �� �� �� �� rewrite-rules {
�� �� �� �� �� �� �� �� ieee-802.1ad {
�� �� �� �� �� �� �� �� �� �� ieee-802.1ad-dei-rewrite;
�� �� �� �� �� �� �� �� �� �� vlan-tag outer;
�� �� �� �� �� �� �� �� }
�� �� �� �� �� �� }
�� �� �� �� }
�� �� }
}
rewrite-rules {
�� �� ieee-802.1ad ieee-802.1ad-dei-rewrite {
�� �� �� �� forwarding-class best-effort {
�� �� �� �� �� �� loss-priority low code-point 0000;
�� �� �� �� �� �� loss-priority high code-point 0000;
�� �� �� �� }
�� �� }
}

The key is to use a ieee-802.1ad rewrite rule rather than a ieee-802.1 rule. The leftmost bit of the 4 bit code-point is the DEI bit. This is all assuming that all traffic is classified as best-effort at interface [1] - if that is not the case then re-write the DEI bit for your other queues as well.


Actually, the rightmost bit in the 4 bit code-point is the DEI/CFI bit. Lucky I checked in to this before implementation as we would have had all packets dropped with a .1p set to an odd number if I had blindly trusted myself :)

Cheers
Dave��