QoSGlobal Config

policy-map [name]

Creates or modifies a QoS policy-map that defines a set of class-maps and associated actions (e.g., bandwidth, priority, drop) to apply to traffic on Cisco IOS routers.

Syntax·Global Config
policy-map [name]

When to Use This Command

  • Shaping outbound traffic on a WAN link to ensure voice traffic gets priority bandwidth while limiting bulk downloads.
  • Policing inbound traffic to drop or mark packets exceeding a specified rate, preventing congestion from affecting critical applications.
  • Applying a service policy to an interface to enforce bandwidth guarantees for VoIP and video conferencing traffic.
  • Marking DSCP values on traffic from a specific VLAN to preserve QoS markings across the network.

Command Examples

Basic policy-map with class and bandwidth guarantee

policy-map QOS_POLICY class VOICE priority 128 class VIDEO bandwidth 256 class class-default fair-queue
Router(config)# policy-map QOS_POLICY
Router(config-pmap)# class VOICE
Router(config-pmap-c)# priority 128
Router(config-pmap-c)# exit
Router(config-pmap)# class VIDEO
Router(config-pmap-c)# bandwidth 256
Router(config-pmap-c)# exit
Router(config-pmap)# class class-default
Router(config-pmap-c)# fair-queue
Router(config-pmap-c)# end

The policy-map named QOS_POLICY is created. Under class VOICE, the priority command allocates 128 kbps with strict priority. Under class VIDEO, bandwidth guarantees 256 kbps. The class-default uses fair-queue for remaining traffic.

Policy-map with policing and marking

policy-map POLICE_MARK class BULK police 1000000 20000 30000 conform-action set-dscp-transmit af11 exceed-action drop
Router(config)# policy-map POLICE_MARK
Router(config-pmap)# class BULK
Router(config-pmap-c)# police 1000000 20000 30000 conform-action set-dscp-transmit af11 exceed-action drop
Router(config-pmap-c)# end

The policy-map POLICE_MARK polices traffic in class BULK at 1 Mbps (1000000 bps) with normal burst 20000 bytes and excess burst 30000 bytes. Conforming traffic is marked with DSCP AF11 and transmitted; exceeding traffic is dropped.

Understanding the Output

The policy-map command itself does not produce output; it enters configuration mode. To view the policy-map, use 'show policy-map [name]' or 'show policy-map interface [interface]'. The 'show policy-map' output lists each class-map and its configured actions (priority, bandwidth, police, etc.). For example, under a class, you'll see 'Strict Priority' with bandwidth, or 'Bandwidth' with guaranteed rate, and 'Police' with rate and actions. Good values show correct bandwidth allocations matching design; bad values may show mismatched rates or missing classes. Watch for 'class-default' to ensure all traffic is handled. In 'show policy-map interface', you can see actual packet counts and byte counts for each class, which helps verify traffic classification and action effectiveness.

CCNA Exam Tips

1.

CCNA exam tip: Remember that 'priority' and 'bandwidth' cannot be used together in the same class; priority implies strict priority queuing.

2.

CCNA exam tip: The 'class-default' class is always present; you can modify it but cannot delete it.

3.

CCNA exam tip: Policy-maps are applied to interfaces using 'service-policy input/output' in interface configuration mode.

4.

CCNA exam tip: The 'police' command can use 'conform-action', 'exceed-action', and 'violate-action' to mark or drop packets.

Common Mistakes

Mistake 1: Forgetting to create the class-map before referencing it in the policy-map, causing an error.

Mistake 2: Using 'bandwidth' and 'priority' in the same class, which is invalid and will be rejected.

Mistake 3: Not applying the policy-map to an interface with 'service-policy', so the policy has no effect.

Related Commands

Practice for the CCNA 200-301

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

Practice CCNA Questions