If you want to study Juniper Class of Service on MX routers, use this materials:
- Junos Class of Service (JCOS) course;
- Juniper MX Series book (caution! really hard stuff in there);
- Class of Service Feature Guide for Routing Devices.
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:
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:
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:
user@switch# set system-defaults classifiers exp classifier-name
Create an EXP rewrite rule:
Apply the rewrite rule to a logical interface:
Forwarding class configuration:
class best-effort queue-num 0;
class network-control queue-num 7;
class mcast queue-num 8;
Forwarding class set (QFX feature):
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:
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.
transmit-rate percent 20;
shaping-rate percent 40;
buffer-size percent 20;
drop-profile-map loss-priority low protocol any drop-profile be-dp;
forwarding-class best-effort scheduler be-sched;
Apply scheduler-map to traffic control profile:
Configure traffic control profile guaranteed-rate and shaping-rate:
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:
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:
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.