Class of Service

Class of Service

If you want to study Juniper Class of Service on MX routers, use this materials:

Unfortunately there is no decent book about QFX5100 Class of Service implementation (at least I didn’t find one), so there is nothing left but to use QFX Traffic Management Feature Guide.

It’s a hell lot of material to study of you start it from scratch. Plan to read a couple of months at minimum if you new to this topic.

Luckly I’m already pretty confidentĀ at my knowledge of MX COS from JNCIE-SP lab preparation, so just need to refresh it a bit. And of course I need to study QFX COS to know the differences of its implementation.

Below some of my notes about QFX COS configuration. If you can’t understand something in this config examples, please refer to QFX COS Feature Guide.

Create a unicast BA classifier:

[edit class-of-service classifiers]
user@switch# set (dscp | dscp-ipv6 | ieee-802.1) classifier-name import default forwarding-class forwarding-class-name loss-priority level code-points [aliases] [bit-patterns]

Apply the classifier to a specific interface:

[edit class-of-service interfaces]
user@switch# set interface-name unit unit classifiers (dscp | dscp-ipv6 | ieee-802.1) classifier-name
user@switch# set xe-* unit * classifiers (dscp | dscp-ipv6 | ieee-802.1) classifier-name

Apply the EXP classifier to the switch interfaces:

[edit class-of-service]
user@switch# set system-defaults classifiers exp classifier-name

Create an EXP rewrite rule:

user@switch# set class-of-service rewrite-rules exp rewrite-rule-name forwarding-class forwarding-class-name loss-priority level code-points [aliases] [bit-patterns]

Apply the rewrite rule to a logical interface:

user@switch # set class-of-service interfaces interface-name unit logical-unit rewrite-rules
exp rewrite-rule-name

Forwarding class configuration:

user@switch> show configuration class-of-service forwarding-classes
class best-effort queue-num 0;
class network-control queue-num 7;
class mcast queue-num 8;

Forwarding class set (QFX feature):

[edit class-of-service]
user@switch# set forwarding-class-sets lan-pg class best-effort-1
user@switch# set forwarding-class-sets lan-pg class best-effort-2

To change the host outbound traffic egress queue:

[edit class-of-service]
host-outbound-traffic {
    forwarding-class class-name;
    dscp-code-point code-point;
}

QFX NOTE: You cannot configure a transmit rate for strict-high priority queues. Queues (forwarding classes) with a configured transmit rate cannot be included in a forwarding class set that has strict-high priority queues. You can configure only one queue as a strict-high priority queue. QFX only has strict-high and low priority.

Scheduling configuration:

user@switch> show configuration class-of-service schedulers be-sched
transmit-rate percent 20;
shaping-rate percent 40;
buffer-size percent 20;
priority low;
drop-profile-map loss-priority low protocol any drop-profile be-dp;

Scheduler-map configuration:

user@switch> show configuration class-of-service scheduler-maps be-map
forwarding-class best-effort scheduler be-sched;

Apply scheduler-map to traffic control profile:

user@switch> show configuration class-of-service traffic-control-profiles be-tcp scheduler-map
scheduler-map be-map;

Configure traffic control profile guaranteed-rate and shaping-rate:

[edit class-of-service traffic-control-profiles traffic-control-profile-name]
user@switch# set guaranteed-rate (rate | percent percentage)
user@switch# set shaping-rate (rate | percent percentage)

Map forwarding class sets to an interface and traffic-control-profiles:

[edit class-of-service]
user@switch# set interfaces xe-0/0/7 forwarding-class-set lan-pg output-traffic-control-profile lan-tcp
user@switch# set interfaces xe-0/0/7 forwarding-class-set san-pg output-traffic-control-profile san-tcp
user@switch# set interfaces xe-0/0/7 forwarding-class-set hpc-pg output-traffic-control-profile hpc-tcp

NOTE: You cannot apply a traffic control profile with a minimum guaranteed bandwidth to a priority group that includes strict-high priority queues.

Configure the drop profile:

[edit class-of-service]
user@switch# set drop-profiles dp-be-low interpolate fill-level 25 fill-level 50 drop-probability 0 drop-probability 80


The main differencies of QFX COS configuration from MX one are the forwarding class sets and various queue priority limitations.

2 thoughts on “Class of Service

  1. Do you mind expanding on this topic after taking the JNCIE-DC and how Class of Service is handled on the QFX ?

    thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *