🎓 BookMCQ
← Back to 30. Quality of Service

📝 Traffic shaping and policing in QoS (29 MCQs)

📖 From Data Communication and Networks • 30. Quality of Service • 29 questions available

What is Traffic shaping and policing in QoS?

Traffic shaping and policing are enforcement mechanisms where shaping buffers excess packets to smooth out bursty traffic into a compliant rate, while policing discards or marks down non-conforming packets immediately to ensure flows adhere to their agreed-upon service contracts.

9
Easy
13
Medium
7
Hard

📝 All Traffic shaping and policing in QoS MCQs

Q1. If a network device is configured to police traffic to a maximum rate of 800 kbps, what will happen to a 1 Mbps stream that exceeds this limit?

A.The stream will be dropped entirely
B.Excess packets will be delayed until bandwidth is available
C.Packets exceeding 800 kbps will be marked and possibly discarded ✅
D.The stream will be compressed to fit the limit
💡 Difficulty: easy | ✅ Correct: C

📖 Explanation: When the traffic exceeds the policing threshold, the device applies the configured action—typically marking the packets as non‑conforming and then discarding or deprioritizing them. This ensures the flow does not surpass 800 kbps, while the rest of the traffic continues unaffected.

Q2. How does increasing the burst size in a token‑bucket algorithm affect the traffic that can be sent in short bursts while maintaining the same average rate?

A.It reduces the allowed burst duration ✅
B.It increases the allowed burst duration
C.It changes the average rate
D.It has no effect on bursts
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: A larger burst size provides more tokens that can be accumulated, allowing a sender to transmit a higher volume of data instantaneously before the bucket empties. The average rate remains unchanged because tokens are refilled at the same constant rate, preserving long‑term bandwidth limits.

Q3. Which statement best describes the impact of traffic shaping on packet latency compared with traffic policing?

A.Shaping adds delay, policing does not ✅
B.Policing adds delay, shaping does not
C.Both add equal delay
D.Neither adds delay
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Traffic shaping buffers packets to smooth out bursts, introducing queuing delay as packets wait for transmission slots. In contrast, policing typically marks or drops excess packets without buffering, so it does not add extra latency. Therefore, shaping increases latency while policing leaves it unchanged.

Q4. What is the standard sampling rate for CD‑quality audio mentioned in the provided content?

A.48 kHz
B.44.1 kHz ✅
C.96 kHz
D.22.05 kHz
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: The content specifies a sampling rate of 44,100 samples per second, which is the widely adopted CD‑quality audio standard. This rate, combined with 16‑bit resolution, yields the bitrate calculations discussed and is a fundamental parameter in digital audio processing.

Q5. A token bucket has a refill rate of 500 kbps and a burst capacity of 200 kb. After the bucket becomes full, how many kilobits can be transmitted instantly without waiting for new tokens?

A.200 kb ✅
B.500 kb
C.700 kb
D.0 kb
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: When the bucket is full, it contains the maximum number of stored tokens equal to the burst capacity (200 kb). These tokens can be used immediately, allowing a burst of up to 200 kb to be sent. The refill rate governs only the long‑term replenishment, not the instantaneous burst.

Q6. To limit a 3 Mbps video stream to 2 Mbps while keeping delivery smooth, which mechanism is most appropriate?

A.Token bucket
B.Leaky bucket ✅
C.Random early detection
D.FIFO queue
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A leaky bucket enforces a constant outflow rate by draining packets at a fixed speed (2 Mbps) while temporarily storing arrivals in a buffer. This smoothing effect prevents abrupt rate changes, making it suitable for maintaining consistent video quality when the source exceeds the permitted bandwidth.

Q7. What is the likely effect on Voice‑over‑IP (VoIP) quality if a stricter policing threshold is applied to its traffic?

A.Improves QoS by reducing jitter
B.Degrades QoS due to increased packet loss ✅
C.No effect on QoS
D.Improves QoS by increasing bandwidth
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: VoIP is sensitive to packet loss; stricter policing discards or marks excess packets, leading to higher loss rates. While the policy enforces bandwidth contracts, the resulting loss or re‑marking can cause audible degradation, increased latency, and reduced call quality.

Q8. A token bucket refills at 1 Mbps and holds 100 kb of burst capacity. A 2 Mbps burst lasts 0.05 seconds. What occurs to the excess traffic?

A.The entire burst is transmitted
B.First 100 kb transmitted, rest dropped ✅
C.All packets are dropped
D.Rate is reduced to 1 Mbps
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: During the burst, the bucket can supply only its stored 100 kb of tokens. The remaining 2 Mbps × 0.05 s = 100 kb exceeds the available tokens, so those packets are considered non‑conforming and are dropped or marked according to the policing policy.

Q9. Why is traffic shaping frequently deployed at the edge of a network rather than in core routers?

A.Edge devices have more processing power
B.Shaping reduces congestion before it propagates ✅
C.Core routers cannot enforce policies
D.Edge devices handle fewer flows
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: Placing shaping functions at the network edge allows traffic to be regulated before it enters the backbone, preventing large bursts from overwhelming core infrastructure. This early control limits congestion spread, improves overall stability, and reduces the need for complex policing within high‑speed core routers.

Q10. When comparing (i) dropping excess packets and (ii) marking excess packets with a DSCP value, which approach better preserves end‑to‑end throughput for TCP flows, and why?

A.Dropping preserves throughput
B.Marking preserves throughput ✅
C.Both are equal
D.Neither works
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: Marking excess packets allows downstream routers to apply lower‑priority handling rather than discarding them outright. TCP can still receive acknowledgments for marked packets, maintaining its congestion‑control mechanisms, whereas dropped packets trigger retransmissions and reduce effective throughput.

Q11. A leaky bucket leaks at 600 kbps and has a buffer of 300 kb. If a 900 kb burst arrives instantly, how many kilobits will be transmitted before the buffer overflows?

A.0 kb
B.300 kb ✅
C.600 kb
D.900 kb
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The buffer can hold up to 300 kb. As the leak rate continuously drains the bucket, the first 300 kb of the burst are transmitted while the buffer fills. Once the buffer reaches capacity, any additional incoming bits cause overflow, so exactly 300 kb are transmitted before overflow occurs.

Q12. How can traffic shaping be combined with TCP’s slow‑start algorithm to improve overall network utilization?

A.Shaping replaces slow‑start
B.Shaping caps outbound rate, allowing TCP to adapt within limits ✅
C.Shaping interferes with TCP
D.Shaping works only for UDP
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: By limiting the sender’s outbound rate through shaping, TCP’s slow‑start still probes the available capacity but cannot exceed the imposed ceiling. This coordination prevents aggressive window growth that would overshoot the link, leading to smoother utilization and fewer packet losses.

Q13. For the same average rate of 1 Mbps and a burst size of 100 kb, how do token‑bucket and leaky‑bucket algorithms differ in handling burstiness?

A.Token bucket allows bursts up to 100 kb, leaky bucket smooths them ✅
B.Both allow identical bursts
C.Leaky bucket permits larger bursts
D.Token bucket smooths bursts
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: The token bucket accumulates tokens up to the burst size, enabling short, high‑rate transmissions of up to 100 kb. In contrast, a leaky bucket releases packets at a constant rate, buffering arrivals and effectively smoothing out bursts, so the traffic appears less bursty on the outbound side.

Q14. If a policing mechanism marks packets that exceed a configured rate, what downstream behavior is expected in a DiffServ network?

A.Marked packets are dropped immediately
B.Marked packets receive lower‑priority treatment ✅
C.Marked packets are forwarded faster
D.Marked packets are ignored
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: In a Differentiated Services (DiffServ) environment, marked packets are assigned a lower‑priority DSCP value. Downstream routers treat these packets with reduced scheduling priority, possibly delaying or dropping them during congestion, which enforces the original policing policy without immediate discard at the source.

Q15. What does “burst tolerance” refer to in token‑bucket algorithms?

A.Ability to handle sudden traffic spikes ✅
B.Maximum sustained rate
C.Minimum latency
D.Packet‑size limit
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Burst tolerance describes the token bucket’s capacity to absorb short, high‑rate traffic surges without violating the configured average rate. The stored tokens represent this tolerance, allowing a flow to transmit a burst of data up to the bucket’s size before it must wait for additional tokens to be generated.

Q16. Which protocol commonly uses policing to enforce bandwidth contracts in MPLS networks?

A.OSPF
B.BGP
C.RSVP ✅
D.IS‑IS
💡 Difficulty: medium | ✅ Correct: C

📖 Explanation: RSVP (Resource Reservation Protocol) is frequently employed in MPLS environments to reserve resources and enforce bandwidth guarantees. Policing mechanisms can be applied to RSVP‑TE LSPs to ensure that traffic adheres to the agreed‑upon bandwidth, dropping or marking non‑conforming packets.

Q17. Why might an administrator prefer policing over shaping for inbound traffic on a WAN link?

A.Policing prevents buffer overflow at the edge ✅
B.Shaping is less efficient
C.Policing reduces latency
D.Shaping cannot be applied inbound
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Inbound policing examines arriving packets and immediately marks or discards those that exceed the contracted rate, preventing excess traffic from filling the router’s input buffers. This protects the device from congestion‑induced buffer overrun, whereas shaping would require buffering, which could exacerbate overflow on the inbound side.

Q18. Assume a token bucket with a rate of 2 Mbps and a burst size of 500 kb. A flow sends 2.5 Mbps continuously for 1 second. How many kilobits will be dropped (or marked) due to exceeding the token‑bucket capacity?

A.0 kb ✅
B.250 kb
C.500 kb
D.2500 kb
💡 Difficulty: hard | ✅ Correct: A

📖 Explanation: During one second the bucket generates 2 Mbps × 1 s = 2000 kb of tokens, plus the initial 500 kb burst capacity, totaling 2500 kb. The flow transmits exactly 2.5 Mbps × 1 s = 2500 kb, matching the token supply, so no tokens are exhausted and no packets are dropped or marked.

Q19. Apply the principle of traffic policing to a scenario where a user exceeds their subscribed bandwidth by 20%. What is the typical network response?

A.Increase the user’s bandwidth
B.Throttle or drop excess packets ✅
C.Take no action
D.Redirect the traffic elsewhere
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: When a subscriber surpasses the allotted rate, the network’s policing function identifies the non‑conforming traffic and either marks it for lower priority or discards it outright. This enforcement maintains fairness among users and ensures that the over‑subscriber does not degrade service for others.

Q20. Compare the effect on packet‑delay variation (jitter) when using traffic shaping versus traffic policing.

A.Shaping reduces jitter, policing increases it ✅
B.Policing reduces jitter, shaping increases it
C.Both increase jitter
D.Both reduce jitter
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: Shaping buffers packets to smooth out bursts, delivering them at a steady rate, which lowers variation in inter‑arrival times and thus reduces jitter. Policing, by marking or dropping excess packets without buffering, can cause irregular delivery and increased jitter, especially for real‑time streams.

Q21. If a traffic shaper employs a leaky bucket with a leak rate of 1 Mbps, what is the maximum sustained throughput it can allow?

A.1 Mbps ✅
B.Unlimited
C.0.5 Mbps
D.Depends on buffer size
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: The leak rate defines the constant outflow speed of the leaky bucket; therefore, the shaper cannot transmit faster than this rate. Regardless of buffer size, the sustained throughput is capped at the leak rate, which in this case is 1 Mbps.

Q22. How can traffic shaping be used to achieve fairness among multiple flows sharing a bottleneck link?

A.By assigning equal burst sizes to each flow
B.By allocating token rates proportionally to each flow’s share ✅
C.By dropping packets randomly across flows
D.By using round‑robin scheduling
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: A shaping system can allocate separate token buckets to each flow, granting each a rate proportional to its intended fair share. As tokens are consumed, the shaper smooths traffic, ensuring that no single flow dominates the bottleneck, thereby enforcing fairness through rate‑based control.

Q23. What are the QoS consequences of using a small versus a large bucket size in a token‑bucket algorithm for latency‑sensitive applications?

A.Small bucket increases latency, large bucket reduces it
B.Small bucket reduces burst capability, improving latency ✅
C.Large bucket increases jitter
D.There is no difference
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: A smaller bucket limits the amount of traffic that can be sent in a burst, forcing applications to transmit more evenly and thus reducing queuing delay for time‑critical packets. Conversely, a larger bucket permits bigger bursts, which can introduce additional latency and jitter for latency‑sensitive traffic.

Q24. Given the audio example (44.1 kHz, 16 bits), what is the bitrate for a mono channel?

A.705.6 kbps ✅
B.352.8 kbps
C.1.4112 Mbps
D.44.1 kbps
💡 Difficulty: easy | ✅ Correct: A

📖 Explanation: The bitrate is calculated by multiplying the sampling rate (44.1 kHz) by the bit depth (16 bits) resulting in 44,100 × 16 = 705,600 bits per second, which equals 705.6 kbps for a single (monaural) audio channel.

Q25. Why is traffic policing considered a “hard limit” while shaping is a “soft limit”?

A.Policing drops/marks excess traffic, shaping buffers it ✅
B.Policing uses tokens, shaping uses leaky bucket
C.Policing is for inbound, shaping for outbound
D.Policing is slower than shaping
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: Policing enforces a strict ceiling by immediately discarding or marking packets that exceed the configured rate, making the limit immutable. Shaping, however, temporarily stores excess packets in a buffer and releases them later, allowing temporary overshoot of the rate without violating the overall bandwidth contract.

Q26. A network implements hierarchical token buckets: an outer bucket with rate 10 Mbps and burst 2 Mb, and an inner bucket with rate 5 Mbps and burst 1 Mb. If a flow attempts to send 12 Mbps continuously, what is the maximum sustained rate after both policing stages?

A.2 Mbps
B.5 Mbps ✅
C.10 Mbps
D.12 Mbps
💡 Difficulty: hard | ✅ Correct: B

📖 Explanation: The outer bucket first limits the flow to its configured rate of 10 Mbps, dropping any excess. The inner bucket then applies its stricter rate of 5 Mbps, further reducing the flow. Consequently, the flow’s sustained throughput after both stages cannot exceed the inner bucket’s 5 Mbps limit.

Q27. If traffic shaping buffers packets to smooth traffic, what could happen if the buffer becomes full?

A.Packets are delayed longer
B.Packets are dropped ✅
C.Buffer size increases automatically
D.Traffic rate increases
💡 Difficulty: medium | ✅ Correct: B

📖 Explanation: When the shaping buffer reaches capacity, additional incoming packets have nowhere to be stored. The shaper must then discard the excess packets (or, in some implementations, mark them) to prevent overflow, which defeats the smoothing purpose and may lead to packet loss.

Q28. Which of the following best describes “burstiness” in network traffic?

A.Constant‑rate traffic
B.Sudden short periods of high data rate ✅
C.Low latency
D.Packet loss
💡 Difficulty: easy | ✅ Correct: B

📖 Explanation: Burstiness refers to irregular traffic patterns where data is transmitted in short, intense spikes followed by quieter intervals. This characteristic contrasts with steady, uniform traffic and can cause temporary congestion if the network cannot absorb the rapid influx of packets.

Q29. Evaluate the trade‑off between buffer size and latency when configuring a traffic shaper for a real‑time gaming application.

A.Larger buffers increase latency but allow larger bursts ✅
B.Larger buffers reduce latency
C.Smaller buffers increase burst tolerance
D.Buffer size does not affect latency
💡 Difficulty: medium | ✅ Correct: A

📖 Explanation: For real‑time games, low latency is critical, so a smaller buffer is preferred to minimize queuing delay. However, a smaller buffer limits the ability to absorb traffic bursts, potentially causing packet loss. Conversely, a larger buffer can handle bigger bursts but adds queuing delay, raising overall latency and harming gameplay responsiveness.

🔗 Related Topics (MCQs)