ON THIS PAGE
Example: Configuring Excess Rate for PTX Series Packet Transport Routers
You can configure excess rate to customize the distribution of available excess bandwidth among the queues for PTX Series Packet Transport Routers. When excess rate is not configured, the excess bandwidth available is distributed in proportion to the transmit rates allocated to the queues.
Requirements
This example uses the following hardware and software components:
One PTX Series Packet Transport Router
Junos OS Release 12.1X48R2 or later
Overview
This set of examples illustrates how you configure schedulers for the PTX Series Packet Transport Router to distribute the remaining bandwidth (excess rate) among the configured queues.
When you configure excess rate, use the following guidelines:
The
transmit-rate
statements of the configured schedulers can add up to at most 100 percent.All queues on the PTX Series Packet Transport Router have the same excess priority. Excess priority configuration is not supported.
If a strict-high-priority queue is configured and is rate-limited, this queue gets the rate-limited bandwidth first. Then the configured
transmit-rate
value of other queues is met (regardless of queue priority), and finally the excess bandwidth is distributed in proportion to the configuredexcess-rate
values.Best Practice:We recommend that you configure rate limit on strict-high queues because the other queues might not meet their guaranteed bandwidths. See transmit-rate.
Configuration
To configure excess rate, perform one or more of these tasks:
- Configuring Schedulers Without Specifying Excess Rate
- Configuring Schedulers by Specifying Excess Rate
- Configuring Schedulers to Control Excess Rate for Non-High-Priority Queues
Configuring Schedulers Without Specifying Excess Rate
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
and then copy and paste the commands into the CLI at the [edit]
hierarchy level.
set class-of-service schedulers sched_queue_0 transmit-rate percent 20 set class-of-service schedulers sched_queue_1 transmit-rate percent 40 set class-of-service schedulers sched_queue_2 transmit-rate percent 10 set class-of-service schedulers sched_queue_3 transmit-rate percent 10
Step-by-Step Procedure
In this example, four queues are configured and each associated scheduler is assigned the indicated transmit rate. Across the four queues, the transmit rate totals to 80 percent. No excess rate is configured. Assuming that each queue has loads greater than or equal to the configured transmit rate, the remaining 20 percent of the bandwidth is distributed in proportion to the configured transmit rates (20:40:10:10):
sched_queue_0—5% (20% of the guaranteed rate plus 5% of the remaining bandwidth is 25%)
sched_queue_1—10% (40% of the guaranteed rate plus 10% of the remaining bandwidth is 50%)
sched_queue_2—2.5% (10% of the guaranteed rate plus 2.5% of the remaining bandwidth is 12.5%)
sched_queue_3—2.5% (10% of the guaranteed rate plus 2.5% of the remaining bandwidth is 12.5%)
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure the schedulers:
Create the scheduler for queue 0:
[edit class-of-service] user@host# set schedulers sched_queue_0 transmit-rate percent 20
Create the scheduler for queue 1:
[edit class-of-service] user@host# set schedulers sched_queue_1 transmit-rate percent 40
Create the scheduler for queue 2:
[edit class-of-service] user@host# set schedulers sched_queue_2 transmit-rate percent 10
Create the scheduler for queue 3:
[edit class-of-service] user@host# set schedulers sched_queue_3 transmit-rate percent 10
Results
From configuration mode, confirm your configuration
by entering the show class-of-service schedulers
command.
If the output does not display the intended configuration, repeat
the configuration instructions in this example to correct it.
sched_queue_0 { transmit-rate percent 20; } sched_queue_1 { transmit-rate percent 40; } sched_queue_2 { transmit-rate percent 10; } sched_queue_3 { transmit-rate percent 10; }
If you are done configuring the device, enter commit
from configuration mode.
Configuring Schedulers by Specifying Excess Rate
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
and then copy and paste the commands into the CLI at the [edit]
hierarchy level.
set class-of-service schedulers sched_queue_0 transmit-rate percent 25 set class-of-service schedulers sched_queue_0 excess-rate percent 25 set class-of-service schedulers sched_queue_1 transmit-rate percent 25 set class-of-service schedulers sched_queue_1 excess-rate percent 50 set class-of-service schedulers sched_queue_2 transmit-rate percent 25 set class-of-service schedulers sched_queue_3 transmit-rate percent 25
Step-by-Step Procedure
In this example, four schedulers are configured and each is assigned a transmit rate of 25 percent. Queue 0 is configured with 25 percent and queue 1 with 50 percent of the excess rate. If the offered load through queue 2 is only 10 percent, the remaining bandwidth is distributed as: queue excess rate / total excess rate * remaining bandwidth percentage. If a queue has transmit rate configured but not excess rate, the excess rate for that queue is 1. In this example, the excess rate ratio is 25:50:1:1, which yields the following distribution of the 15 percent remaining bandwidth from queue 2:
sched_queue_0—4.93% (25 / 76 * 15%)
sched_queue_1—9.87% (50 / 76 * 15%)
sched_queue_3—0.197% (1 / 76 * 15%)
When the offered load on queue 2 increases to 25 percent or greater, the other queues get only their configured transmit rates.
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure the schedulers:
Create the scheduler for queue 0:
[edit class-of-service] user@host# set schedulers sched_queue_0 transmit-rate percent 25 user@host# set schedulers sched_queue_0 excess-rate percent 25
Create the scheduler for queue 1:
[edit class-of-service] user@host# set schedulers sched_queue_1 transmit-rate percent 25 user@host# set schedulers sched_queue_1 excess-rate percent 50
Create the scheduler for queue 2:
[edit class-of-service] user@host# set schedulers sched_queue_2 transmit-rate percent 25
Create the scheduler for queue 3:
[edit class-of-service] user@host# set schedulers sched_queue_3 transmit-rate percent 25
Results
From configuration mode, confirm your configuration
by entering the show class-of-service schedulers
command.
If the output does not display the intended configuration, repeat
the configuration instructions in this example to correct it.
sched_queue_0 { transmit-rate percent 25; excess-rate percent 25; } sched_queue_1 { transmit-rate percent 25; excess-rate percent 50; } sched_queue_2 { transmit-rate percent 25; } sched_queue_3 { transmit-rate percent 25; }
If you are done configuring the device, enter commit
from configuration mode.
Configuring Schedulers to Control Excess Rate for Non-High-Priority Queues
CLI Quick Configuration
To quickly configure this example, copy the
following commands, paste them into a text file, remove any line breaks,
change any details necessary to match your network configuration,
and then copy and paste the commands into the CLI at the [edit]
hierarchy level.
set class-of-service schedulers sched_queue_0 transmit-rate percent 90 set class-of-service schedulers sched_queue_0 priority high set class-of-service schedulers sched_queue_1 transmit-rate percent 10 set class-of-service schedulers sched_queue_1 priority low set class-of-service schedulers sched_queue_2 excess-rate percent 10 set class-of-service schedulers sched_queue_3 excess-rate percent 30
Step-by-Step Procedure
In this example, the scheduler for queue 0 is configured to transmit up to 90 percent of traffic if there is enough offered load. When the traffic to queue 0 is less than 90 percent, excess rate is configured to distribute the remaining bandwidth in the ratio 1:1:10:30 (when the offered load on queue 1 is greater than 10 percent), which yields the following distribution of the remaining bandwidth from queue 0:
sched_queue_1—0.0244 * x% (1 / 41 * remaining bandwidth (x)%)
sched_queue_2—0.244 * x% (10 / 41 * remaining bandwidth (x)%)
sched_queue_3—0.732 * x% (30 / 41 * remaining bandwidth (x)%)
Although the transmit-rate
values on queues
can add up to at most 100 percent, the excess-rate
value
does not have this restriction because it is a ratio.
The following example requires you to navigate various levels in the configuration hierarchy. For instructions on how to do that, see Using the CLI Editor in Configuration Mode in the Junos OS CLI User Guide.
To configure the schedulers:
Create the scheduler for queue 0:
[edit class-of-service] user@host# set schedulers sched_queue_0 transmit-rate percent 90 user@host# set schedulers sched_queue_0 priority high
Create the scheduler for queue 1:
[edit class-of-service] user@host# set schedulers sched_queue_1 transmit-rate percent 10 user@host# set schedulers sched_queue_1 priority low
Create the scheduler for queue 2:
[edit class-of-service] user@host# set schedulers sched_queue_2 excess-rate percent 10
Create the scheduler for queue 3:
[edit class-of-service] user@host# set schedulers sched_queue_3 excess-rate percent 30
Results
From configuration mode, confirm your configuration
by entering the show class-of-service schedulers
command.
If the output does not display the intended configuration, repeat
the configuration instructions in this example to correct it.
sched_queue_0 { transmit-rate percent 90; priority high; } sched_queue_1 { transmit-rate percent 10; priority low; } sched_queue_2 { excess-rate percent 10; } sched_queue_3 { excess-rate percent 30; }
If you are done configuring the device, enter commit
from configuration mode.
Verification
Verifying the Excess Rate Configuration
Purpose
Verify that the excess rate configuration is producing the results you expect.
Action
From operational mode, enter the show interfaces
queue interface
command for the physical
interface to verify.
Meaning
The show command output lists the traffic by queue and forwarding class names. Verify that the Bytes field for active queues on the specified physical interface match the proportions you expect from the excess rate configuration.