priority [kbps|percent n]
Configures strict priority queuing for a class in a policy map, optionally specifying bandwidth in kbps or as a percentage of the interface bandwidth.
Definition: priority [kbps|percent n] is a Cisco IOS policy-map class config command. Configures strict priority queuing for a class in a policy map, optionally specifying bandwidth in kbps or as a percentage of the interface bandwidth.
Overview
The `priority` command in Cisco IOS is used within a policy-map class configuration to assign strict priority queuing to a specific traffic class. This command is essential for Quality of Service (QoS) designs where low-latency treatment is required for delay-sensitive applications such as Voice over IP (VoIP), video conferencing, or real-time interactive traffic. By configuring a priority queue, the router ensures that packets matching the class are dequeued before any other traffic, minimizing jitter and delay.
The command can specify bandwidth either in absolute kbps or as a percentage of the interface bandwidth, allowing flexible allocation. Strict priority queuing is a cornerstone of Cisco's Modular QoS CLI (MQC) framework, often used in conjunction with other queuing mechanisms like Class-Based Weighted Fair Queuing (CBWFQ) to provide a complete QoS policy. Network engineers reach for this command when they need to guarantee low latency for critical traffic while still allowing other traffic classes to share remaining bandwidth.
It is typically applied on WAN interfaces (e.g., serial, T1/E1) or on LAN interfaces where voice and data coexist. The command operates at the class level within a policy map, which is then attached to an interface in the service-policy direction (usually output). Important IOS behavior includes that the priority queue is policed: if traffic exceeds the configured bandwidth, packets are dropped (or can be optionally remarked and sent to a different queue if using `police` within the priority class).
The command requires the router to be in policy-map class configuration mode, which is entered via `policy-map` and then `class` commands. The running configuration is updated immediately, and the change takes effect when the service-policy is applied. Privilege level 15 (enable) is typically required for configuration.
Buffered output is not directly affected, but the priority queue itself is a hardware or software queue depending on the platform. Understanding this command is critical for CCNA and CCNP candidates as QoS is a major exam topic and a real-world necessity for converged networks.
priority [kbps|percent n]When to Use This Command
- Guarantee low latency for real-time traffic like VoIP by assigning strict priority to the voice class.
- Ensure critical control plane traffic (e.g., routing protocols) is prioritized over bulk data.
- Provide priority for video conferencing traffic to avoid jitter and packet loss.
- Allocate a percentage of bandwidth to a priority queue for interactive applications.
Parameters
| Parameter | Syntax | Description |
|---|---|---|
| kbps | <1-2000000> | Specifies the bandwidth in kilobits per second allocated to the priority queue. Valid values range from 1 to 2,000,000 kbps, but the actual maximum is limited by interface bandwidth. Common mistake is setting this too high, causing starvation of other queues. |
| percent n | <1-100> | Specifies the bandwidth as a percentage of the interface bandwidth. Valid values are 1 to 100. This is often preferred for flexibility across different interface speeds. Common mistake is forgetting that the percentage is based on the interface bandwidth, not the available bandwidth after other reservations. |
Command Examples
Basic priority with bandwidth in kbps
priority 128Router(config-pmap-c)# priority 128 Router(config-pmap-c)#
No output is generated; the command is accepted silently. The class will receive strict priority up to 128 kbps.
Priority with percentage
priority percent 30Router(config-pmap-c)# priority percent 30 Router(config-pmap-c)#
No output; the class will receive strict priority up to 30% of the interface bandwidth.
Understanding the Output
The priority command does not produce any output when entered. To verify the configuration, use 'show policy-map [policy-map-name]' or 'show policy-map interface [interface]'. In the output, look for the class with priority configured.
The 'Strict Priority' or 'Priority' field indicates the bandwidth allocated (e.g., 128 kbps or 30%). If the priority queue is congested, packets exceeding the bandwidth limit are dropped. A healthy configuration shows no excessive drops in the priority queue.
Configuration Scenarios
Configure strict priority for VoIP traffic on a WAN link
A branch office has a 1.544 Mbps T1 link to headquarters. VoIP traffic must have low latency, while data traffic can share remaining bandwidth. The goal is to prioritize RTP voice packets.
Topology
BranchRouter(Gi0/0)---T1 1.544 Mbps---(Gi0/0)HeadendRouterSteps
- 1.Step 1: Enter global configuration mode: configure terminal
- 2.Step 2: Create a class-map to match VoIP traffic: class-map match-any VOIP
- 3.Step 3: Match RTP traffic: match ip dscp ef
- 4.Step 4: Create a policy-map: policy-map QOS-POLICY
- 5.Step 5: Define the VoIP class with priority: class VOIP
- 6.Step 6: Set priority bandwidth to 384 kbps: priority 384
- 7.Step 7: Define a default class for other traffic: class class-default
- 8.Step 8: Use fair-queue for remaining traffic: fair-queue
- 9.Step 9: Apply the policy-map to the WAN interface: interface serial0/0/0
- 10.Step 10: Attach service-policy output: service-policy output QOS-POLICY
! Full IOS config block class-map match-any VOIP match ip dscp ef ! policy-map QOS-POLICY class VOIP priority 384 class class-default fair-queue ! interface Serial0/0/0 bandwidth 1544 service-policy output QOS-POLICY
Verify: Use 'show policy-map interface serial0/0/0' to verify the priority queue is active and see packet counts. Expected output shows 'Priority Queue' with configured bandwidth and statistics.
Watch out: If the priority bandwidth is set too high (e.g., 1000 kbps on a 1544 kbps link), other queues may starve. Always ensure priority bandwidth is less than the interface bandwidth.
Use percentage-based priority for video conferencing on a Gigabit Ethernet link
A campus network uses Gigabit Ethernet links. Video conferencing traffic (marked with DSCP AF41) needs priority treatment, but the link speed may vary. Using percentage allows the policy to scale automatically.
Topology
CampusSwitch(Gi1/0/1)---GigE---(Gi0/0)RouterSteps
- 1.Step 1: Enter global configuration mode: configure terminal
- 2.Step 2: Create a class-map for video: class-map match-any VIDEO
- 3.Step 3: Match DSCP AF41: match ip dscp af41
- 4.Step 4: Create a policy-map: policy-map VIDEO-PRIORITY
- 5.Step 5: Define the video class with percentage priority: class VIDEO
- 6.Step 6: Set priority to 30%: priority percent 30
- 7.Step 7: Define class-default: class class-default
- 8.Step 8: Use bandwidth remaining percent: bandwidth remaining percent 70
- 9.Step 9: Apply policy to interface: interface GigabitEthernet0/0
- 10.Step 10: Attach service-policy output: service-policy output VIDEO-PRIORITY
! Full IOS config block class-map match-any VIDEO match ip dscp af41 ! policy-map VIDEO-PRIORITY class VIDEO priority percent 30 class class-default bandwidth remaining percent 70 ! interface GigabitEthernet0/0 service-policy output VIDEO-PRIORITY
Verify: Use 'show policy-map interface gigabitethernet0/0' to see the priority queue statistics. Look for 'Priority: 30%' and check that packet drops are minimal.
Watch out: When using 'priority percent', the percentage is based on the interface bandwidth. If the interface bandwidth is not explicitly set (e.g., on Ethernet), it defaults to 1 Gbps. Ensure the interface bandwidth is correct with 'bandwidth' command if needed.
Troubleshooting with This Command
When troubleshooting the `priority` command, the primary tool is `show policy-map interface [interface]`. This command displays the actual queuing statistics for each class, including the priority queue. Healthy output shows the priority queue with a 'Priority' status, the configured bandwidth (either in kbps or percent), and counters for packets matched and dropped.
Key indicators of problems include: (1) High packet drops in the priority queue – this suggests the priority bandwidth is too low for the offered traffic, or the traffic is bursty and exceeds the policer. (2) The priority queue shows zero packets – this indicates that the class-map is not matching any traffic; verify match criteria with `show class-map` and `show access-lists`. (3) The priority queue is not listed – this means the policy-map is not applied correctly or the class is not configured with priority. Another common symptom is that non-priority traffic experiences excessive delay or drops, which may indicate the priority queue is consuming too much bandwidth (starvation). To diagnose, first check the interface bandwidth with `show interface` to ensure it matches expectations.
Then verify the policy-map attachment with `show running-config interface [interface]`. Use `show policy-map` to review the policy definition. If using percentage, confirm the interface bandwidth is set correctly; otherwise, the percentage may be based on an incorrect value.
For deeper analysis, use `debug policy-map` (with caution) to see real-time packet matching. Correlate with `show interface` for output drops and `show queueing` for hardware queue details. On platforms with separate control plane, ensure QoS is enabled globally.
Also, check for any hierarchical policies that might override the priority queue. In summary, a systematic approach: verify class-map matches, policy-map definition, interface attachment, and then analyze the show policy-map interface output for drops and utilization.
CCNA Exam Tips
Remember that priority queuing can cause starvation of other queues if not policed; CCNA expects you to know that priority should be used sparingly.
The 'priority' command is only available in policy-map class configuration mode; it cannot be used in the default class.
When using 'priority percent', the percentage is based on the interface bandwidth, not the remaining bandwidth.
Be aware that priority and bandwidth commands are mutually exclusive within the same class; you cannot use both.
Common Mistakes
Mistake 1: Using 'priority' without specifying a bandwidth limit, which defaults to unlimited and can starve other traffic.
Mistake 2: Applying priority to the default class (class-default) — this is not allowed and will be rejected.
Mistake 3: Confusing 'priority' with 'bandwidth' — priority provides strict priority queuing, while bandwidth guarantees a minimum share.
priority [kbps|percent n] vs show policy-map interface
Both commands are used in QoS configurations, but one configures priority queuing within a policy map, while the other displays the applied QoS policies and their statistics. They are often confused because they operate at different stages of QoS management: configuration versus verification.
| Aspect | priority [kbps|percent n] | show policy-map interface |
|---|---|---|
| Scope | Per-class within a policy map | Per-interface QoS policy and statistics |
| Configuration mode | Policy-map class configuration | Privileged EXEC |
| Persistence | Saved in running-config | Not saved; runtime display only |
| Precedence | Sets strict priority queuing | Shows actual packet handling |
| Typical use | Allocate bandwidth to critical traffic | Verify and troubleshoot QoS policy |
Use priority [kbps|percent n] when you need to configure strict priority queuing for a specific traffic class in a policy map, ensuring low-latency treatment for delay-sensitive traffic.
Use show policy-map interface when you need to verify which QoS policy is applied on an interface, view per-class statistics, and confirm that the policy is operating as intended.
Platform Notes
In IOS-XE, the `priority` command syntax is identical to classic IOS, but output formatting in `show policy-map interface` may differ slightly (e.g., more detailed statistics). On NX-OS (Cisco Nexus switches), the equivalent command is `priority` within a policy-map class, but the configuration context is different: NX-OS uses `policy-map type qos` and `class` under it. The syntax is `priority [level <1-2>] [percent <0-100>]` where level 1 is strict priority.
For example: `policy-map type qos QOS-POLICY` then `class VOIP` then `priority level 1 percent 30`. NX-OS also supports `priority` without level for default strict priority. On ASA firewalls, QoS is more limited; the equivalent is using `priority-queue` on an interface and then `priority` within a service-policy, but the syntax is different: `priority-queue interface_name` and then `priority` in a policy-map class.
ASA does not support percentage-based priority; only absolute bandwidth in kbps. In IOS-XR, the command is `priority` under a policy-map class, but the configuration is done in XR's modular QoS CLI, which is similar but uses different hierarchical constructs. For example: `policy-map QOS` then `class VOIP` then `priority level 1` and `police rate 384 kbps` (since XR requires explicit policing for priority).
IOS versions 12.x and 15.x behave similarly, but 16.x (IOS-XE) introduced more granular statistics. Always check platform documentation for specific queueing behavior (e.g., some platforms support multiple priority levels).
Related Commands
Practice for the CCNA 200-301
Test your knowledge with practice questions covering all CCNA 200-301 exam domains.
Practice CCNA 200-301 Questions