Understanding Hierarchical Schedulers
Hierarchical schedules consist of nodes and queues. Queues terminate
the CLI hierarchy. Nodes can be either root nodes, leaf nodes, or
internal (non-leaf) nodes. Internal nodes are nodes that have other
nodes as “children” in the hierarchy. For example, if
an interface-set
statement is configured with a logical interface (such as unit 0) and queue, then
the interface-set
is an internal node at level 2 of the
hierarchy. However, if there are no traffic control profiles configured
on logical interfaces, then the interface set is at level 3 of the
hierarchy.
Table 1 shows how the configuration of an interface set or logical interface affects the terminology of hierarchical scheduler nodes.
Root Node (Level 1) |
Internal Node (Level 2) |
Leaf Node (Level 3) |
Queue (Level 4) |
---|---|---|---|
Physical interface |
Interface set |
Logical interfaces |
One or more queues |
Physical interface |
– |
Interface set |
One or more queues |
Physical interface |
– |
Logical interfaces |
One or more queues |
When used, the interface set level of the hierarchy falls between the physical interface level (level 1) and the logical interface (level 3). Queues are always level 4 of the hierarchy. The schedulers hold the information about the queues, the last level of the hierarchy. In all cases, the properties for level 4 of the hierarchical schedulers are determined by the scheduler map.
Hierarchical schedulers add CoS parameters to the new interface set level of the configuration. They use traffic control profiles to set values for parameters such as shaping rate (the peak information rate [PIR]), guaranteed rate (the committed information rate [CIR] on these interfaces), and scheduler maps (the queues and resources assigned to traffic).
The following CoS configuration places the following parameters in traffic control profiles at various levels:
Traffic control profile at the port level (
tcp-port-level1
):A shaping rate (PIR) of 100 Mbps
A delay buffer rate of 100 Mbps
Traffic control profile at the interface set level (
tcp-interface-level2
):A shaping rate (PIR) of 60 Mbps
A guaranteed rate (CIR) of 40 Mbps
Traffic control profile at the logical interface level (
tcp-unit-level3
):A shaping rate (PIR) of 50 Mbps
A guaranteed rate (CIR) of 30 Mbps
A scheduler map called smap1 to hold various queue properties (level 4)
A delay buffer rate of 40 Mbps
In this case, the traffic control profiles look like this:
[edit class-of-service traffic-control-profiles] tcp-port-level1 { # This is the physical port level shaping-rate 100m; delay-buffer-rate 100m; } tcp-interface-level2 { # This is the interface set level shaping-rate 60m; guaranteed-rate 40m; } tcp-unit-level3 { # This is the logical interface level shaping-rate 50m; guaranteed-rate 30m; scheduler-map smap1; delay-buffer-rate 40m; }
Once configured, the traffic control profiles must be applied to the proper places in the CoS interfaces hierarchy.
[edit class-of-service interfaces] interface-set level-2 { output-traffic-control-profile tcp-interface-level-2; } ge-0/1/0 { output-traffic-control-profile tcp-port-level-1; unit 0 { output-traffic-control-profile tcp-unit-level-3; } }
Interface sets can be defined as a list of logical interfaces,
for example, unit 100, unit 200, and so on. Service providers can
use these statements to group interfaces to apply scheduling parameters
such as guaranteed rate and shaping rate to the traffic in the groups.
Interface sets are currently only used by CoS, but they are applied
at the [edit interfaces]
hierarchy level so that they might
be available to other services.
All traffic heading downstream must be gathered into an interface
set with the interface-set
statement at the [edit class-of-service
interfaces] hierarchy level.
Ranges are not supported; you must list each logical interface separately.
Although the interface set is applied at the [edit interfaces]
hierarchy level, the CoS parameters for the interface set are defined
at the [edit class-of-service interfaces] hierarchy level, usually
with the output-traffic-control-profile profile-name
statement.
You cannot specify an interface set mixing the logical interface,
S-VLAN, or VLAN outer tag list forms of the interface-set
statement. A logical interface can only belong to one interface
set. If you try to add the same logical interface to different interface
sets, the commit will fail.
This example will generate a commit error:
[edit interfaces] interface-set set-one { ge-2/0/0 { unit 0; unit 2; } } interface-set set-two { ge-2/0/0 { unit 1; unit 3; unit 0; # COMMIT ERROR! Unit 0 already belongs to -set-one. } }
Members of an interface set cannot span multiple physical interfaces. Only one physical interface is allowed to appear in an interface set.
This configuration is not supported:
[edit interfaces] interface-set set-group { ge-0/0/1 { unit 0; unit 1; } ge-0/0/2 { # This type of configuration is NOT supported in the same interface set! unit 0; unit 1; } }
You can configure many logical interfaces under an interface. However, only a subset of them might have a traffic control profile attached. For example, you can configure three logical interfaces (units) over the same service VLAN, but you can apply a traffic control profile specifying best-effort and voice queues to only one of the logical interface units. Traffic from the two remaining logical interfaces is considered remaining traffic.
The scheduler map configured at individual interfaces (Level 3), interface sets (Level 2), or physical ports (Level 1), defines packet scheduling behavior at different levels. You can group logical interfaces in an interface set and configure the interfaces with scheduler maps. Any egress packet arriving at the physical or logical interfaces will be handled by the interface specific scheduler. If the scheduler map is not configured at the interface level, the packet will be handled by the scheduler configured at the interface set level or the port level.