To specify or modify the bandwidth allocated for a class belonging to a policy map, or to enable ATM overhead accounting,
use the
bandwidth command in QoS policy-map class configuration mode. To remove the bandwidth specified for a class or disable ATM overhead accounting, use
the
no form of this command.
bandwidth {kbps | [remaining] percent percentage} [account {qinq | dot1q} aal5 subscriber-encapsulation]
no bandwidth
Cisco 10000 Series Router (PRE3)
bandwidth {kbps | [remaining] percent percentage} account {qinq | dot1q} {aal5 | aal3} subscriber-encapsulationuser-defined offset [atm]
no bandwidth
Syntax Description
kbps
|
Amount of bandwidth, in kilobits per second (kbps), to be assigned to the class. The amount of bandwidth varies according
to the interface and platform in use. The value must be between 1 and 2,000,000 kbps.
|
remaining
|
(Optional) Specifies that the percentage of guaranteed bandwidth is based on a relative percent of available bandwidth.
|
percent
percentage
|
Specifies the percentage of guaranteed bandwidth based on an absolute percent of available bandwidth to be set aside for
the priority class or on a relative percent of available bandwidth. The valid range is 1 to 100.
|
account
|
(Optional) Enables ATM overhead accounting.
|
qinq
|
(Optional) Specifies queue-in-queue encapsulation as the broadband aggregation system (BRAS) to digital subscriber line access multiplexer
(DSLAM) encapsulation type for ATM overhead accounting.
|
dot1q
|
(Optional) Specifies IEEE 802.1Q VLAN encapsulation as the BRAS-DSLAM encapsulation type for ATM overhead accounting.
|
aal5
|
(Optional) Specifies ATM Adaptation Layer 5 and the encapsulation type at the subscriber line for ATM overhead accounting. AAL5 supports
connection-oriented variable bit rate (VBR) services. See the “Usage Guidelines” section for valid encapsulation types.
|
subscriber-encapsulation
|
The subscriber line encapsulation type. See the
“Usage Guidelines” section for valid encapsulation types.
|
aal3
|
Specifies the ATM Adaptation Layer 5 that supports both connectionless and connection-oriented links. You must specify either
aal3 or
aal5 .
|
user-defined
offset
|
Specifies the offset size that the router uses when calculating ATM overhead.
Valid values are from –127 to127 bytes; 0 is not a valid value.
Note
|
The router configures the offset size if you do not specify the
user-defined
offset option.
|
|
atm
|
Applies ATM cell tax in the ATM overhead calculation.
Note
|
Configuring both the
offset and
atm options adjusts the packet size to the offset size and then adds ATM cell tax.
|
|
Command Default
No bandwidth is specified.
ATM overhead accounting is disabled.
Command Modes
QoS p olicy-map class configuration (config-pmap-c)
Command History
Release
|
Modification
|
12.0(5)T
|
This command was introduced.
|
12.0(5)XE
|
This command was integrated into Cisco IOS Release 12.0(5)XE and implemented on Versatile Interface Processor (VIP)-enabled
Cisco 7500 series routers.
|
12.0(7)T
|
This command was modified. The
percent keyword was added.
|
12.0(17)SL
|
This command was integrated into Cisco IOS Release 12.0(17)SL and implemented on Cisco 10000 series routers.
|
12.0(22)S
|
This command was modified. Support for the
percent keyword was added on Cisco 10000 series routers.
|
12.0(23)SX
|
This command was modified. Support for theremaining percent keyword was added on Cisco 10000 series routers.
|
12.1(5)T
|
This command was integrated into Cisco IOS Release 12.1(5)T and implemented on VIP-enabled Cisco 7500 series routers.
|
12.2(2)T
|
This command was modified. The
remaining percent keyword was added.
|
12.2(28)SB
|
This command was integrated into Cisco IOS Release 12.2(28)SB.
|
12.2(31)SB
|
This command was integrated into Cisco IOS Release 12.2(31)SB and implemented on Cisco 10000 series routers.
|
12.2(31)SB2
|
This command was integrated into Cisco IOS Release 12.0(17)SL and implemented on the PRE3 for the Cisco 10000 series router,
and was enhanced for ATM overhead accounting on the Cisco 10000 series router for the PRE3.
|
12.2(33)SRA
|
This command was integrated into Cisco IOS Release 12.2(33)SRA.
|
12.2SX
|
This command is supported in the Cisco IOS Release 12.2SX train. Support in a specific 12.2SX release of this train depends
on your feature set, platform, and platform hardware.
|
12.2(31)SB6
|
This command was modified to specify an offset size when calculating ATM overhead and implemented on the Cisco 10000 series
router for the PRE3.
|
12.2(33)SRC
|
This command was integrated into Cisco IOS Release 12.2(33)SRC and implemented on Cisco 7600 series routers.
|
12.2(33)SB
|
This command was integrated into Cisco IOS Release 12.2(33)SB and implemented on Cisco 7300 series routers.
|
12.4(20)T
|
This command was modified. Support was added for hierarchical queueing framework (HQF) using the modular quality of service (QoS)CLI (MQC).
|
15.1(1)T
|
This command was modified. The allowed values for the
kbps argument were changed. The value must be from 8 to 2000000.
|
15.2(1)T
|
This command was modified. The allowed values for the offset argument and kbps arguments were changed.
|
Configuring a Policy Map
Use the
bandwidth command when you configure a policy map for a class defined by the
class-map command. The
bandwidth command specifies the bandwidth for traffic in that class. Class-based weighted fair queueing (CBWFQ) derives the weight
for packets belonging to the class from the bandwidth allocated to the class. CBWFQ then uses the weight to ensure that the
queue for the class is serviced fairly.
Configuring Strict Priority with Bandwidth
You can configure only one class with strict priority. Other classes cannot have priority or bandwidth configuration. To
configure minimum bandwidth for another class, use thebandwidthremainingpercent command.
Specifying Bandwidth as a Percentage for All Supported Platforms Except the Cisco 10000 Series Routers
Besides specifying the amount of bandwidth in kilobits per second (kbps), you can specify bandwidth as a percentage of either
the available bandwidth or the total bandwidth. During periods of congestion, the classes are serviced in proportion to their
configured bandwidth percentages. The bandwidth percentage is based on the interface bandwidth. Available bandwidth is equal
to the interface bandwidth minus the sum of all bandwidths reserved by the Resource Reservation Protocol (RSVP) feature, the
IP RTP Priority feature, and the low latency queueing (LLQ) feature.
Note
|
It is important to remember that when the
bandwidth
remaining
percent command is configured, hard bandwidth guarantees may not be provided and only relative bandwidths are assured. That is, class
bandwidths are always proportional to the specified percentages of the interface bandwidth. When the link bandwidth is fixed,
class bandwidth guarantees are in proportion to the configured percentages. If the link bandwidth is unknown or variable,
the router cannot compute class bandwidth guarantees in kbps.
|
Specifying Bandwidth as a Percentage for the Cisco 10000 Series Routers
Besides specifying the amount of bandwidth in kilobits per second (kbps), you can specify bandwidth as a percentage of either
the available bandwidth or the total bandwidth. During periods of congestion, the classes are serviced in proportion to their
configured bandwidth percentages. The minimum bandwidth percentage is based on the nearest parent shape rate.
Note
|
It is important to remember that when the
bandwidth
remaining
percent command is configured, hard bandwidth guarantees may not be provided and only relative bandwidths are assured. That is, class
bandwidths are always proportional to the specified percentages of the interface bandwidth. When the link bandwidth is fixed,
class bandwidth guarantees are in proportion to the configured percentages. If the link bandwidth is unknown or variable,
the router cannot compute class bandwidth guarantees in kbps.
|
The router converts the specified bandwidth to the nearest multiple of 1/255 (ESR-PRE1) or 1/65535 (ESR-PRE2) of the interface
speed. Use the
show
policy-map
interface command to display the actual bandwidth.
Restrictions for All Supported Platforms
The following restrictions apply to the
bandwidth command:
-
The amount of bandwidth configured should be large enough to also accommodate Layer 2 overhead.
-
A policy map can have all the class bandwidths specified in either kbps or percentage, but not both, in the same class. However,
the unit for the
priority command in the priority class can be different from the bandwidth unit of the nonpriority class.
-
When the
bandwidth
percent command is configured, and a policy map containing class policy configurations is attached to the interface to stipulate
the service policy for that interface, available bandwidth is assessed. If a policy map cannot be attached to a particular
interface because of insufficient interface bandwidth, the policy is removed from all interfaces to which it was successfully
attached. This restriction does not apply to the
bandwidth
remaining
percent command.
Note
|
With CSCsy73939, if the
bandwidth
percent command results in a bandwidth value that is lower than the valid range then the policy map specifying this value cannot
be attached to an interface, and the router displays the following error message: "service-policy output parent Configured
Percent results in out of range kbps. Allowed range is
min-value–max-value . The present CIR value is
n ."
|
For more information on bandwidth allocation, see the “Congestion Management Overview” module in the
Cisco IOS Quality of Service Solutions Configuration Guide.
Note that when the policy map containing class policy configurations is attached to the interface to stipulate the service
policy for that interface, available bandwidth is assessed. If a policy map cannot be attached to a particular interface because
of insufficient interface bandwidth, then the policy is removed from all interfaces to which it was successfully attached.
Modular QoS CLI Queue Limits
The
bandwidth command can be used with MQC to specify the bandwidth for a particular class. When used with MQC, the
bandwidth command uses a default queue limit for the class. This queue limit can be modified using the
queue-limit command, thereby overriding the default set by the
bandwidth command.
Note
|
To meet the minimum bandwidth guarantees required by interfaces, modify the default queue limit of high-speed interfaces
by using the
queue-limit command.
|
Cisco 10000 Series Router
The Cisco 10000 series routers supports the
bandwidth command on outbound interfaces only. They do not support this command on inbound interfaces.
On the PRE2, you specify a bandwidth value and a unit for the bandwidth value. Valid values for the bandwidth are from 1
to 2488320000. The units are bps, kbps, mbps, and gbps. The default unit is kbps. For example, the following commands configure
a bandwidth of 10000 bps and 10000 kbps on the PRE2:
bandwidth 10000 bps
bandwidth 10000
On the PRE3, youspecify only a bandwidth value. Because the unit is always kbps, the PRE3 does not support the unit argument.
Valid values are from 1 to 2000000. For example, the following command configures a bandwidth of 128,000 kbps on the PRE3:
bandwidth 128000
The PRE3 accepts the PRE2
bandwidth command only if the command is used without the unit argument. The PRE3 rejects the PRE2
bandwidth command if the specified bandwidth is outside the valid PRE3 bandwidth value range (1 to 2000000).
Besides specifying the amount of bandwidth in kilobits per second (kbps), you can specify bandwidth as a percentage of either
the available bandwidth or the total bandwidth. During periods of congestion, the classes are serviced in proportion to their
configured bandwidth percentages. The bandwidth percentage is based on the interface bandwidth. However, in a hierarchical
policy the minimum bandwidth percentage is based on the nearest parent shape rate.
Note
|
When the
bandwidth
remaining
percent command is configured, hard bandwidth guarantees may not be provided and only relative bandwidths are assured. Class bandwidths
are always proportional to the specified percentages of the interface bandwidth. When the link bandwidth is fixed, class bandwidth
guarantees are in proportion to the configured percentages. If the link bandwidth is unknown or variable, the router cannot
compute class bandwidth guarantees in kbps.
|
The router converts the specified bandwidth to the nearest multiple of 1/255 (PRE1) or 1/65535 (PRE2, PRE3) of the interface
speed. Use the
show
policy-map
interface command to display the actual bandwidth.
Overhead Accounting for ATM (Cisco 10000 Series Router)
When configuring ATM overhead accounting, you must specify the BRAS-DSLAM, DSLAM-CPE, and subscriber line encapsulation types.
The router supports the following subscriber line encapsulation types:
-
mux-1483routed
-
mux-dot1q-rbe
-
snap-pppoa
-
mux-rbe
-
snap-1483routed
-
snap-dot1q-rbe
-
mux-pppoa
-
snap-rbe
The router calculates the offset size unless you specify the
user-defined
offset option.
For hierarchical policies, configure ATM overhead accounting in the following ways:
-
Enabled on parent--If you enable ATM overhead accounting on a parent policy, you are not required to enable accounting on
the child policy.
-
Enabled on child and parent--If you enable ATM overhead accounting on a child policy, then you must enable ATM overhead accounting
on the parent policy.
The encapsulation types must match for the child and parent policies.
The user-defined offset values must match for the child and parent policies.
Examples
In the following example, the policy map named VLAN guarantees 30 percent of the bandwidth to the class named Customer1 and
60 percent of the bandwidth to the class named Customer2. If you apply the VLAN policy map to a 1-Mbps link, 300 kbps (30
percent of 1 Mbps) is guaranteed to class Customer1 and 600 kbps (60 percent of 1 Mbps) is guaranteed to class Customer2,
with 100 kbps remaining for the class-default class. If the class-default class does not need additional bandwidth, the unused
100 kbps is available for use by class Customer1 and class Customer2. If both classes need the bandwidth, they share it in
proportion to the configured rates. In this example, the sharing ratio is 30:60 or 1:2:
router(config)# policy-map VLAN
router(config-pmap)# class Customer1
router(config-pmap-c)# bandwidth percent 30
router(config-pmap-c)# exit
router(config-pmap)# class Customer2
router(config-pmap-c)# bandwidth percent 60
Examples
The following example shows how to create a policy map with two classes, shows how bandwidth is guaranteed when only CBWFQ
is configured, and shows how to attach the policy to serial interface 3/2/1:
Router(config)# policy-map policy1
Router(config-pmap)# class class1
Router(config-pmap-c)# bandwidth percent 50
Router(config-pmap-c)# exit
Router(config-pmap)# class class2
Router(config-pmap-c)# bandwidth percent 25
Router(config-pmap-c)# exit
Router(config-pmap)# exit
Router(config)# interface serial3/2/1
Router(config-if)# service output policy1
Router(config-if)# end
The following output from the
show policy-map command shows the configuration for the policy map named policy1:
Router# show policy-map policy1
Policy Map policy1
Class class1
Weighted Fair Queuing
Bandwidth 50 (%) Max Threshold 64 (packets)
Class class2
Weighted Fair Queuing
Bandwidth 25 (%) Max Threshold 64 (packets)
The output from the
show policy-map interface command shows that 50 percent of the interface bandwidth is guaranteed for the class named class1, and 25 percent is guaranteed
for the class named class2. The output displays the amount of bandwidth as both a percentage and a number of kbps.
Router# show policy-map interface serial3/2
Serial3/2
Service-policy output:policy1
Class-map:class1 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match:none
Weighted Fair Queuing
Output Queue:Conversation 265
Bandwidth 50 (%)
Bandwidth 772 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 0/0
(depth/total drops/no-buffer drops) 0/0/0
Class-map:class2 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match:none
Weighted Fair Queuing
Output Queue:Conversation 266
Bandwidth 25 (%)
Bandwidth 386 (kbps) Max Threshold 64 (packets)
(pkts matched/bytes matched) 0/0
(depth/total drops/no-buffer drops) 0/0/0
Class-map:class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match:any
In this example, serial interface 3/2 has a total bandwidth of 1544 kbps. During periods of congestion, 50 percent (or 772
kbps) of the bandwidth is guaranteed to the class named class1, and 25 percent (or 386 kbps) of the link bandwidth is guaranteed
to the class named class2.
Examples
In the following example, the interface has a total bandwidth of 1544 kbps. During periods of congestion, 50 percent (or
772 kbps) of the bandwidth is guaranteed to the class named class1, and 25 percent (or 386 kbps) of the link bandwidth is
guaranteed to the class named class2.
The following sample output from the
show policy-map command shows the configuration of a policy map named p1:
Router# show policy-map p1
Policy Map p1
Class voice
Weighted Fair Queuing
Strict Priority
Bandwidth 500 (kbps) Burst 12500 (Bytes)
Class class1
Weighted Fair Queuing
Bandwidth remaining 50 (%) Max Threshold 64 (packets)
Class class2
Weighted Fair Queuing
Bandwidth remaining 25 (%) Max Threshold 64 (packets)
The following output from the
show policy-map interface command on serial interface 3/2 shows that 500 kbps of bandwidth is guaranteed for the class named voice1. The classes named
class1 and class2 receive 50 percent and 25 percent of the remaining bandwidth, respectively. Any unallocated bandwidth is
divided proportionally among class1, class2, and any best-effort traffic classes.
Note
|
In this sample output (unlike many of the others earlier in this section) the bandwidth is displayed only as a percentage
for class 1 and class 2. Bandwidth expressed as a number of kbps is not displayed because the
percent keyword was used with the
bandwidth remaining command. The
bandwidth remaining percent command allows you to allocate bandwidth as a relative percentage of the total bandwidth available on the interface.
|
Router# show policy-map interface serial3/2
Serial3/2
Service-policy output:p1
Class-map:voice (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match:ip precedence 5
Weighted Fair Queuing
Strict Priority
Output Queue:Conversation 264
Bandwidth 500 (kbps) Burst 12500 (Bytes)
(pkts matched/bytes matched) 0/0
(total drops/bytes drops) 0/0
Class-map:class1 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match:none
Weighted Fair Queuing
Output Queue:Conversation 265
Bandwidth remaining 50 (%) Max Threshold 64 (packets)
(pkts matched/bytes matched) 0/0
(depth/total drops/no-buffer drops) 0/0/0
Class-map:class2 (match-all)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match:none
Weighted Fair Queuing
Output Queue:Conversation 266
Bandwidth remaining 25 (%) Max Threshold 64 (packets)
(pkts matched/bytes matched) 0/0
(depth/total drops/no-buffer drops) 0/0/0
Class-map:class-default (match-any)
0 packets, 0 bytes
5 minute offered rate 0 bps, drop rate 0 bps
Match:any
Examples
When a parent policy has ATM overhead accounting enabled, you are not required to enable ATM overhead accounting on a child
traffic class that does not contain the
bandwidth or
shape command. In the following configuration example, ATM overhead accounting is enabled for bandwidth on the gaming and class-default
class of the child policy map named subscriber_classes and on the class-default class of the parent policy map named subscriber_line.
The voip and video classes do not have ATM overhead accounting explicitly enabled; these priority queues have overhead accounting
implicitly enabled because ATM overhead accounting is enabled on the parent policy. Notice that the features in the parent
and child policies use the same encapsulation type.
Router(config)# policy-map subscriber_classes
Router(config-pmap)# class voip
Router(config-pmap-c)# priority level 1
Router(config-pmap-c)# police 8000
Router(config-pmap-c)# exit
Router(config-pmap)# class video
Router(config-pmap-c)# priority level 2
Router(config-pmap-c)# police 20
Router(config-pmap-c)# exit
Router(config-pmap)# class gaming
Router(config-pmap-c)# bandwidth remaining percent 80 account aal5 snap-rbe-dot1q
Router(config-pmap-c)# exit
Router(config-pmap)# class class-default
Router(config-pmap-c)# bandwidth remaining percent 20 account aal5 snap-rbe-dot1q
Router(config-pmap-c)# policy-map subscriber_line
Router(config-pmap-c)# exit
Router(config-pmap)# class class-default
Router(config-pmap-c)# bandwidth remaining ratio 10 account aal5 snap-rbe-dot1q
Router(config-pmap-c)# shape average 512 account aal5 snap-rbe-dot1q
Router(config-pmap-c)# service policy subscriber_classes
In the following example, the router uses 20 overhead bytes and ATM cell tax in calculating ATM overhead. The child and parent
policies contain the required matching offset values. The parent policy is attached to virtual template 1.
Router(config)# policy-map child
Router(config-pmap)# class class1
Router(config-pmap-c)# bandwidth 500 account user-defined 20 atm
Router(config-pmap-c)# exit
Router(config-pmap)# class class2
Router(config-pmap-c)# shape average 30000 account user-defined 20 atm
Router(config-pmap)# exit
Router(config)# exit
Router(config)#