Traffic control and QoS: tc and queueing disciplines
You limit bandwidth with tc, build priority classes, emulate delay and loss, and protect sensitive traffic such as voice calls at busy times.
Level 401 · 15 lessons · 12 practice labs
Lessons
Queues
- Why QoS: bufferbloat and priority
- Queueing disciplines: pfifo, fq_codel
- Delay, loss and jitter with netem
- Short task: emulate a remote branch link in the lab
Shaping
- Rate limiting with TBF
- HTB classes and bandwidth sharing
- Classifying with tc filters and marks
- Limiting inbound traffic: ingress and IFB
- Short task: stop backup traffic from choking working hours
End-to-end QoS
- Marking traffic with DSCP
- Prioritising voice and video
- Smart queue management with CAKE
- Measuring the effect of QoS
- Short task: protect the call centre’s voice quality
Wrap-up
- Capstone: an end-to-end QoS policy for a branch link
Practice labs
- A satellite link for a ship’s office: Emulate the satellite link of the office on a Saltmarsh Fisheries vessel with the given high delay and loss using netem, and confirm the values with ping statistics.
- How does the app behave on a bad link?: Try Caravan Travel’s booking app under rising delay and loss, measure the point where it becomes unusable and report it in a short table.
- Everything freezes when a download starts: Measure latency exploding during a large download, change the queueing discipline to fq_codel, and compare latency under load in a before-and-after graph.
- Rate-limit the test server: Limit a server’s outbound traffic to a given rate with TBF, and show the limit holding with an iperf3 measurement.
- Updates slow down card payments: Give software updates a limited HTB share on Piril Bakery’s narrow link, prioritise payment-terminal traffic and measure its response time with both running at once.
- Limit inbound traffic too: Set an inbound rate limit with IFB for Silverwater Municipality’s guest network, measure with two clients that the limit is shared fairly per client, and make the rules persistent.
- Mark the voice traffic: Mark voice traffic with the right DSCP value using nftables, and show the mark in the packets with tcpdump.
- Voice packets land in the wrong class: Use class counters to find why tc filters send voice traffic to a low-priority class, fix the filter and show the right class filling.
- Video freezes in remote classes: Separate and prioritise video-class traffic on Selvi Schools’ narrow link, measure the stream’s delay and loss under simultaneous file uploads, and meet the given targets.
- A better link in one line: Apply CAKE to the branch link and show latency under load dropping with before-and-after measurements.
- Does the QoS actually work?: Measure an existing QoS policy’s effect by running the same load scenario with and without it, and compare the results in a short report.
- The inherited QoS works backwards: Find the class, ceiling and filter mistakes that invert priorities in the tc setup inherited from a Tulip Pharmacy branch, fix them and measure against targets with prescription, voice and backup traffic running together.
About this course
You limit bandwidth with tc, build priority classes, emulate delay and loss, and protect sensitive traffic such as voice calls at busy times.
What you will learn
- Queues
- Shaping
- End-to-end QoS
- Wrap-up
Prerequisites
You should have practised the topics of the same path up to level 301.
Lab environment
Lessons run in your own Kali Linux terminal in the browser, connected to a private lab network. Nothing to install.
Frequently asked questions
- Is this course right for my level?
- The course is at level 401; it assumes you know the topics of the lower-level courses.
- Is there anything to install?
- No. Every lesson runs in your own lab environment that opens in the browser.
- How do lessons work?
- Each lesson has 8 to 10 steps and a short quiz. Early steps show the command to type, later steps give less help; if two attempts fail, the solution opens.
- Can I try it for free?
- Yes. The first three lessons of every course are free.