# Scheduler Profiles and Parameter Expressions for QoS Administrators

After you have created the parameter definition, you reference the parameter within a scheduler profile. You can choose to use parameter expressions in the scheduler profile.

## Referencing a Parameter Definition in a Scheduler Profile

You can reference a parameter in a scheduler profile as long as all parameters in the scheduler profile share at least one controlled-interface type. Otherwise, a QoS profile rule cannot reference the scheduler profile.

For example:

host1(config)#qos-parameter-define max-subscriber-bandwidth host1(config-qos-parameter-define)#controlled-interface-type vlan host1(config-qos-parameter-define)#exit host1(config)#scheduler-profile subscriber host1(config-scheduler-profile)#shared-shaping-rate max-subscriber-bandwidth auto

When a scheduler profile references a parameter, the system implicitly assigns controlled-interface types to the scheduler profile that are the same as the controlled-interface types of all referenced parameters. The system validates scheduler profile types using the QoS profile rules that refer to those scheduler profiles. For example, if the parameter definition max-sub-bw has the controlled-interface types atm-vc and ip, the scheduler profile cannot be referenced in QoS profile rules that have a type other than atm-vc or ip.

### Removing or Modifying a Scheduler Profile

You can modify a scheduler profile as long as the QoS profile rules that use the scheduler profile are of the same type. All nodes and queues controlled by the scheduler profile are adjusted to the new rate.

You can also remove a parameter reference from a scheduler profile. The system modifies the nodes and queues that are controlled by the scheduler profile with the new rate.

## Using Expressions for QoS Parameters

Expressions are combinations of parameter names, constants, and operators. You can specify some scheduler profile attributes using an expression, such as the shaping rate. All operations within expressions are performed using 64 bit unsigned math, resulting in a 32 bit, signed integer value.

Expressions consist of both operators and operand values. Operators are arithmetic functions, and operand values are the inputs for the mathematical function. Operand values can be a parameter name or an integer. You specify an expression consisting of an operand, followed by zero or more [ operator, operand ] pairs.

Simple parameter expressions are displayed in the following example. Simple parameter expressions usually contain a constant rate or a single parameter name.

host1(config-scheduler-profile)#shaping-rate 10000000 host1(config-scheduler-profile)#shared-shaping-rate max-sub-bw auto host1(config-scheduler-profile)#shaping-rate max-sub-be-bw host1(config-scheduler-profile)#assured-rate assured-bw

More complicated parameter expressions are displayed in the following example. Complicated parameter expressions contain combinations of constant rates, parameter names, and operators.

host1(config-scheduler-profile)#shaping-rate max-sub-bw % 90 host1(config-scheduler-profile)#shared-shaping-rate max-data-bw + max-voice-bw + max-video-bw auto host1(config-scheduler-profile)#assured-rate min-data-bw % oversubscription-rate + min-video-bw % oversubscription-rate host1(config-scheduler-profile)#shared-shaping-rate 400000 - multicast-adjustment burst 100 milliseconds auto

### Operators and Precedence

Table 26 lists the operators that QoS parameters support and the precedence of the operator within the expression.

Table 26: Operators for Parameter Expressions

Operator | Description | Precedence | Examples
--- | --- | --- | ---
% | Percent in the range 1–100 | 1 | max-subscriber-bw % 100 max-subscriber-bw % 10
* | Multiplication | 1 | 5 * maxBandwidth
/ | Division | 1 | maxBandwidth / 64000
+ | Addition | 2 | max-subscriber-bw + 50000 max-subscriber-bw + l2c-rate
- | Subtraction | 2 | max-subscriber-bw - 50000 max-subscriber-bw - l2c-rate
min | Minimum | 3 | max-subscriber-bw min 50000 max-subscriber-bw min l2c-rate
max | Maximum | 3 | max-subscriber-bw max 50000 max-subscriber-bw max l2c-rate

### Specifying a Range in Expressions

You can use the min and max operators to specify the allowable range of an expression result.

For example, to specify a shaping rate at a minimum of 1 Mbps and a maximum of 5 Mbps, use the following expression:

host1(config)#scheduler-profile subscriber-rate host1(config-scheduler-profile)#shaping-rate (( subscriber-rate max 1000000 ) min 5000000 )

#### Operations Using This Expression

1. Take the max of the subscriber-rate scheduler profile, or 1 Mbps, and name it x.
2. Take the min of x and 5 Mbps.

Example 1

The value of the subscriber-rate scheduler profile is less than 1 Mbps, specifically 500,000.

- The max of 500K and1 Mbps is 1 Mbps
- The min of 1Mbps and 5 Mbps is 1 Mbps

Result—Made the subscriber-rate a minimum of 1 Mbps.

Example 2

The value of the subscriber-rate scheduler profile is greater than 5 Mbps, specifically 6 Mbps.

- The max of 6 Mbps and 1 Mbps is 6 Mbps
- The min of 6 Mbps and 5 Mbps is 5 Mbps

Result—Made the subscriber-rate a maximum of 5 Mbps.

Example 3

The value of the subscriber-rate scheduler profile is within the range of 1–5 Mbps, specifically 3 Mbps.

- The max of 3 Mbps and 1 Mbps is 3 Mbps
- The min of 3 Mbps and 5 Mbps is 3 Mbps

Result—Maintained the subscriber-rate within the range of 1–5 Mbps.

#### Related Documentation

- Using Expressions for Bandwidth and Burst Values in a Scheduler Profile
- Configuring a Basic Parameter Definition for QoS Administrators