QoS Policer and Shaper Practice
Free QoS practice for CCNP ENCOR: work out Bc, Tc and CIR for a policer or a shaper, then mark packets conform, exceed or violate as a token bucket policer would. Check my answer names the slip, such as Bc in bytes read as bits or tokens past Bc kept.
Values are made up for practice. Packet sizes are the bytes the policer counts. Real platforms may adjust Bc slightly in hardware; the configured values are used here.
Practise the exam
Cisco's ENCOR 350-401 v1.2 exam topics list "1.4 Interpret QoS configurations". Start with the free real exam questions, then get the full pack.
Token bucket FAQ
How do you calculate Tc from the CIR and Bc?
Cisco defines a token bucket by a burst size, a mean rate and a time interval (Tc), related by "mean rate = burst size / time interval". So Tc = Bc ÷ CIR, with Bc in bits and the CIR in bits per second. For police cir 10m bc 15000, Bc is 15,000 bytes, which is 120,000 bits, and 120,000 ÷ 10,000,000 = 0.012 s, or 12 ms.
Is Bc in bits or bytes?
It depends on the tool. Cisco's overview says: "For a shaper, such as GTS, it specifies bits per burst; for a policer, such as CAR, it specifies bytes per burst". The IOS XE 17 policing guide shows the same in its output, for example "cir 10000000 bps, bc 312500 bytes". So for a policer, multiply Bc by 8 before you divide by the CIR.
How does a two-colour policer decide each packet?
In the IOS XE 17 guide, tokens are continuously replenished at the CIR and the bucket holds at most Bc; tokens past that are lost. A packet that finds enough tokens conforms, and its length is taken from the bucket. A packet that does not exceeds, and "the number of tokens in the bucket are unchanged".
How does the Be bucket fill in a three-colour policer?
Both buckets start full. Tokens still arrive at the CIR, and only when the conform bucket is full do they "overflow into the excess token bucket"; when both are full, further tokens are lost. A packet the conform bucket cannot cover exceeds if the excess bucket can, taking tokens from Be only. If neither can, it violates and neither bucket changes.
Does a packet conform when the tokens exactly equal its size?
Yes. Cisco's rule is that the bucket must hold enough tokens to cover the packet, and RFC 2697 writes the same test as "Tc(t)-B >= 0": a packet the same size as the tokens left is green, or conforming.
How does IOS work out Bc for police cir percent?
With a percent CIR, Bc and Be are given in ms. IOS turns the percent into a CIR in bps from the interface speed, then turns the time into bytes. Cisco's example: police cir percent 10 bc 10 ms on a 1 Gbps interface gives a CIR of 100 Mbps and Bc of 125,000 bytes (100 Mbps × 10 ms ÷ 8). On a 155 Mbps POS OC3 interface the same policy gives 15.5 Mbps and 19,375 bytes.
What if Bc is not configured?
The IOS XE 17 policing guide says IOS then sets a default of 250 ms of data at the rate, for example 3,125,000 bytes for a 100 Mbps CIR. Defaults can differ by platform and release, so every problem here states Bc. The same guide notes that hardware may adjust rate and burst slightly, aiming to stay within 1% of what you configure.
How is a shaper different from a policer?
Both use a token bucket. Cisco says a policer typically drops traffic or changes its marking, while a shaper delays excess traffic in a buffer or queue. When there are not enough tokens, the packet waits for them with a shaper, or is discarded or marked down with a policer. The packet drill here covers policers only.
Is this on the CCNP ENCOR exam?
The Cisco ENCOR 350-401 v1.2 exam topics list "1.4 Interpret QoS configurations". The topics do not name token buckets, Bc or Tc, so check what your course covers.
Sources
- Cisco, QoS Configuration Guide, Cisco IOS XE: Policing and Shaping Overview, updated April 24, 2026: the token bucket (burst size, mean rate or CIR, time interval Tc), "mean rate = burst size / time interval", a shaper's Bc in bits and a policer's in bytes, and how a shaper and a policer treat a packet without enough tokens.
- Cisco, Quality of Service Configuration Guide, Cisco IOS XE 17.x: QoS Packet Policing, updated March 11, 2022: the single-rate two-colour and three-colour token buckets (refill at the CIR, depth Bc, both buckets full at the start, overflow into Be, which bucket each colour takes tokens from), the police cir 10m bc 15000 example, percent-based Bc in ms, the 250 ms default and hardware adjustment, and the police command syntax.
- IETF, RFC 2697, A Single Rate Three Color Marker, September 1999: both buckets full at time 0, and the test Tc(t)-B >= 0 for a green packet.
- Cisco, Implementing Cisco Enterprise Network Core Technologies v1.2 (350-401) exam topics: "1.4 Interpret QoS configurations".
- Checked 22 November 2026. The tool's own approach: every value is made up, with the CIR a multiple of 8,000 bps so tokens arrive in whole bytes per ms, and the packets arrive at whole milliseconds. The engine reproduces Cisco's worked examples above, and an independent checker, which adds tokens one at a time as RFC 2697 describes, agreed with it on 40,000 generated problems.
Checked 22 November 2026 against Cisco's IOS XE QoS configuration guides and RFC 2697.
- DrillOSPF practicePick the DR and BDR, find the router ID and work out the lowest cost path.
- DrillEIGRP practiceWork out the classic metric, pick the successor and feasible successors, and apply variance.
- DrillCisco AP to WLC join order practicePick the WLC an access point joins on AireOS and after a Catalyst 9800 failover.