Monday, August 25, 2008

How To Integrate HTB-tools with Squid + ZPH (ver. 2)

This section about howto integrate squid + zph + htb-tools on my slackware 12.0. What different ver.1 and ver.2 ?
User can't using q_show to monitoring cache hit from squid in ver.1
User will be seeing Cache_HIT as additional class in q_show result for ver.2

Here the steps:

Assumption : User already have squid + zph + htb-tools installed.
squid-2.7Stable4 (zph_local 0x30 included)
HTB-tools-0.3.0a

1. I've replace original /sbin/q_parser with my new q_parser
2. Inserting several lines inside eth1-qos.conf (interface for LAN)
#---this lines put on the top -----
class Cache_HIT {
bandwidth 10000;
limit 10000;
burst 2;
priority 1;
};

# --- LAN Rules ---
# make your own rule


3. Generate your config with q_parser and apply on system
root@dianseh# q_parser eth1 100000 100000 /etc/htb/eth1-qos.conf > /usr/local/bin/eth1-qos.sh
root@dianseh# chmod +x /usr/local/bin/eth1-qos.sh
root@dianseh# /usr/local/bin/eth1-qos.sh

or

root@dianseh# /sbin/htb eth1 stop
root@dianseh# /sbin/htb eth1 start

5. Monitoring q_show
root@dianseh# /sbin/htb eth1 stats



the picture shown users who get HIT from squid have 6mbps of 10mbps guarantee.


Note :
Tested on Slackware 12.0 and working properly. What about you?

references :
1.http://www.vivaolinux.com.br/perguntas/
2.http://google.com

Thanks to Mr'Ipung who asked me todo.


2 comments:

Anonymous said...

Mas boleh minta contoh setingan HTB-tools nya?
Buat referensi.

Terima kasih sebelum dan sesudahnya.

Dianse H said...

Boleh saja, btw yang dimaksud setingan yang mana? eth-qos.conf atau yang mana yah?