I have created a Linux Router using centos 5.5 using netfilter (IPTABLES). My router is a three-leg router. one leg for ISP connection, the other leg for my LAN and the last leg for my DMZ.
The router is working fine as I expected but now I have another requirement. Due to my limited bandwidth (1Mbps) I need a way to shape it. The idea is to give a dedicated 512Kbps of bandwidth for my web server and the other half for my LAN. The LAN should not exceed the 512Kbps bandwidth.
I have searched google and found 'tc' and 'htb' for bandwidth shaping but most of the documentations I found only pertains to 2.2/2.4 kernels and I am now using CentOS release 5.5 (Final) with kernel 2.6.18-164.11.1.el5
First thing is, do I have to patch my kernel to support traffic shaping/QoS or is it already supported?
I have visited these two websites - http://luxik.cdi.cz/~devik/qos/htb/
and many other websites but there are no documentations whatsoever on how to install tc and/or htb on 2.6 kernels.
As I understand, the 'tc' is included on the 'iproute2' package. By running 'rpm -ql iproute' I confirmed that 'tc' is installed in '/sbin/tc' but how about 'htb'? There is also a man page for tc-htb in '/usr/share/man/man8/tc-htb.8.gz', is 'htb' already included with 'tc' or do I have to install a package like 'htb-tools' as I've seen on the net?
Also, is tc and htb the most ideal way to shape bandwidth through a linux machine?
Thanks in advance!