When you are setting a QoS with TC with a shellscript, the syntax is not easy to read. This tool tries to give a better way to interact with TC.
- python 2.7 or 3.4 (it certainly works with prior versions, just not tested)
Copy the default configuration file config.py.default
as config.py
.
Please do not modify or remove config.py.default
if you cloned this
repository. Always do your modifications in config.py. Then modify
config.py
for your setup (documentation is inside).
QoS rules are is the rules
folder. It doesn't exist from scratch, but you can
copy the rules.example
as rules
, where there are some examples
corresponding to my actual setup.
The source file tools.py
contains all the useful functions for rules, which
are documented with docstrings. built_in_classes
contains different classes
you can inherit. Take a look to the examples to see how it works.
A function apply_rules()
has been created in rules.example/__init__.py
to
apply all the rules once.
When your rules are created, just run qos.py
:
python3 qos.py [-h] [-d] {start,stop,show} ...
Script to set, show or delete QoS rules with TC
positional arguments:
{start,stop,show}
start set QoS rules
stop Remove all QoS rules
show Show QoS rules
optional arguments:
-h, --help show this help message and exit
-d, --debug Set the debug level
- https://wiki.linuxwall.info/doku.php/en:ressources:dossiers:networking:traffic_control : General explanations about QoS and tc
- https://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm : Details about htb
- https://joekane.eu/cisco-rate-limit-burst-explained/ : Details about burst and cburst and how to define it.
Tool under the BSD license. Do not hesitate to report bugs, ask me some questions or do some pull request if you want to !