QoSPolicy-map Class Config

bandwidth [kbps|percent n]

The bandwidth command in policy-map class configuration mode allocates a minimum bandwidth guarantee (in kbps or as a percentage) to a specific traffic class during congestion, ensuring QoS for critical applications.

Syntax·Policy-map Class Config
bandwidth [kbps|percent n]

When to Use This Command

  • Guarantee 1 Mbps for VoIP traffic in a WAN link to prevent jitter and packet loss.
  • Allocate 50% of interface bandwidth to mission-critical database replication traffic.
  • Reserve 256 kbps for network management traffic (SNMP, syslog) to ensure reachability during congestion.
  • Shape video streaming traffic to 2 Mbps to prevent starvation of other classes.

Command Examples

Allocate bandwidth in kbps for VoIP class

bandwidth 1000
Router(config-pmap-c)# bandwidth 1000
Router(config-pmap-c)#

The command assigns a minimum of 1000 kbps (1 Mbps) to the traffic class. No output is shown if successful; the prompt returns without error.

Allocate bandwidth as a percentage of interface bandwidth

bandwidth percent 30
Router(config-pmap-c)# bandwidth percent 30
Router(config-pmap-c)#

This reserves 30% of the interface bandwidth for the class. The percentage is relative to the interface bandwidth configured with the 'bandwidth' interface command.

Understanding the Output

The bandwidth command does not produce direct output; it silently configures the policy. To verify, use 'show policy-map [policy-name]' or 'show policy-map interface [interface]'. In the output of 'show policy-map interface', look for the 'Bandwidth' field under each class. For example: 'Bandwidth 1000 (kbps)' indicates a guaranteed 1000 kbps. If the value is lower than expected, check the interface bandwidth or total allocated bandwidth (cannot exceed interface bandwidth). A common issue is oversubscription: if the sum of bandwidths exceeds 100% (or interface bandwidth), the router will reject the policy-map with an error during attachment. Also, note that the 'bandwidth' command is only effective during congestion; if the link is not congested, classes can exceed their allocated bandwidth.

CCNA Exam Tips

1.

CCNA exam tip: The 'bandwidth' command in policy-map class config is used for guaranteed bandwidth, not shaping or policing. Know the difference.

2.

CCNA exam tip: When using 'bandwidth percent', the percentage is based on the interface bandwidth (set with 'bandwidth' interface command), not the actual link speed.

3.

CCNA exam tip: You cannot mix 'bandwidth' and 'bandwidth percent' in the same policy-map; choose one method per class.

4.

CCNA exam tip: The sum of all 'bandwidth' allocations in a policy-map must not exceed the interface bandwidth; otherwise, the policy-map will be rejected.

Common Mistakes

Mistake: Using 'bandwidth' without first configuring a class-map and policy-map. Consequence: The command is ignored or applied to the default class.

Mistake: Allocating more total bandwidth than available on the interface. Consequence: The policy-map will fail to attach with an 'exceeded bandwidth' error.

Mistake: Confusing 'bandwidth' (guarantee) with 'shape average' (traffic shaping). Consequence: Misconfigured QoS leading to incorrect traffic treatment.

Related Commands

Practice for the CCNA 200-301

Test your knowledge with hundreds of CCNA practice questions covering all exam domains.

Practice CCNA Questions