This article explains with an example how to configure traffic-control-profiles to define scheduling for a forwarding class and how to apply scheduler maps to an interface when using ELS.
When using ELS, users may not find the scheduler-map option to apply a scheduler map to an interface:
root@hostname# set class-of-service interfaces xe-0/0/46 ?
Possible completions:
+ apply-groups Groups from which to inherit configuration data
+ apply-groups-except Don't inherit configuration data from these groups
> classifiers Classifiers applied to incoming packets
congestion-notification-profile Congestion notification profile for the interface
> exclude-queue-overhead-bytes Exclude the overhead bytes from the queue statistics
forwarding-class Forwarding class assigned to incoming packets
> forwarding-class-set Map forwarding class sets to output traffic control profile
> logical-interface-aggregate-statistics Logical interface aggregate queue statistics
> rewrite-rules Rewrite rules applied to outgoing packets
> unit Logical interface unit (or wildcard)
{master:0}[edit]
root@hostname# set class-of-service interfaces xe-0/0/46
Example
#set class-of-service interface ge-* scheduler-map SCHEDULER-MAP-A
Therefore, when using ELS platforms, users must configure traffic-control-profiles and apply the following command.
set class-of-service interfaces xe-* forwarding-class-set <name> output-traffic-control-profile <name>
Note: Make sure that the strict high and low priorities are all not mixed in one scheduler map; users will not be allowed to mix strict high and low priorities when applying the scheduler-map and forwarding-class-set to the interface.
Topology
Switch-1-----------xe-0/0/46-----------------xe-0/0/46--------------Switch-2
The following configuration is applied in Switch-1 and explains only the traffic-control-profile configuration and how to apply it to the interface.
We have four classes:
-
>VOICE queue 3
-
>VIDEO queue 4
-
>data-1 queue 1
-
>data-2 queue 2
-
Configure forwarding-classes
.
set class-of-service forwarding-classes class VOICE queue-num 3
set class-of-service forwarding-classes class VIDEO queue-num 4
set class-of-service forwarding-classes class data-1 queue-num 1
set class-of-service forwarding-classes class data-2 queue-num 2
-
Configure schedulers
.
set class-of-service schedulers VOICE shaping-rate percent 100
set class-of-service schedulers VOICE buffer-size percent 40
set class-of-service schedulers VOICE priority strict-high
set class-of-service schedulers VIDEO buffer-size percent 30
set class-of-service schedulers VIDEO priority strict-high
set class-of-service schedulers data-1 transmit-rate percent 20
set class-of-service schedulers data-1 buffer-size percent 20
set class-of-service schedulers data-1 priority low
set class-of-service schedulers data-2 transmit-rate percent 10
set class-of-service schedulers data-2 buffer-size percent 10
set class-of-service schedulers data-2 priority low
Note: Remember that transmit rate is not allowed when priority is set to strict high.
root@hostname# set class-of-service schedulers VOICE transmit-rate percent 90
{master:0}[edit]
root@hostname# commit
error: Transmit-rate is being configured on a strict-priority scheduler :VOICE which is not allowed
-
Configure scheduler maps for priority low and priority high. In this case, VOICE and VIDEO are strict high so they must have their own scheduler-map. Strict high and low priorities cannot be combined when traffic-control-profile is used to apply scheduler maps.
set class-of-service scheduler-maps MAP forwarding-class data-1 scheduler data-1
set class-of-service scheduler-maps MAP forwarding-class data-2 scheduler data-2
set class-of-service scheduler-maps MAP-High forwarding-class VOICE scheduler VOICE
set class-of-service scheduler-maps MAP-High forwarding-class VIDEO scheduler VIDEO
-
(Optional) This configuration can be used when using rewrite rules.
set class-of-service rewrite-rules dscp REWRITE forwarding-class VOICE loss-priority low code-point af11
set class-of-service rewrite-rules dscp REWRITE forwarding-class VIDEO loss-priority low code-point ef
set class-of-service rewrite-rules dscp REWRITE forwarding-class data-1 loss-priority high code-point be
set class-of-service rewrite-rules dscp REWRITE forwarding-class data-2 loss-priority low code-point be
-
Configure traffic-control-profiles
.
set class-of-service traffic-control-profiles MAP-TEST scheduler-map MAP <<< MAP. This is for low priority.
set class-of-service traffic-control-profiles MAP-TEST-High scheduler-map MAP-High <<< MAP-High. This is for strict high priority.
-
Configure forwarding-class-set
.
set class-of-service forwarding-class-sets F-SET class data-1 <<< F-SET this is for low priority.
set class-of-service forwarding-class-sets F-SET class data-2
set class-of-service forwarding-class-sets F-SET-High class VOICE <<F-SET-High: This is for strict high priority.
set class-of-service forwarding-class-sets F-SET-High class VIDEO
-
Apply the traffic-control-profiles
to the egress interface that is facing Switch-2.
set class-of-service interfaces xe-0/0/46 forwarding-class-set F-SET output-traffic-control-profile MAP-TEST
set class-of-service interfaces xe-0/0/46 forwarding-class-set F-SET-High output-traffic-control-profile MAP-TEST-High