QoS on GNU/Linux with tc

Intro

On GNU/Linux systems, Quality of service can be set and managed with the tc command. According to wikipedia tc (traffic control) is the user-space utility program used to configure the Linux kernel packet scheduler. We will see in this article, some simples examples to show how can we use it.

Examples

Reinit rules

root@host:~# ip link set dev ifb0 down
root@host:~# tc qdisc del dev eth0 root
root@host:~# tc qdisc del dev ifb0 root
root@host:~# tc qdisc del dev eth0 ingress
root@host:~# tc qdisc del dev ifb0 ingress

Limit download (or Input) rate

root@host:~# modprobe ifb numifbs=1
root@host:~# ip link set dev ifb0 up
root@host:~# tc qdisc add dev eth0 ingress handle ffff:
root@host:~# tc filter add dev eth0 parent ffff: protocol all u32 match u32 0 0 action mirred egress redirect dev ifb0
root@host:~# tc qdisc add dev ifb0 root handle 2: htb default 1
root@host:~# tc class add dev ifb0 parent 2: classid 2:1 htb rate 8000kbit
Licence Creative Commons
This website http://shebangthedolphins.net is licensed to the public under a licence Creative Commons Attribution licence.
Contact :