2

I need to limit the minimum bandwith from an IP to specific services/ports, by dropping all the packets that will not satisfy that minimum rate.

I saw the attribute rate in the HTB class of the Linux tc traffic shaping tool should do this; is it the right tool or other tools are suggested (note that I'm working from a network tap running Linux)?

Lucap
  • 21
  • 2

1 Answers1

3

Yes it is the right tool.

In fact the traffic shaping is implemented on kernel level. tc is the userland interface tool to control it. It is part of the iproute2 package.

http://lartc.org/ has good documentation or see also references in How to do traffic shaping (rate limiting) with TC per OpenVPN client

rate in HTB classes is used to set the minimum desired speed to which to limit transmitted traffic.

Meaning the traffic should not be lower than the given rate (like a guaranteed rate). It can be higher depending on other parameters like burst and the configuration of the parent classes. But it does not drop anything if the actual transmission rate is lower than specified by the given rate parameter.

rda
  • 1,947
  • 1
  • 13
  • 22