Skip to content

Lab 07-04 · Burst: fast for a few seconds, limited after

MTCNA

Module 7 · QoS. Official course slides 297–301: burst, its three parameters (burst limit, burst threshold, burst time) and the LAB "Burst" (slides 300–301).

Open a web page on a limited connection and you notice it: every click feels sluggish. But a web page is small. If the router let you go much faster for just a couple of seconds, the page would appear instantly, and a big download (which runs for minutes) would still be held at the normal limit. Mobile operators and ISPs use exactly this trick to make cheap plans feel fast.

That trick is called burst. Today you add it to the laptop's queue from Lab 07-01, then measure, second by second, when the router opens the gate and when it closes it again.

What you will learn

  • Explain what a burst is and why it helps web browsing but not big downloads
  • Configure burst-limit, burst-threshold and burst-time on a simple queue
  • Understand that burst-time is the averaging window, not how long the burst lasts
  • Predict how long a burst lasts from the three values, and check it with a per-second measurement
  • See why a threshold above max-limit makes the burst come back again and again

The idea: a green wave for short trips

A burst lets a queue go above its max-limit, up to a burst-limit, for as long as the client's average speed over the last burst-time seconds stays below the burst-threshold.

Back to the motorway. Your normal speed limit is low. But the road has a "green wave": if you have not been driving much lately, the gates open wide and you can sprint. Once your recent average gets too high, the gates close and you are back to the normal limit. Short trips (web pages) are all sprint; long trips (downloads) are mostly normal speed.

Parameter Course definition (slide 299) Lab value (download)
max-limit The normal maximum (Lab 07-01) 256k
burst-limit Maximum speed during the burst 1M
burst-threshold When the average rate goes above it, burst switches off; below it, burst switches on 512k
burst-time The time window (seconds) over which the average is calculated. This is not the burst's duration 16s

Burst-time is not the burst's duration

It is the most common mistake on the exam. With burst-time=16s the burst in this lab lasts about 8 seconds, not 16. Burst-time is only the length of the "memory" the router uses to calculate your recent average.

How long does the burst last?

Starting from idle (average = 0), the client sprints at the burst-limit. The average over the last 16 seconds climbs, and the burst stops when it reaches the threshold:

burst duration ≈ burst-threshold × burst-time ÷ burst-limit
               ≈ 512k × 16 s ÷ 1M  ≈  8 seconds

In 8 seconds at 1 Mbps the client moves about 8 Mbit = 1 MB, so a web page of a few hundred kilobytes arrives entirely inside the burst. A 2 MiB file does not.

flowchart LR
    A["<b>Idle</b><br>average = 0"] -- "client starts<br>downloading" --> B["<b>Burst on</b><br>up to burst-limit 1M"]
    B -- "16 s average<br>reaches threshold 512k<br>(≈ 8 s)" --> C["<b>Burst off</b><br>back to max-limit 256k"]
    C -- "16 s average falls<br>below threshold 512k" --> B

Why 1M/512k and not the slides' 4M/2M?

The course LAB uses burst-limit 4M, threshold 2M, time 16s. The virtual routers run the free CHR licence, which caps each port at about 1 Mbps, so a 4M burst could never be seen. We kept the ratios (threshold = half the burst-limit, same burst-time), so the burst still lasts about 8 seconds.

The scenario

The lab starts where Lab 07-01 ended: FastTrack disabled and the queue laptop (target=192.168.88.200/32 max-limit=128k/256k), with no burst.

flowchart LR
    INET["<b>internet</b><br>198.51.100.10<br>www.mikrotik.com + iperf3"]
    CAP["<b>class-ap</b><br>10.0.0.1 · 198.51.100.1"]
    subgraph R1["r1 · your router"]
        WAN["ether2 (WAN)<br>10.0.0.x"]
        BR["<b>bridge1</b><br>192.168.88.1/24<br>queue laptop"]
    end
    PC1["<b>pc1</b> · laptop<br>192.168.88.200"]
    PC2["<b>pc2</b><br>192.168.88.201"]
    INET ---|"198.51.100.0/24"| CAP
    CAP ---|"10.0.0.0/24"| WAN
    WAN --- BR
    BR ---|"ether3"| PC1
    BR ---|"ether4"| PC2
Node Role Address
internet Web server (www.mikrotik.com, file routeros.npk of 2 MiB) and iperf3 198.51.100.10/24
class-ap Class gateway, DNS, NAT 10.0.0.1/24, 198.51.100.1/24
r1 Your router: solution of Lab 07-01 WAN by DHCP, LAN 192.168.88.1/24
pc1 Your laptop, the queue's target 192.168.88.200
pc2 Another device (not used in this lab) 192.168.88.201

Why ether2 and not ether1?

On a real hAP the Internet port is ether1. In the virtual lab ether1 is reserved for the lab itself (containerlab uses it to manage the router), so the Internet port is ether2 and the LAN ports start at ether3. Never touch ether1 in these labs.

Start the lab

Download the lab files and unzip them: 07-04-burst.zip. Open a terminal inside the 07-04-burst folder.

sudo containerlab deploy -t topology.clab.yml

Give RouterOS about two minutes to boot. Then:

ssh admin@clab-mtcna-07-04-r1            # password: admin
docker exec -it clab-mtcna-07-04-pc1 bash

./check.sh (with CLAB_EXEC="docker exec") tells you at any moment what is already solved. It waits 20 seconds in silence before measuring, so that the burst is "recharged".

Step 1 · Measure second by second, without burst

iperf3 prints one line per second, which is exactly what you need to see a burst. On pc1:

iperf3 -c 198.51.100.10 -R -t 20 -l 8K

(-l 8K makes iperf3 read in small pieces, so the per-second numbers are smooth.) Expected: every line around 200–260 Kbits/sec, from the first second to the last. And the course's "RouterOS download":

curl -o /dev/null -w "%{time_total} s\n" http://www.mikrotik.com/routeros.npk

Expected: about 67 s (2 MiB = 16.8 Mbit, ÷ 256k ≈ 65 s).

Done when you have the per-second numbers and the curl time in your report.

Step 2 · Add the burst

The course: modify the queue created in the previous LAB with burst limit, threshold and time, for upload and download.

WinBox: Queues → Simple Queues, double-click laptop, open the Burst section (slide 298): Burst Limit 1M / 1M, Burst Threshold 512k / 512k, Burst Time 16 / 16. OK.

/queue simple set laptop burst-limit=1M/1M burst-threshold=512k/512k burst-time=16s/16s
/queue simple print

Expected: max-limit=128k/256k burst-limit=1M/1M burst-threshold=512k/512k burst-time=16s/16s.

Check yourself

  1. Using the formula, how long should the first burst last? Show the calculation.

Done when the queue shows the three burst values.

Step 3 · Watch the burst switch on and off

Wait 20 seconds doing nothing (so your 16-second average drops to zero), then on pc1:

iperf3 -c 198.51.100.10 -R -t 40 -l 8K

At the same time, on r1, you can follow it live with Torch:

/tool torch interface=bridge1 src-address=192.168.88.200/32

Expected, from our own run (Kbits/sec per second):

1048 983 983 983 983 983 983 983 655 | 197 262 262 131 393 262 197 262 262 262 197 | 983 983 984 982 983 983 | 393 262 ...
<----------- burst, about 8 s ---------> <------------- max-limit 256k, about 11 s ----------> <--- burst again --->
  1. About 8 seconds at ~1 Mbps: the burst, just as the formula predicted.
  2. Back to ~256k: the 16-second average reached 512k, the gate closed.
  3. The burst comes back: as the fast seconds slide out of the 16-second window, the average falls below 512k and the gate opens again.

Why does the burst keep coming back?

Our threshold (512k) is above the max-limit (256k). Even at full normal speed the average eventually drops under the threshold, so the burst returns again and again during a long download. That is what the course's values (threshold 2M, max-limit 256k) do too. If you want a client downloading non-stop to get the burst only once at the start, put the threshold below the max-limit: then even at full normal speed the average stays above the threshold. We tried it in this lab with burst-threshold=192k/192k: one burst of about 4 seconds, then a steady 256k until the end of a 40-second download.

Check yourself

  1. Copy your per-second numbers and mark where each burst starts and ends. How long was the first burst? How long was the pause?
  2. Why is the burst-time (16 s) not the same as the burst's duration (8 s)?

Done when you can see at least one burst and one return to ~256k.

Step 4 · Open the website and download RouterOS again

The course: open www.mikrotik.com and see how fast the page loads; download the latest RouterOS and watch the speed with Torch. Wait 20 seconds, then on pc1:

curl -w "page: %{time_total} s\n" http://www.mikrotik.com/
curl -o /dev/null -w "%{time_total} s, %{speed_download} bytes/s\n" http://www.mikrotik.com/routeros.npk

Expected: the page arrives instantly (it is tiny, fully inside a burst). The 2 MiB download took about 26 s in our test (about 82,000 bytes/s), instead of about 67 s without burst. Do the ÷8 check: 82,000 bytes/s × 8 ≈ 655 kbps on average, well above the 256k max-limit, because of the repeated bursts.

Check yourself

  1. A real home page is about 2–3 MB today. Would it load completely inside one of our bursts? Calculate it.
  2. Which value would you change so that a continuous download gets only one burst at the beginning?

Done when you have both curl results. Run ./check.sh: it must say lab mtcna-07-04 solved.

If something goes wrong

Symptom Likely cause Fix
No burst at all You did not wait: your 16 s average is still above the threshold Wait 20 s with no traffic and test again
No burst at all, even after waiting burst-limit not above max-limit, or values in the wrong direction /queue simple print; download is the second value of each pair
Burst only in upload, not download You set 1M/0 or similar burst-limit=1M/1M burst-threshold=512k/512k burst-time=16s/16s
Per-second numbers jump between 0 and 1048 iperf3 reads in big 128 KB blocks Add -l 8K
The burst is much shorter than 8 s Threshold too low or burst-time too short Check burst-threshold=512k/512k, burst-time=16s/16s

Clean up

sudo containerlab destroy -t topology.clab.yml --cleanup

Key takeaways

  • A burst lets a client exceed its max-limit, up to the burst-limit, while its recent average is low.
  • The average is calculated over burst-time seconds; the burst switches off when it passes burst-threshold.
  • Burst-time is not the burst's duration: here 16 s of window gave ~8 s of burst (512k × 16 ÷ 1M).
  • Bursts make short transfers (web pages) fast; long downloads end up near the normal limit.
  • A threshold above max-limit makes the burst return again and again during a long download.

Quick check

1. What does burst-time mean in a RouterOS queue?
  • The time window over which the average data rate is calculated
  • How long the burst lasts each time
  • How long the client must wait between two bursts
  • The maximum time a packet can stay in the queue

Burst-time is the averaging window. The burst's real duration depends on threshold, burst-time and burst-limit together: about threshold × burst-time ÷ burst-limit.

2. When is a burst allowed?
  • While the average rate over the burst-time stays below the burst-threshold
  • Whenever the client asks for more than its max-limit
  • Only during the first burst-time seconds after the router boots
  • While the current rate is below the burst-limit

The router compares the average rate of the last burst-time seconds with the burst-threshold: below it, burst is on; above it, burst is off.

3. max-limit 256k, burst-limit 1M, burst-threshold 512k, burst-time 16s. Starting from idle, about how long is the first burst?
  • About 8 seconds
  • About 16 seconds
  • About 2 seconds
  • About 64 seconds

512k × 16 s ÷ 1M ≈ 8 s. That is what the lab measured: about 8 seconds at ~1 Mbps before falling back to 256k.

4. Why does burst make web browsing feel faster but barely helps a 4 GB download?
  • A web page fits inside the first seconds of burst; a long download spends most of its time at the normal limit
  • Burst only applies to web traffic on port 80
  • Downloads use upload bandwidth, which has no burst
  • Web pages are compressed, so they do not count against the limit

A burst is a few seconds of extra speed. Small transfers finish inside it; a long transfer quickly pushes the average above the threshold and continues near the max-limit.

5. In the lab, a 2 MiB file took about 26 s with burst and 67 s without. Why did the burst help so much in this case?
  • The threshold is above max-limit, so the burst kept coming back during the download
  • The burst lasted the whole download because the file was small
  • curl downloads in parallel when burst is enabled
  • The max-limit was ignored once burst-limit was set

With threshold 512k > max-limit 256k, the 16-second average falls below the threshold even at full normal speed, so a new burst starts again and again. The measured average was about 655 kbps.

6. Which of these is the right way to read the slide's burst values 4M/2M/16s?
  • Sprint up to 4M while the 16-second average stays under 2M
  • Sprint at 4M for 16 seconds, then 2M forever
  • Sprint at 2M for 4 seconds every 16 seconds
  • Download 4 MB at 2 MB/s for 16 seconds

burst-limit 4M is the sprint speed, burst-threshold 2M is the average that switches it off, and burst-time 16s is the averaging window. Note the units: M means megabits per second, not megabytes.

Next, you will give every client on the LAN the same limit with a single rule: PCQ.