Ada banyak cara untuk membuat shapper htb, anda bisa membuat secara manual dengan command tc
atau anda bisa mengunakan htb.init. Kebetulan saya menggunakan htb.init
Persiapan untuk config htb.init
Download htb.init
[root@probiotik iptables-1.2.9]#wget http://keihanna.dl.sourceforge.net/sourceforge/htbinit/htb.init-v0.8.4
[root@probiotik iptables-1.2.9]#mv htb.init-v0.8.4 /sbin/
[root@probiotik iptables-1.2.9]#chmod 755 htb.init-v0.8.4
Membuat config pada /etc/sysconfig
[root@probiotik iptables-1.2.9]#mkdir /etc/sysconfig/htb
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10.root
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:20.hanny
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:30.dedy
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth0-10:40.amek
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10.root
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:20.hanny
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:30.dedy
[root@probiotik iptables-1.2.9]#touch /etc/sysconfig/htb/eth1-10:40.amek
Isi dari masing-masing config htb adalah sebagai berikut:
|
eth0 |
eth0-10.root |
eth0-10:20.hanny |
eth0-10:30.dedy |
eth0-10:40.amek |
|
eth1 |
eth1-10.root |
eth1-10:20.hanny |
eth1-10:30.dedy |
eth1-10:40.amek |
Bila masih bertanya tanya apa yang dimaksud dgn RATE,QUANTUM,CEIL,LEAF,RULE,dll
anda dapat membaca pada file htb.init
[root@probiotik iptables-1.2.9]#vi /sbin/htb.init-v0.8.4
atau lihat http://www.docum.org/stef.coene/qos/faq/cache/29.html
Jalankan htb.init
Karena command tc (Trafic Control) terdapat kekurangan, maka anda dapat mengambil patch http://www.rsds.or.id/linux/source/tc
[root@probiotik iptables-1.2.9]#wget http://www.rsds.or.id/linux/source/tc
[root@probiotik iptables-1.2.9]#cp tc /sbin/
[root@probiotik iptables-1.2.9]#cp tc /bin/
[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4
Usage: htb.init-v0.8.4 {start|compile|stop|restart|timecheck|list|stats}
[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 compile
[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 start
Lihat pesan pada log
[root@probiotik iptables-1.2.9]#tail -f /var/log/messages
Nov11 00:58:40 probiotik kernel: HTB init, kernel part version 3.12
Cek pada list module linux anda
[root@probiotik iptables-1.2.9]#lsmod
cls_route 4176 0 (unused)
cls_u32 4752 6
cls_fw 2496 0 (unused)
sch_sfq 3760 6 (unused)
sch_htb 18768 2
Bila anda sudah bosan dengan htb ![]()
[root@probiotik iptables-1.2.9]#/sbin/htb.init-v0.8.4 stop
Agar bisa autorun saat restart, tambahkan script pada rc.local
[root@probiotik iptables-1.2.9]#echo /sbin/htb.init-v0.8.4 start > /etc/rc.local