Apa ya HTB itu
Hierarchichal Token Bucket.
Suatu jumlah yang berubah-ubah dari token bucket diatur di (dalam) suatu hirarki.
How to Installasi HTB dan Kompile Kernel3.1 Installasi HTB
Software Yang dibutuhkan :
• HTB Script
• kernel harus dukung HTB; kernel 2.4.20 ke atas
HTB Script dapat di download dari http://sourceforge.net/projects/htbinit/ .
HTB.INIT adalah suatu shell script yg berasal dari CBQ.INIT yang mempermudah pengaturan traffic control HTB-BASED di Linux. HTB ( Hierachical Token Bucket) adalah suatu disiplin antrian baru yang (mana) mencoba untuk memperbaiki kelemahan dari implementasi CBQ.
Installasinya mudah dengan hanya men-download file tersebut dan anda letakkan di file system init /etc/init.d/htb.init, perintah lengkapnya sebagai berikut :
shell> wget http://heanet.dl.sourceforge.net/sourceforge/htbinit/htb.init-v0.8.5
shell> cp htb.init-v0.8.5 /etc/init.d/htb.init
shell> chmod 755 /etc/init.d/htb.init
shell> mkdir /etc/sysconfig/htb
shell> chown root:root -R /etc/sysconfig/htb
Kompile Kernel >bagian QOS and/or fair queueing
# QoS and/or fair queueing
#
CONFIG_NET_SCHED=y
CONFIG_NET_SCH_CLK_JIFFIES=y
# CONFIG_NET_SCH_CLK_GETTIMEOFDAY is not set
# CONFIG_NET_SCH_CLK_CPU is not set
CONFIG_NET_SCH_CBQ=m
CONFIG_NET_SCH_HTB=m
CONFIG_NET_SCH_HFSC=m
CONFIG_NET_SCH_ATM=m
CONFIG_NET_SCH_PRIO=m
CONFIG_NET_SCH_RED=m
CONFIG_NET_SCH_SFQ=m
CONFIG_NET_SCH_TEQL=m
CONFIG_NET_SCH_TBF=m
CONFIG_NET_SCH_GRED=m
CONFIG_NET_SCH_DSMARK=m
CONFIG_NET_SCH_NETEM=m
CONFIG_NET_SCH_INGRESS=m
CONFIG_NET_QOS=y
CONFIG_NET_ESTIMATOR=y
CONFIG_NET_CLS=y
CONFIG_NET_CLS_TCINDEX=m
CONFIG_NET_CLS_ROUTE4=m
CONFIG_NET_CLS_ROUTE=y
CONFIG_NET_CLS_FW=m
CONFIG_NET_CLS_U32=m
CONFIG_CLS_U32_PERF=y
CONFIG_NET_CLS_IND=y
CONFIG_NET_CLS_RSVP=m
CONFIG_NET_CLS_RSVP6=m
# CONFIG_NET_CLS_ACT is not set
CONFIG_NET_CLS_POLICE=y
shell> make menuconfig
shell> make
shell> make modules_install install
Configurasi HTB
make sure (pastikan anda) sudah membuat direktori /etc/sysconfig/htb (dijelaskan secara detail di section berikutnya) dan file exec htb di /etc/init.d/htb.init .Perhatikan gambar berikut :
4.1 Membuat file konfigurasi HTB
4.1.1 Konfigurasi file downlink (1:1)
shell>mkdir /etc/sysconfig/htb
shell>touch /etc/sysconfig/htb/eth1
shell>touch /etc/sysconfig/htb/eth1-10.aa-dl
shell>touch /etc/sysconfig/htb/eth1-20.andi-dl
shell>touch /etc/sysconfig/htb/eth1-30.adi-dl
shell>touch /etc/sysconfig/htb/eth1-40.masterpop3-dl
eth1 eth1-10.aa-dl eth1-20.andi-dl eth1-30.adi-dl eth1-40.masterpop3-dl
R2Q=100 RATE=64Kbit
QUANTUM=1500
LEAF=sfq
RULE=10.10.10.2 RATE=64Kbit
QUANTUM=1500
LEAF=sfq
RULE=10.10.10.3 RATE=64Kbit
QUANTUM=1500
LEAF=sfq
RULE=10.10.10.4 RATE=64Kbit
QUANTUM=1500
LEAF=sfq
RULE=10.10.10.5
Konfigurasi file uplink (1:4)
shell>touch /etc/sysconfig/htb/eth0
shell>touch /etc/sysconfig/htb/eth0-10
shell>touch /etc/sysconfig/htb/eth0-10:20.aa-ul
shell>touch /etc/sysconfig/htb/eth0-10:30.andi-ul
shell>touch /etc/sysconfig/htb/eth0-10:40.adi-ul
shell>touch /etc/sysconfig/htb/eth0-10:50.masterpop3-ul
eth0 eth0-10 eth0-10:20.aa-ul eth1-10:30.andi-ul eth1-30.adi-ul eth1-40.masterpop3-ul
R2Q=100 RATE=64Kbit
QUANTUM=1500 RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=10.10.10.2, RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=10.10.10.3, RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=10.10.10.4, RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
RULE=10.10.10.5,
catatan: untuk konfigurasi file uplink, jika :Linux BOX anda di setting sebagai Router, maka anda akan memerlukan penandaan (MARK), yg di set mangling di dalam firewall iptables.Contoh :
ip : 10.10.10.2 akan di MARK=2 maka :
/sbin/iptables -t mangle -A PREROUTING -i eth1 -s 10.10.10.2 -d ! 10.10.10.0/24 -j MARK --set-mark 0x2
dan di tulis di file konfig uplinknya :
#eth0-10:20.aa-ul
RATE=16Kbit
QUANTUM=1500
CEIL=64Kbit
LEAF=sfq
MARK=2
Tidak ada komentar:
Posting Komentar