What Is QoS Queuing and Shaping in Networking?
Also known as: QoS Queuing, QoS Shaping, CCNP QoS, ENCOR QoS, traffic shaping
On This Page
Quick Definition
QoS Queuing and Shaping are methods used to manage network traffic when there is too much data to send at once. Queuing decides which packets go first by storing them in different priority lines. Shaping smooths out bursts of traffic by delaying some packets to keep the data flow within a set speed limit. This helps important traffic like video calls or online exams work reliably, even when the network is busy.
Must Know for Exams
QoS Queuing and Shaping are heavily tested in the Cisco CCNP ENCOR (350-401) exam, which covers enterprise networking technologies. The exam objectives explicitly include “Describe the components of the Cisco QoS framework” and “Configure and verify QoS mechanisms such as queuing, shaping, and policing.” Candidates must understand the differences between queuing algorithms like FIFO, WFQ, CBWFQ, and LLQ, and know when to apply each one.
The exam also expects you to know how shaping differs from policing: shaping buffers traffic and delays it, while policing drops or marks packets. A common exam scenario involves a WAN link with limited bandwidth, where you must configure shaping to match the service provider’s CIR and apply LLQ for voice traffic. The ENCOR exam may also ask about the token bucket algorithm used in shaping, specifically the concepts of Bc and Be, and how to calculate the time interval.
Another important area is the use of the MQC (Modular QoS CLI) to create class maps and policy maps, and then verifying the configuration with show policy-map interface. The exam often includes multiple-choice questions that present a show command output and ask you to interpret the queuing statistics, such as the number of packets in each queue, the number of drops, or the shaping rate. In addition, the exam may test your understanding of how queuing and shaping interact with other QoS tools like WRED (Weighted Random Early Detection) and congestion management.
Because the ENCOR exam is a core requirement for the CCNP Enterprise certification, a solid grasp of these topics is essential. The exam also tests your ability to troubleshoot QoS issues, such as misconfigured shaping causing excessive delay or incorrect queuing leading to priority queue starvation. By studying queuing and shaping in depth, you gain the knowledge to answer both conceptual and configuration-based questions confidently.
The exam expects you to not only recall definitions but also to apply them in realistic network design scenarios. Therefore, these topics appear in multiple sections of the exam, including the Design, Implementation, and Troubleshooting domains.
Simple Meaning
Imagine you are at a busy post office with one counter and many customers. Some customers are sending urgent packages that must arrive quickly, while others are sending regular mail that can wait a little longer. The post office uses a system to manage these requests: they put all the packages into different bins based on urgency.
The urgent bin gets processed first, and the regular bin waits until there is time. This is like Queuing. Now imagine the post office has a rule that only a certain number of packages can leave the building every minute.
If too many packages arrive, the staff holds some back and lets them out later at a steady pace. This is like Shaping. In computer networks, QoS Queuing and Shaping do exactly these jobs.
Queuing is the process of sorting packets into different virtual lines, or queues, based on priority. Each queue is served in a specific order, so high-priority traffic like voice calls or streaming video gets sent before lower-priority traffic like file downloads. Shaping is a separate tool that controls the rate at which traffic leaves an interface, even if the arrival rate is much higher.
Instead of dropping packets, shaping buffers them temporarily and releases them at a controlled, steady speed. Together, these two tools prevent congestion from ruining the performance of critical applications. For example, in a company network that uses VoIP phones, queuing ensures that voice packets always jump the queue ahead of a large email attachment.
Shaping makes sure that the total traffic leaving the office does not exceed the contract speed with the internet provider, avoiding packet loss. Both techniques are essential for maintaining a predictable, high-quality network experience, especially when bandwidth is limited.
Full Technical Definition
QoS Queuing and Shaping are fundamental traffic control mechanisms defined under the Quality of Service (QoS) framework, primarily standardized by RFC documents and implemented in Cisco IOS, IOS-XE, and NX-OS. Queuing refers to the process of buffering packets into multiple queues on an interface and then servicing those queues according to a scheduling algorithm. The main Cisco queuing methods include Priority Queuing (PQ), Custom Queuing (CQ), Weighted Fair Queuing (WFQ), Class-Based Weighted Fair Queuing (CBWFQ), and Low Latency Queuing (LLQ).
LLQ is the most common on modern CCNP exams, as it combines a strict priority queue for delay-sensitive traffic (like VoIP) with CBWFQ for other classes. Each queue uses a scheduler that determines the order of packet transmission based on weights, bandwidth percentages, or priority flags. Shaping, on the other hand, is defined by Traffic Shaping mechanisms like Generic Traffic Shaping (GTS) and Class-Based Shaping.
Shaping uses a token bucket or leaky bucket algorithm to constrain the output rate of a traffic flow to a configured Committed Information Rate (CIR). Unlike policing, which drops packets when the rate exceeds the limit, shaping buffers excess packets in a queue and delays them until tokens become available. This makes shaping ideal for sub-rate interfaces or for meeting service provider contracts that require a smooth traffic profile.
The shaping process is measured in bits per second and uses a Burst Size (Bc) and Excess Burst (Be) to define how much traffic can be sent in a time interval. Queuing and shaping are often configured together: shaping is applied to a class or interface to limit the overall output rate, while queuing defines the order in which packets from different flows are transmitted within that shaped rate. On Cisco routers, these configurations are typically performed in policy maps using the MQC (Modular QoS CLI) structure.
For example, a policy map might use the shape average command to limit traffic to 10 Mbps, and then within that shaped rate, an LLQ queue ensures voice traffic gets priority. Both mechanisms rely on queuing buffers and must be carefully tuned to avoid excessive delay or jitter. In the ENCOR exam, candidates are expected to understand the difference between queuing and shaping, the algorithms used, and how to interpret show commands like show policy-map interface to verify traffic statistics.
Real-Life Example
Consider a busy library with a single checkout counter. Patrons bring books to the counter, and the librarian can only serve one patron at a time. Sometimes there is a long line. To manage this fairly, the library uses a system of colored cards.
Patrons with urgent requests, like someone who needs a book for an exam the next day, get a red card. Patrons with normal requests get a blue card, and those returning books get a green card. The librarian decides to serve all red cards first, then blue, then green.
This is exactly like Queuing. The red card represents high-priority traffic (like voice or video), the blue card is normal priority (like web browsing), and the green card is low priority (like file downloads). Now imagine the library is located in a building that has a rule: only 10 people can exit the front door per minute to avoid crowding.
Even if the librarian processes patrons quickly, they must wait at the door and be released at a steady pace. So the librarian hands each patron a token that lets them exit, but only when the rate of exits is controlled. This is like Shaping.
The library is not dropping anyone; it is just delaying the exit to smooth the flow. In the network, the librarian is the queuing scheduler on the router, and the exit door is the shaping mechanism that limits the output rate. When the network experiences a sudden burst of data, the shaper holds back some traffic in a buffer and releases it at the configured speed.
The queuing system inside determines the order that different types of traffic exit the shaper. Without shaping, the network would send data in bursts that could exceed the service provider’s committed rate, causing packets to be dropped. Without queuing, all traffic would be treated equally, and a large file transfer would push voice calls aside, causing poor call quality.
The library analogy shows how both systems work together to keep everyone moving smoothly, even under pressure.
Why This Term Matters
QoS Queuing and Shaping matter because networks are shared environments where multiple applications compete for limited bandwidth. Without these controls, a single large file transfer can consume all available bandwidth, causing real-time applications like VoIP, video conferencing, and online learning platforms to experience delay, jitter, and packet loss. In enterprise networks, IT professionals are responsible for ensuring that critical business applications perform reliably.
For example, in a hospital, telemedicine video calls must have clear audio and video, while a staff member downloading a large software update can wait. Queuing allows the router to prioritize the video call packets over the download packets. Shaping ensures that the hospital’s internet connection does not exceed the purchased bandwidth, which would cause the ISP to drop packets and trigger retransmissions, further degrading performance.
On a practical level, shaping is also used to meet service level agreements with carriers. If a company pays for a 50 Mbps circuit, sending traffic at 60 Mbps for even a few seconds can result in dropped packets or additional fees. Shaping buffers the excess traffic and sends it within the contract limits, maintaining a clean traffic profile.
In addition, queuing and shaping are foundational for implementing more advanced QoS features like traffic policing, congestion avoidance (WRED), and link fragmentation. They also interact with other networking technologies like MPLS and VPNs, where the service provider may require traffic to be shaped before entering the provider’s network. For network engineers, understanding these concepts is essential for designing networks that can scale, maintain quality, and troubleshoot performance issues.
Misconfiguring queuing or shaping can lead to severe performance problems, such as voice calls dropping, video freezing, or critical application timeouts. Therefore, these techniques are not optional; they are a core requirement for any professional managing a medium to large network. In the context of Courseiva learners preparing for the CCNP ENCOR exam, mastering queuing and shaping is directly tied to passing the exam and being effective in real-world network roles.
How It Appears in Exam Questions
In the CCNP ENCOR exam, QoS Queuing and Shaping appear in several types of questions. Configuration questions present a scenario where you need to choose the correct policy map commands to shape traffic to 10 Mbps and give priority to voice traffic. For example, the question might describe a remote office with a 10 Mbps Metro Ethernet link and 50 VoIP phones, and ask which configuration ensures voice packets are sent with minimal delay while the rest of the traffic is shaped.
You would need to select an answer with shape average 10000000 and priority for the voice class. Troubleshooting questions often show the output of the show policy-map interface command and ask you to identify why voice quality is poor. You might see a high number of packets in the priority queue or a low shaping rate, and you need to diagnose the misconfiguration.
Conceptual questions test your understanding of the differences between queuing algorithms, such as why CBWFQ provides bandwidth guarantees for multiple classes while LLQ adds a strict priority queue for real-time traffic. Another common pattern is a question that asks you to calculate the shaping parameters. For instance, given a CIR of 8 Mbps with a burst size of 8000 bytes and a time interval of 10 ms, you might be asked to determine the actual shaped rate or to identify the correct Bc value.
Scenario-based questions are also frequent. They describe a network with congestion on a WAN link, and you must choose which QoS mechanism to apply. For example, if the problem is that a large FTP transfer is causing voice jitter, you would select queuing with LLQ.
If the problem is that the link is being overrun and causing ISP penalties, you would select shaping. The exam may also present a graph or output showing bursty traffic and ask which tool would smooth it out. Finally, drag-and-drop questions may ask you to match queuing mechanisms to their descriptions or to order the steps of configuring QoS using MQC.
You may also encounter questions that combine queuing and shaping with other topics like QoS trust boundaries, classification, or marking. In all these cases, the exam expects you to not just memorize definitions but to apply the concepts to realistic network problems. By practicing with these question patterns, you will be better prepared to answer quickly and accurately.
Study encor
Test your understanding with exam-style practice questions.
Example Scenario
A medium-sized company uses an internet link of 20 Mbps for both critical video meetings and general web browsing. The IT team notices that during busy periods, video calls become choppy and sometimes drop. The network administrator decides to implement QoS.
First, they identify that video traffic is the highest priority. They configure a class map called VIDEO that matches packets with a specific DSCP value used by their video application. Then they create a policy map called SHAPE-AND-QUEUE.
Inside this policy, they apply a shape average command to limit all traffic to 18 Mbps, leaving a little headroom below the full 20 Mbps to avoid ISP shaping. Within that shaped rate, they assign the video class to the priority queue, ensuring it gets immediate service. All other traffic, such as file downloads and web traffic, is placed in a default queue using CBWFQ, with a guaranteed minimum bandwidth.
After applying the policy to the WAN interface, the video calls become smooth, and lower-priority traffic simply slows down when the link is busy. In this scenario, the queuing (priority queue for video) ensures that video packets experience minimal delay, while shaping prevents the company from exceeding the 20 Mbps contract, which would cause the ISP to drop packets. The combination of both tools gives the company a stable and predictable network, even during peak usage.
Common Mistakes
Thinking that queuing and shaping are the same thing or interchangeable.
Queuing controls the order in which packets are sent based on priority, while shaping controls the overall rate at which traffic leaves an interface. They serve different purposes and are often used together. Replacing one with the other will not achieve the desired outcome.
Remember that queuing is about priority and scheduling, shaping is about rate limiting. Use queuing when you need to prioritize traffic during congestion, and use shaping when you need to smooth traffic bursts to match a contracted speed.
Configuring shaping without considering the interface speed or the provider’s CIR, resulting in too high or too low a rate.
Setting shaping too high can cause the ISP to drop packets, while setting it too low wastes bandwidth and causes unnecessary delays.
Always check the provider’s contract for the committed information rate (CIR) and configure shaping slightly below that value to allow for overhead. Use tools like show interface to verify the actual interface speed.
Putting too many traffic classes in the priority queue of LLQ, leading to starvation of other queues.
The strict priority queue can consume all available bandwidth if its traffic rate exceeds the allocated bandwidth. This causes other queues to never get serviced, resulting in poor performance for lower-priority applications.
Limit the priority queue to only the most delay-sensitive traffic, like VoIP or real-time video. Use the police command within the priority class to limit the amount of traffic that can use the priority queue.
Forgetting to apply the service policy to the correct interface or direction.
A policy map will not take effect until it is applied in the correct direction (input or output) on the appropriate interface. Applying it in the wrong direction can cause no effect or even break traffic.
Remember that queuing and shaping are typically applied on the output direction of a WAN interface. Use the service-policy output command to apply the policy. Verify with show running-config interface to confirm the application.
Believing that shaping is always better than policing because it does not drop packets.
Shaping adds delay by buffering packets, which can be harmful to real-time traffic. Policing drops packets but does not add delay. For time-sensitive traffic, dropping a packet is sometimes better than delaying it.
Use policing for traffic that cannot tolerate delay (like VoIP) if shaping would introduce jitter. Use shaping for traffic that can tolerate some delay, such as file transfers, to avoid packets being dropped by the provider.
Exam Trap — Don't Get Fooled
On the ENCOR exam, a question may say: “Which QoS mechanism should be used to limit traffic to a configured rate without dropping packets?” Many learners immediately answer “policing” because they associate it with rate limiting. But policing drops packets, while shaping buffers them.
Memorize the key difference: shaping buffers and delays traffic above the rate, while policing drops or marks traffic above the rate. When you see “without dropping packets” in a question, always think of shaping. When you see “without adding delay,” think of policing.
Commonly Confused With
Policing controls traffic rate by dropping or marking packets that exceed a limit, while shaping buffers excess traffic and delays it. Policing adds no additional delay (latency) but can cause packet loss, whereas shaping adds delay but avoids packet loss.
If a link is congested and you want to ensure voice traffic is not delayed, use policing to drop web traffic. If the goal is to keep the overall traffic rate consistent without losing data, use shaping.
WRED is a drop mechanism that randomly discards packets from low-priority traffic before a queue becomes full, to avoid tail drops and maintain fairness. Queuing is about the order of transmission, while WRED is about proactively dropping packets to prevent queues from overflowing.
Queuing decides that voice packets go first. WRED might drop some low-priority packets early to avoid the queue filling up and causing all packets to be dropped later.
Classification and marking are used to identify packets and set QoS markings (like DSCP or CoS) before queuing or shaping. Queuing and shaping use those markings to decide how to treat the packet. Classification is the “who is this packet” step, while queuing and shaping are the “what do we do with it” step.
First you mark a voice packet with DSCP EF. Then queuing uses that mark to place the packet in the priority queue. Separation of duties is critical.
Step-by-Step Breakdown
1. Classification
The router inspects incoming packets and identifies which traffic class they belong to. This is done using a class map that matches criteria like DSCP, IP precedence, or ACL. For example, voice traffic is matched by DSCP EF. This step is essential because it determines which queue the packet will enter later.
2. Policy Map Creation
A policy map is created to define the QoS actions for each class. Inside the policy, you specify queuing parameters like priority for real-time traffic or bandwidth for other classes, and shaping parameters like shape average to control the output rate. This is the brain of the QoS configuration.
3. Apply Service Policy
The policy map is applied to a specific interface in the outbound direction using the service-policy output command. The router then starts using the policy to manage traffic on that interface. Without this step, the policy exists but does nothing.
4. Shaping Activation
When a packet arrives and the interface is sending data, the shaper checks whether the current traffic rate is below the configured CIR. If it is, the packet is sent immediately. If the rate is exceeded, the packet is placed in a shaping queue and released later when tokens are available. This smooths out bursts.
5. Queuing Scheduling
Inside the shaping queue, the queuing mechanism determines which packet goes next. In an LLQ policy, the priority queue is serviced first, so any voice packets waiting are sent before packets from other queues. Other queues are serviced in a weighted round-robin fashion based on allocated bandwidth. This ensures priority without starving other traffic.
6. Monitoring and Verification
After deployment, you use commands like show policy-map interface to monitor queues, packet counts, drops, and shaping rates. This allows you to verify that the configuration is working as intended and to troubleshoot issues like queue buildup or excessive drops. Regular monitoring is necessary for maintaining QoS performance.
Practical Mini-Lesson
To implement QoS Queuing and Shaping in a real Cisco network, you work with the Modular QoS CLI (MQC) framework. Start by defining class maps. For example, to match voice traffic, create a class map named VOICE that matches on DSCP EF.
Next, create a policy map. In the policy, apply the shape average command to limit the overall traffic rate to, say, 20 Mbps. Then within the same policy, assign the VOICE class to the priority queue using the priority command.
For other classes like WEB or BULK, use the bandwidth command to guarantee a minimum percentage of the remaining bandwidth. It is critical to understand that the shaping rate must be lower than the interface speed to be effective. A common real-world scenario is a T1 link (1.
544 Mbps). If the provider commits to a CIR of 1 Mbps, you shape at 1 Mbps to avoid exceeding the contract. Within that shaped pipe, you configure a priority queue for VoIP traffic, which requires low latency.
The priority queue is policed internally by the router to prevent starvation of other queues. You might also configure a policy for data traffic to guarantee 500 kbps and best effort for the rest. Once configured, apply the service policy to the output of the serial interface.
After deployment, you use show policy-map interface serial 0/0/0 to verify that the shape rate is active and that queues are working correctly. Common issues include oversubscribing the priority queue, which can be monitored by paying attention to the “queue depth” in the output. Another issue is shaping too high, which results in no effect, or shaping too low, which artificially caps performance.
In production, you also need to account for Layer 2 overhead when calculating the shaping rate. For example, Ethernet adds 20 bytes of overhead per packet. Professionals often add a small percentage (e.
g., 5%) to the CIR to compensate. This practical knowledge is exactly what the ENCOR exam evaluates: not just theory, but the ability to design and troubleshoot QoS in a real network.
Additionally, remember that shaping and queuing are not exclusive to Cisco; the principles apply to any networking equipment, although the CLI commands differ. For Courseiva learners, practicing configuration on lab equipment or simulators is highly recommended to build muscle memory for the exam and the job.
Memory Tip
To separate queuing from shaping, remember: Queuing is about the order of service (like a VIP line), Shaping is about the speed of service (like a speed governor on a car). Both work together to keep traffic flowing smoothly.
Covered in These Exams
Related Glossary Terms
802.1Q is the networking standard that allows multiple virtual LANs (VLANs) to share a single physical network link by tagging Ethernet frames with VLAN identification information.
802.1X is a network access control standard that authenticates devices before they are allowed to connect to a wired or wireless network.
5G is the fifth generation of cellular network technology, designed to deliver faster speeds, lower latency, and support for many more connected devices than previous generations.
32-bit File Allocation Table (FAT32) is a file system that organizes data on storage devices like hard drives and USB flash drives using a 32-bit addressing scheme to track where files are stored.
An A record is a DNS record that maps a domain name to the IPv4 address of the server hosting that domain.
Frequently Asked Questions
What is the main difference between queuing and shaping?
Queuing controls the order in which packets are transmitted based on priority, while shaping controls the rate at which packets are sent by buffering excess traffic. Queuing deals with what goes first, shaping deals with how fast traffic goes out.
Can I use shaping without queuing?
Technically yes, but shaping always involves some form of queuing because it buffers packets. If you do not configure a specific queuing strategy, the router uses the default FIFO queue inside the shaper, which does not prioritize traffic. For best results, you should configure both queuing and shaping together.
Do I need QoS if I have enough bandwidth?
Even with high bandwidth, bursts can cause temporary congestion. Without queuing, a large burst can increase latency and jitter, affecting real-time applications. Shaping helps smooth bursts. So QoS is still beneficial for maintaining quality, especially for sensitive traffic.
What happens if the shaping queue fills up?
If the shaping queue reaches its maximum capacity, subsequent packets are tail-dropped. This is similar to any other queue overflow. You can monitor the queue depth using the show policy-map interface command to see if packets are being dropped.
Is shaping applied on input or output?
Shaping is typically applied on the output direction of an interface. This is because you want to control the traffic leaving the router to match the downstream link speed. Input shaping is less common and can cause performance issues due to buffering inbound packets.
How does shaping work with the token bucket algorithm?
The token bucket uses tokens that are added at a constant rate equal to the CIR. Each packet requires a number of tokens equal to its size. If tokens are available, the packet is sent. If not, the packet is buffered. The bucket can hold a limited number of tokens (the burst size), allowing short bursts to be sent faster than the CIR.
What is the difference between Bc and Be in shaping?
Bc (Committed Burst) is the amount of traffic that can be sent per time interval at the CIR. Be (Excess Burst) is the extra traffic allowed during the first interval if the bucket is full. Be allows for higher bursts but may cause packets to be dropped if exceeded.
Summary
QoS Queuing and Shaping are two of the most important traffic management tools available to network engineers. Queuing manages the order in which packets are transmitted by placing them into priority-based queues, ensuring that critical traffic like voice and video experiences minimal delay. Shaping complements this by controlling the overall rate of traffic leaving an interface, smoothing out bursts to stay within bandwidth contracts and prevent packet loss.
Together, they form a powerful combination that keeps networks stable, predictable, and efficient, even under heavy loads. For IT professionals pursuing certifications like the CCNP Enterprise, mastering these concepts is not optional: they appear directly in exam objectives and are tested through configuration, troubleshooting, and scenario-based questions. The key to success is understanding the distinct roles of each tool, practicing their configuration using MQC, and being able to verify their operation with show commands.
Avoiding common mistakes like confusing shaping with policing, overloading the priority queue, or misapplying policies will save you time on the exam and in real network deployments. Use the memory tip that queuing is about order and shaping is about speed, and always remember that both are essential for a well-designed network. By learning the theory and applying it through practice labs, you will be ready to tackle both the ENCOR exam and real-world network challenges.