[j-nsp] Setting CoS bits on ingress frames

Dave Bell me at geordish.org
Tue Aug 4 10:48:41 EDT 2015


Glad to hear you have got it working.

You can make your config a little more concise too if you wanted.
Under the interfaces section under class-of-service, you can use the *
operator to match multiple interfaces.

This will apply to all interfaces on the box, and in effect become the default.

You can then pick out specific interfaces that require a different
configuration.

EG:
class-of-service {
    interfaces {
       * {
            unit 0 {
                classifiers {
                    ieee-802.1 pasolink;
                }
                rewrite-rules {
                    ieee-802.1 default;

                }
            }
        }
        ge-0/0/0 {
            unit 0 {
                forwarding-class assured-forwarding;
            }
        }
    }
}

This will have the same net effect of the snippet you replied with
earlier. All ports will get the trunk config, unless you state
otherwise.

You can also specify part of the interface name, and use * to match
the rest. ie you could have the following:

class-of-service {
    interfaces {
        xe-* {
            unit 0 {
                forwarding-class assured-forwarding;
            }
        }
    }
}

This will match all 10G interfaces on the box and apply that config to it.

I believe you can also use the * operator on the unit number also for
added flexibility.

This may or may not be useful to you, but its there.

Regards,
Dave

On 4 August 2015 at 15:10, Victor Sudakov <vas at mpeks.tomsk.su> wrote:
> Thank you Dave and Chuck and all who have replied.
>
> I now have a working configuration which does what I wanted (using
> default forwarding classes and default rewrite rules to make it
> concise).
>
> class-of-service {
>     classifiers {
>         ieee-802.1 pasolink {
>             forwarding-class best-effort {
>                 loss-priority low code-points [ 000 001 ];
>             }
>             forwarding-class expedited-forwarding {
>                 loss-priority low code-points [ 010 011 ];
>             }
>             forwarding-class assured-forwarding {
>                 loss-priority low code-points [ 100 101 ];
>             }
>             forwarding-class network-control {
>                 loss-priority low code-points [ 110 111 ];
>             }
>         }
>     }
>     interfaces {
>         /* access port */
>         ge-0/0/0 {
>             unit 0 {
>                 forwarding-class assured-forwarding;
>             }
>         }
>         /* trunk port */
>         ge-0/0/22 {
>             unit 0 {
>                 classifiers {
>                     ieee-802.1 pasolink;
>                 }
>                 rewrite-rules {
>                     ieee-802.1 default;
>                 }
>             }
>         }
>         /* trunk port */
>         ge-0/0/23 {
>             unit 0 {
>                 classifiers {
>                     ieee-802.1 pasolink;
>                 }
>                 rewrite-rules {
>                     ieee-802.1 default;
>                 }
>             }
>         }
>     }
> }
>
> --
> Victor Sudakov,  VAS4-RIPE, VAS47-RIPN
> sip:sudakov at sibptus.tomsk.ru


More information about the juniper-nsp mailing list