Rabu, 03 Desember 2008

Install Management Bandwidth dengan HTB

# tar -zxvf htb_util-0.2.3_cv-7.tar.gz
# tar -xvf htb_util-0.2.3_cv-7.tar
# cd htb_util-0.2.3_cv-7
# make
# make install
# cd docs/
# cp simple.cfg /etc/limit.cfg
# vi /etc/limit.cfg
# /sbin/q_parser eth0 1128 1128 /etc/limit.cfg > /etc/rc.d/limit.sh
# chmod +x /etc/rc.d/limit.sh
# /etc/rc.d/limit.sh
# cd /bin
# touch tukar
# vi tukar

===============================================================
/sbin/q_parser eth0 1128 1128 /etc/limit.cfg > /etc/rc.d/limit.sh
/bin/chmod +x /etc/rc.d/limit.sh
/etc/rc.d/limit.sh
===============================================================

# chmod +x tukar
# tukar
# touch lihat
# vi lihat

=====================================
/sbin/q_show -i eth0 -f /etc/limit.cfg
=====================================

# chmod +x lihat
# lihat
contoh isi /etc/limit.cfg
==========================================
class Server {
bandwidth 1128;
limit 1128;
burst 2;
priority 1;
client 1_Server_1 {
bandwidth 384;
limit 1024;
burst 2;
priority 1;
dst {
192.168.1.2/32;
};
};

client 2_Server_2 {
bandwidth 384;
limit 1024;
burst 2;
priority 1;
dst {
192.168.1.103/32;
};
};
client 3_Server_3 {
bandwidth 256;
limit 512;
burst 2;
priority 1;
dst {
192.168.1.104/32;
};
};

Class User {
bandwidth 256;
limit 256;
burst 2;
priority 1;
client 1_User_1 {
bandwidth 64;
limit 128;
burst 2;
priority 1;
dst {
192.168.1.4/32;
};
};

client 2_User_2 {
bandwidth 64;
limit 128;
burst 2;
priority 1;
dst {
192.168.1.5/32;
};
};
client 3_User_3 {
bandwidth 64;
limit 128;
burst 2;
priority 1;
dst {
192.168.1.6/32;
};
};

};

class default { bandwidth 2; };

# end of config

Tidak ada komentar: