0

I am new to TC / tc (traffic control), but I need to limit the speed of incoming/outgoing network traffic for a docker container.

I read a lot, but still I have a lot of confusion on what is needed.

Some post mention that egress and ingress speeds must be limited separately, some don't..

Some posts use htb, some tbf ...

Can someone state the backbone of setting these limits, using TC?

  • How should I order the classes?
  • What are the steps that I should take care of?
  • What is the best type of qdisc to use?
1
  • Unfortunately, questions about host/server/VM configurations are off-topic here. You could try to ask this question on Super User.
    – Ron Maupin
    Jun 1, 2021 at 16:56

1 Answer 1

1

htb, tbf, cbq, etc are just type of queues. They are different in the way they proceed the traffic. In the grand scheme of things, you should understand the basic concept is as follow (I hope I get this right as it's been about 15+ years since last time I've used TC ;)):

  • queueing is a method of handling or avoiding congestion
  • queueing always happens on egress
  • queueing can be achieved using different algorithms, which will give you different way of handling the traffic / preferring one over another, giving more fairness, etc
  • classes are added to queues. One queue can have multiple classes.
  • filters are used to select traffic / put traffic in classes.

To your questions now:

How should I order the classes?

Typically order classes hierarchically. You have a root class and then you attach this class to a queue. You can then attach other child classes to the root class and they will all follow the same queueing discipline.

What are the steps that I should take care of?

  • create queue
  • add a root class & associate it with the queue
  • add child classes to the root class
  • add filters to put traffic to classes

What is the best type of qdisc to use?

This depends entirely on the type of traffic you're looking to queue. How aggressive do you want to be with it, how strict, fairness, etc, etc. You should read about the different queues disciplines and how one handles the traffic compared to another. There used to be a really good website - lartc.org, but I just tried opening it and ... it doesn't seem to be up & running anymore.

Check This which can help you.

Also check this one http://intronetworks.cs.luc.edu/1/html/queuing.html

1
  • what about the handling of ingress / egress traffic?
    – gai-jin
    Jun 1, 2021 at 13:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.