Configuration Example – How to configure COS on EX boxes.

This KB provide you the example of the mimimum configuration of seting up the COS on Juniper EX series, the verification and explanation of every steps.

You can configure COS on Juniper EX boxes, in purpose of set traffic to a specific queue or ensure the important traffic not bing droped.

Topology:
HOST A —-ge-0/0/0| EX2200 |ge-0/0/1———HOST B

In this example, I would like to set a new queue which number is 2, named it as richz, set the buffer and transmit rate to this queue.
Also, I would like to match the traffic which from 1.1.1.0/24 subnet, then send it to the queue which name is richz.

Configuration on EX:

Every steps of COS:
1.Define the queue, queue name and queue number.
set class-of-service forwarding-classes class richz queue-num 2

2.Set the scheduler, to define the transmit-rate and buffer usage of this queue.
set class-of-service schedulers richz-S transmit-rate percent 10
set class-of-service schedulers richz-S buffer-size percent 10
set class-of-service schedulers richz-S priority strict-high

3.Set a scheduler-map to match the scheduler to the scheduler-map.
set class-of-service scheduler-maps richz-M forwarding-class richz scheduler richz-S

4. Add the map to the incoming interface(in this environment, ge-0/0/0 is the traffic incoming interface, traffic from ge-0/0/0 to ge-0/0/1 )
set class-of-service interfaces ge-0/0/0 scheduler-map richz-M

5.Set up the firewall filter to match the source-address which is 1.1.1.0/24 subnet, then put them in queue ‘richz’
set firewall family ethernet-switching filter richz-F term 1 from source-address 1.1.1.0/24
set firewall family ethernet-switching filter richz-F term 1 then forwarding-class richz
set firewall family ethernet-switching filter richz-F term 1 then loss-priority low
set firewall family ethernet-switching filter richz-F term else then accept

6.Add the firewall filter to the input of the ge-0/0/0.
set interfaces ge-0/0/0 unit 0 family ethernet-switching filter input richz-F

COS verification:
Becase of COS only working on the egress direction. So in this case we need to verify if it works on ge-0/0/1 interface.

 

About the author

James Palmer

Leave a Comment