Prerequisites for Distribution of Remaining Bandwidth Using Ratio
Before enabling the Distribution of Remaining Bandwidth Using Ratio feature, create as many traffic classes as you need by using the class-map command.
The documentation set for this product strives to use bias-free language. For the purposes of this documentation set, bias-free is defined as language that does not imply discrimination based on age, disability, gender, racial identity, ethnic identity, sexual orientation, socioeconomic status, and intersectionality. Exceptions may be present in the documentation due to language that is hardcoded in the user interfaces of the product software, language used based on RFP documentation, or language that is used by a referenced third-party product. Learn more about how Cisco is using Inclusive Language.
The Distribution of Remaining Bandwidth Using Ratio feature allows service providers to configure a bandwidth-remaining ratio on subinterfaces and class queues. This ratio specifies the relative weight of a subinterface or queue with respect to other subinterfaces or queues. During congestion, the router uses this bandwidth-remaining ratio to determine the amount of excess bandwidth (unused by priority traffic) to allocate to a class of nonpriority traffic. The router allocates excess bandwidth relative to the other subinterface-level queues and class queues configured on the physical interface. By administration of a bandwidth-remaining ratio, traffic priority is not based solely on speed. Instead, the service provider can base priority on alternative factors such as service product and subscription rate.
Before enabling the Distribution of Remaining Bandwidth Using Ratio feature, create as many traffic classes as you need by using the class-map command.
Bandwidth-remaining ratios can be used on outbound interfaces only.
The bandwidth remaining ratio command cannot coexist with another bandwidth command in different traffic classes of the same policy map. For example, the following configuration is not valid and causes an error message to display:
policy-map Prec1
class precedence_0
bandwidth remaining ratio 10
class precedence_2
bandwidth 1000
The bandwidth remaining ratio command cannot coexist with another bandwidth command in the same class. For example, the following configuration is not valid and causes an error message to display:
policy-map Prec1
class precedence_0
bandwidth 1000
bandwidth remaining ratio 10
The bandwidth remaining ratio command cannot coexist with the priority command in the same class. For example, the following configuration is not valid and causes an error message to display:
policy-map Prec1
class precedence_1
priority percent 10
bandwidth remaining ratio 10
The Distribution of Remaining Bandwidth Using Ratio feature allows service providers to prioritize subscriber traffic during periods of congestion. A bandwidth-remaining ratio is used to influence how the router allocates excess bandwidth (unused by priority traffic) to a class of nonpriority traffic. Instead of using only bandwidth rate, the router considers configured minimum bandwidth rates, maximum bandwidth rates, and bandwidth-remaining ratios when determining excess bandwidth allocation. A bandwidth-remaining ratio adds more flexibility in prioritizing traffic and enables you to influence excess bandwidth allocation by basing the bandwidth-remaining ratio on factors other than speed.
With bandwidth-remaining ratios, service providers have more flexibility in assigning priority to subinterfaces and queues during congestion. In addition to speed, you can base the bandwidth-remaining ratio on alternative factors, such as a service product or subscription rate. In this way, for example, you can give higher weight to subinterfaces that carry business services and lower weight to subinterfaces that carry residential services.
A bandwidth-remaining ratio, specified by the bandwidth remaining ratio command, is a value from 1 to 1000 that is used to determine the amount of unused (excess) bandwidth to allocate to a class-level queue or subinterface-level queue during congestion. The router allocates the excess bandwidth relative to the other class-level queues and subinterface-level queues configured on the physical interface. The bandwidth-remaining ratio value does not indicate a percentage. As the name implies, a ratio is used. For example, a subinterface with a bandwidth-remaining ratio of 100 receives 10 times the unused (excess) bandwidth during congestion than a subinterface with a bandwidth-remaining ratio of 10.
Without bandwidth-remaining ratios, the queueing mechanism or scheduler on the router allocates unused (excess) bandwidth equally among the classes or subinterfaces.
With bandwidth-remaining ratios, unused (excess) bandwidth allocation can be based on factors other than the bandwidth rate (for example, the service product or the subscription rate).
Using the bandwidth remaining ratio command, the bandwidth-remaining ratio can be configured differently on each subinterface or class. The bandwidth-remaining ratio can range from 1 to 1000. For example, if there are three subscribers, and the bandwidth-remaining ratios are configured as 9, 7, and 1, and if after priority traffic is served, there are 1700 kbps of excess bandwidth, the subscribers get 900 kbps, 700 kbps, and 100 kbps, respectively.
Note |
The bandwidth remaining ratio can range from 1-1000 on per interface basis and the sum of all interface ratios cannot exceed 1000. |
You can apply bandwidth-remaining ratios to subinterfaces and/or classes queues.
Note |
You can apply bandwidth-remaining ratios to outbound subinterfaces only. |
Command or Action | Purpose | |||||
---|---|---|---|---|---|---|
Step 1 |
enable Example:
|
Enables privileged EXEC mode.
|
||||
Step 2 |
configure terminal Example:
|
Enters global configuration mode. |
||||
Step 3 |
policy-map child-policy-name Example:
|
Creates or modifies a child policy map and enters policy-map configuration mode.
|
||||
Step 4 |
class class-map-name Example:
|
Configures the class map and enters policy-map class configuration mode. |
||||
Step 5 |
bandwidth bandwidth-kbps Example:
|
Specifies the bandwidth, in kbps, to be allocated to this traffic class.
|
||||
Step 6 |
Repeat steps 4 and 5 to configure the additional traffic classes, if needed. |
|||||
Step 7 |
exit Example:
|
Exits policy-map class configuration mode. |
||||
Step 8 |
exit Example:
|
Exits policy-map configuration mode. |
||||
Step 9 |
policy-map parent-policy-name Example:
|
Creates or modifies a parent policy map and enters policy-map configuration mode.
|
||||
Step 10 |
class class-default Example:
|
Configures the class-default class and enters policy-map class configuration mode.
|
||||
Step 11 |
bandwidth remaining ratio ratio Example:
|
Specifies the bandwidth-remaining ratio for the subinterface.
The ratio is the value used to determine the amount of unused bandwidth to allocate to each queue on the subinterface during periods of congestion. The scheduler allocates the excess bandwidth relative to other subinterfaces. Valid values are 1 to 1000. The default value is 1. |
||||
Step 12 |
shape {average | peak } cir [bc ] [be ] Example:
|
(Optional) Shapes the average or peak rate to the rate that you specify. Enter either the average or peak keyword along with the CIR and any optional arguments. Note the following:
|
||||
Step 13 |
service-policy child-policy-name Example:
|
Applies the child policy map that you specify to the traffic class.
The router applies the QoS actions (features) specified in the child policy map to the traffic class.
|
||||
Step 14 |
exit Example:
|
Exits policy-map class configuration mode. |
||||
Step 15 |
exit Example:
|
Exits policy-map configuration mode. |
||||
Step 16 |
interface type slot / module / port . subinterface [point-to-point | multipoint ] Example:
|
Creates or modifies the interface that you specify and enters subinterface configuration mode. Enter the interface type. Note the following:
|
||||
Step 17 |
service-policy output parent-policy-name Example:
|
Applies the parent policy map to the subinterface.
|
||||
Step 18 |
end Example:
|
Returns to privileged EXEC mode. |
Command or Action | Purpose | |||
---|---|---|---|---|
Step 1 |
enable Example:
|
Enables privileged EXEC mode.
|
||
Step 2 |
configure terminal Example:
|
Enters global configuration mode. |
||
Step 3 |
policy-map child-policy-name Example:
|
Creates or modifies a child policy map and enters policy-map configuration mode.
|
||
Step 4 |
class class-map-name Example:
|
Configures the class map and enters policy-map class configuration mode. |
||
Step 5 |
shape {average | peak } cir [bc ] [be ] Example:
|
(Optional) Shapes the average or peak rate to the rate that you specify.
|
||
Step 6 |
bandwidth remaining ratio ratio Example:
|
Specifies the bandwidth-remaining ratio for the traffic class.
|
||
Step 7 |
Repeat steps 4, 5 and 6 for each class queue that you want to define, specifying the bandwidth-remaining ratio as applicable. |
|
||
Step 8 |
exit Example:
|
Exits policy-map class configuration mode. |
||
Step 9 |
exit Example:
|
Exits policy-map configuration mode. |
||
Step 10 |
policy-map parent-policy-name Example:
|
Creates or modifies a parent policy map and enters policy-map configuration mode.
|
||
Step 11 |
class class-default Example:
|
Configures the class-default class and enters policy-map class configuration mode.
|
||
Step 12 |
shape {average | peak } cir [bc ] [be ] Example:
|
(Optional) Shapes the average or peak rate to the rate that you specify.
|
||
Step 13 |
bandwidth remaining ratio ratio Example:
|
(Optional for class-default or other classes in a hierarchical policy map structure) Specifies the bandwidth-remaining ratio for the subinterface.
|
||
Step 14 |
service-policy child-policy-name Example:
|
Applies the child policy map that you specify to the traffic class.
|
||
Step 15 |
exit Example:
|
Exits policy-map class configuration mode. |
||
Step 16 |
exit Example:
|
Exits policy-map configuration mode. |
||
Step 17 |
interface type slot / module / port . subinterface [point-to-point | multipoint ] Example:
|
Creates or modifies the interface that you specify and enters subinterface configuration mode.
|
||
Step 18 |
service-policy output parent-policy-name Example:
|
Attaches the parent policy map to the subinterface.
|
||
Step 19 |
end Example:
|
Returns to privileged EXEC mode. |
The following example shows how to configure bandwidth-remaining ratios on an Ethernet subinterface using a hierarchical policy. In the example, Gigabit Ethernet subinterface 1/0/0.1 is shaped to 100 Mbps. During congestion, the router uses the bandwidth-remaining ratio of 10 to determine the amount of excess bandwidth (unused by priority traffic) to allocate to the nonpriority traffic on subinterface 1/0/0.1, relative to the other subinterface-level and class-level queues on the interface.
policy-map Child
class precedence_0
bandwidth 10000
class precedence_1
shape average 100000
bandwidth 100
policy-map Parent
class class-default
bandwidth remaining ratio 10
shape average 100000000
service-policy Child
interface GigabitEthernet1/0/0.1
encapsulation dot1Q 100
ip address 10.1.0.1 255.255.255.0
service-policy output Parent
In the following sample configuration, vlan10_policy is applied on the Gigabit Ethernet subinterface 1/0/0.10 and vlan20_policy is applied on the Gigabit Ethernet subinterface 1/0/0.20. During congestion on the interface, subinterface Gigabit Ethernet 1/0/0.20 has 10 times more available bandwidth than subinterface Gigabit Ethernet 1/0/0.10 because the bandwidth-remaining ratio for subinterface Gigabit Ethernet 1/0/0.20 is 10 times more than the bandwidth-remaining ratio for subinterface 1/0/0.10: 100 on subinterface 1/0/0.20 and 10 on subinterface 1/0/0.10.
When congestion occurs within a subinterface level, the class queues receive bandwidth according to the class-level bandwidth-remaining ratios. In the example, the bandwidth for classes precedence_0, precedence_1, and precedence_2 is allocated based on the bandwidth-remaining ratios of the classes: 20, 40, and 60, respectively.
Router# show policy-map
Policy Map child-policy
Class precedence_0
Average Rate Traffic Shaping
cir 500000 (bps)
bandwidth remaining ratio 20 <---- Class-level ratio
Class precedence_1
Average Rate Traffic Shaping
cir 500000 (bps)
bandwidth remaining ratio 40 <---- Class-level ratio
Class precedence_2
Average Rate Traffic Shaping
cir 500000 (bps)
bandwidth remaining ratio 60 <---- Class-level ratio
Policy Map vlan10_policy
Class class-default
Average Rate Traffic Shaping
cir 1000000 (bps)
bandwidth remaining ratio 10 <---- Subinterface-level ratio
service-policy child-policy
Policy Map vlan20_policy
Class class-default
Average Rate Traffic Shaping
cir 1000000 (bps)
bandwidth remaining ratio 100 <---- Subinterface-level ratio
service-policy child-policy
interface GigabitEthernet1/0/0.10
encapsulation dot1Q 10
snmp trap link-status
service-policy output vlan10_policy
interface GigabitEthernet1/0/0.20
encapsulation dot1Q 20
snmp trap link-status
service-policy output vlan20_policy
The following sample output from the show policy-map interface command indicates that bandwidth-remaining ratios are configured on class-level queues in the policy maps named vlan10_policy and child-policy, which are attached to Gigabit Ethernet subinterface 1/0/0.10.
Router# show policy-map interface GigabitEthernet 1/0/0.10
GigabitEthernet1/0/0.10
Service-policy output: vlan10_policy
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 1000000, bc 4000, be 4000
target shape rate 1000000
bandwidth remaining ratio 10
Service-policy : child-policy
Class-map: precedence_0 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip precedence 0
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 500000, bc 2000, be 2000
target shape rate 500000
bandwidth remaining ratio 20
Class-map: precedence_1 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip precedence 1
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 500000, bc 2000, be 2000
target shape rate 500000
bandwidth remaining ratio 40
Class-map: precedence_2 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip precedence 2
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 500000, bc 2000, be 2000
target shape rate 500000
bandwidth remaining ratio 60
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
The following sample output from the show policy-map interface command indicates that bandwidth-remaining ratios are configured on class-level queues in the policy maps named vlan20_policy and child-policy, which are attached to Gigabit Ethernet subinterface 1/0/0.20.
Router# show policy-map interface GigabitEthernet 1/0/0.20
GigabitEthernet1/0/0.20
Service-policy output: vlan20_policy
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 1000000, bc 4000, be 4000
target shape rate 1000000
bandwidth remaining ratio 100
Service-policy : child-policy
Class-map: precedence_0 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip precedence 0
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 500000, bc 2000, be 2000
target shape rate 500000
bandwidth remaining ratio 20
Class-map: precedence_1 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip precedence 1
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 500000, bc 2000, be 2000
target shape rate 500000
bandwidth remaining ratio 40
Class-map: precedence_2 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: ip precedence 2
Queueing
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
shape (average) cir 500000, bc 2000, be 2000
target shape rate 500000
bandwidth remaining ratio 60
Class-map: class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match: any
queue limit 64 packets
(queue depth/total drops/no-buffer drops) 0/0/0
(pkts output/bytes output) 0/0
The following sample output from the show policy-map command indicates that a bandwidth-remaining ratio of 10 is configured on the parent class-default class of the policy map named vlan10_policy.
Router# show policy-map vlan10_policy
Policy Map vlan10_policy
Class class-default
Average Rate Traffic Shaping
cir 1000000 (bps)
bandwidth remaining ratio 10
service-policy child-policy
The following sample output from the show policy-map command indicates that a bandwidth-remaining ratio of 100 is configured on the parent class-default class of the policy map named vlan20_policy.
Router# show policy-map vlan20_policy
Policy Map vlan20_policy
Class class-default
Average Rate Traffic Shaping
cir 1000000 (bps)
bandwidth remaining ratio 100
service-policy child-policy
The following sample output from the show policy-map command indicates that bandwidth-remaining ratios of 20, 40, and 60 are configured on the class queues precedence_0, precedence_1, and precedence_2, respectively.
Router# show policy-map child-policy
Policy Map child-policy
Class precedence_0
Average Rate Traffic Shaping
cir 500000 (bps)
bandwidth remaining ratio 20
Class precedence_1
Average Rate Traffic Shaping
cir 500000 (bps)
bandwidth remaining ratio 40
Class precedence_2
Average Rate Traffic Shaping
cir 500000 (bps)
bandwidth remaining ratio 60
Related Topic |
Document Title |
---|---|
QoS commands: complete command syntax, command modes, command history, defaults, usage guidelines, and examples |
Cisco IOS Quality of Service Solutions Command Reference |
Congestion avoidance |
"Congestion Avoidance Overview" module |
Class maps, policy maps, hierarchical policy maps, Modular Quality of Service Command-Line Interface (CLI) (MQC) |
"Applying QoS Features Using the MQC" module |
Traffic shaping, traffic policing |
"Policing and Shaping Overview" module |
Standard |
Title |
---|---|
No new or modified standards are supported by this feature, and support for existing standards has not been modified by this feature. |
-- |
MIB |
MIBs Link |
---|---|
No new or modified MIBs are supported by this feature, and support for existing MIBs has not been modified by this feature. |
To locate and download MIBs for selected platforms, Cisco IOS XE Software releases, and feature sets, use Cisco MIB Locator found at the following URL: |
RFC |
Title |
---|---|
No new or modified RFCs are supported by this feature, and support for existing RFCs has not been modified by this feature. |
-- |
Description |
Link |
---|---|
The Cisco Support and Documentation website provides online resources to download documentation, software, and tools. Use these resources to install and configure the software and to troubleshoot and resolve technical issues with Cisco products and technologies. Access to most tools on the Cisco Support and Documentation website requires a Cisco.com user ID and password. |
The following table provides release information about the feature or features described in this module. This table lists only the software release that introduced support for a given feature in a given software release train. Unless noted otherwise, subsequent releases of that software release train also support that feature.
Use Cisco Feature Navigator to find information about platform support and Cisco software image support. To access Cisco Feature Navigator, go to www.cisco.com/go/cfn. An account on Cisco.com is not required.