Example: Configuring Per-Priority Shaping on MIC and MPC Interfaces
In practice, per-priority shaping is used with other traffic control profiles to control traffic as a whole. Consider the traffic control profile applied to the physical interface (port), as shown in Figure 1.
This example is more complex than those used before. In addition to a pair of subscribers in an interface set (DSLAM), the figure now adds the following:
A dummy level 3 scheduler node (
interface-set-remaining-traffic
) that provides scheduling for interface set members that do not have explicit class-of-service parameters configured.A subscriber (Subscriber 3) that is not a member of an interface set. A dummy level 2 node connects Subscriber 3’s level 3 node to level 1, making it appear to be at level 2.
A dummy level 3 scheduler node (
port-remaining-traffic
) in order to provide queues for traffic that does not have explicit class-of-service parameters configured.A dummy level 2 scheduler node to connect level 1 and level 3 scheduler nodes. This dummy level 2 scheduler node is internal only.
This example uses a gigabit Ethernet interface with five logical interface units, each one representing one of the level 3 nodes in Figure 1.
From the top of the figure to the bottom, the level 3 nodes are:
Unit 3 is scheduled as a “dummy” level 3 node because unit 3 is a member of an interface set (
ifset-1
) but there is no explicit CoS configuration.Unit 1 is scheduled as a logical interface node for subscriber 1 because unit 1 is a member of an interface set (
ifset-1
) and has an explicit CoS configuration under the[edit class-of-service interfaces]
hierarchy.Unit 2 is scheduled as a logical interface node for subscriber 2 because unit 2 is a member of an interface set (
ifset-1
) and has an explicit CoS configuration under the[edit class-of-service interfaces]
hierarchy.Unit 4 is scheduled as a logical interface node for subscriber 3 because unit 4 is not a member of an interface set but has an explicit CoS configuration under the
[edit class-of-service interfaces]
hierarchy level.Unit 5 is scheduled by another “dummy” level 3 node, this one for remaining traffic at the port level, because unit 5 is not a member of an interface set and has no explicit CoS configuration.
In this example, per-priority shaping is applied at the physical port level. The example uses three priorities, but other parameters are possible. The example does not use shaping rates, transmit rates, excess priorities, or other options for reasons of simplicity. The example uses five forwarding classes and leaves out a network control forwarding class that would typically be included in real configurations.
The example configuration is presented in several parts:
Interfaces configuration
Class-of-service forwarding classes and traffic control profiles configuration
Class-of-service interfaces configuration
Class-of-service schedulers and scheduler map configuration
Interfaces configuration:
[edit] interfaces { # A three member interface-set. interface-set ifset-1 { interface ge-1/1/0 { unit 1; unit 2; unit 3; } } # A ge port configured for "hierarchical-scheduling" and # vlans. 5 vlans are configured for the 5 level-3 scheduler # nodes # ge-1/1/0 { hierarchical-scheduler; vlan-tagging; unit 1 { vlan-id 1; } unit 2 { vlan-id 2; } unit 3 { vlan-id 3; } unit 4 { vlan-id 4; } unit 5 { vlan-id 5; } } }
Class-of-service forwarding classes and traffic control profiles configuration:
[edit class-of-service] forwarding-classes { queue 0 BE priority low; queue 1 BBE priority low; queue 2 AF priority low; queue 3 EF priority high; } traffic-control-profiles { tcp-if-portd { shaping-rate-priority-high 500k; shaping-rate-priority-medium 100m; } tcp-if-port-rem { scheduler-map smap-1; } tcp-ifset-rem { scheduler-map smap-1; } tcp-if-unit { scheduler-map smap-1; shaping-rate 10m; } }
Class-of-service interfaces configuration:
[edit class-of-service] interfaces { interface-set ifset-1 { output-traffic-control-profile-remaining tcp-ifset-rem; } ge-1/1/0 { output-traffic-control-profile tcp-if-port; output-traffic-control-profile-remaining tcp-if-port-rem; unit 1 { output-traffic-control-profile tcp-if-unit; } unit 2 { output-traffic-control-profile tcp-if-unit; } # Unit 3 present in the interface config and interface-set # config, but is absent in this CoS config so that we can # show traffic that uses the interface-set # remaining-traffic path. unit 4 { output-traffic-control-profile tcp-if-unit; } # Unit 5 is present in the interface config, but is absent # in this CoS config so that we can show traffic that # uses the if-port remaining-traffic path. } }
Class-of-service schedulers and scheduler map configuration:
[edit class-of-service] scheduler-maps { smap-1 { forwarding-class BE scheduler sched-be; forwarding-class BBE scheduler sched-bbe; forwarding-class AF scheduler sched-af; forwarding-class EF scheduler sched-ef; } schedulers { sched-be { priority low; } sched-bbe { priority low; } sched-af { priority medium-high; } sched-ef { priority high; } }
You can configure both a shaping rate and a per-priority shaping
rate. In this case, the legacy shaping-rate
statement specifies
the maximum rate for all traffic scheduled through the scheduler.
Therefore, the per-priority shaping rates must be less than or equal
to the overall shaping rate. So if there is a shaping-rate 400m
statement configured in a traffic control profile, you cannot configure
a higher value for a per-priority shaping rate (such as shaping-rate-priority-high
500m
). However, the sum of the per-priority shaping rates can
exceed the overall shaping rate: for shaping-rate 400m
you
can configure both shaping-rate-priority-high 300m
and shaping-rate-priority-low 200m
statements.
Generally, you cannot configure a shaping rate that is smaller than the guaranteed rate (which is why it is guaranteed). However, no such restriction is placed on per-priority shaping rates unless all shaping rates are for priority high or low or medium traffic.
This configuration is allowed (per-priority rates smaller than guaranteed rate):
[edit class-of-service] traffic-control-profile { tcp-for-ge-port { guaranteed-rate 500m; shaping-rate-priority-high 400m; shaping-rate-priority-medium 300m; shaping-rate-excess-high 100m; } }
However, this configuration generates an error (no excess per-priority rate, so the node can never achieve its guaranteed rate):
[edit class-of-service] traffic-control-profile { tcp-for-ge-port { guaranteed-rate 301m; shaping-rate-priority-high 100m; shaping-rate-priority-medium 100m; shaping-rate-priority-low 100m; } }
You verify configuration of per-priority shaping with the show class-of-service traffic-control-profile
command. This
example shows shaping rates established for the high and medium priorities
for a traffic control profile named tcp-ge-port
.
user@host# show class-of-service traffic-control-profile Traffic control profile: tcp-ae, Index: 22093 Shaping rate: 3000000000 Scheduler map: <default> Traffic control profile: tcp-ge-port, Index: 22093 Shaping rate priority high: 1000000000 Shaping rate priority medium: 9000000000 Scheduler map: <default>
There are no restrictions on or interactions between per-priority shaping rates and the excess rate. An excess rate (a weight) is specified as a percentage or proportion of excess bandwidth.
Table 1 shows where traffic control profiles containing per-priority shaping rates can be attached for both per-unit schedulers and hierarchical schedulers.
Type of Traffic Control Profile |
Per-unit Allowed? |
Hierarchical Allowed? |
---|---|---|
Port level |
Yes |
Yes |
Port level |
No |
Yes |
Port level |
No |
Yes |
Port level |
No |
No |
Port level |
No |
No |
Interface set |
No |
Yes |
Interface set |
No |
No |
Interface set |
No |
No |
Interface set |
No |
No |
Logical interface level |
No |
No |
Logical interface level |
No |
No |