LINUX BANDWIDTH CONTROL WITH CBQ

Posted: July 8, 2007 in LINUX

LINUX BANDWIDTH CONTROL WITH CBQ  Think your friend has a Linux box which is running Red Hat 8.0 or 9.0 and the CBQ packege is installed there. If CBQ is not present, ask him to install it from the Linux CD. I am also guessing that, His external NIC is eth0 and internal NIC is eth1. After installation, ask your friend to edit the Example configuration file of CBQ.
#cd /etc/sysconfig/cbq
There he will find a file named cbq_0000.example.
Ask him to do the followings…
#cp cbq_0000.example cbq_0032.clients
#cp cbq_0000.example cbq_0032.cybercafe
#vi cbq_0032.cybercafe 

Then ask him to edit the file like this.. DEVICE=eth1,10Mbit,1Mbit
RATE=32Kbit
WEIGHT=3Kbit
PRIO=5
RULE=192.168.1.11
RULE=192.168.1.12
RULE=192.168.1.13
……………………….
……………………….
……………………….
RULE=192.168.1.26
Done for the Cyber cafe

Next for the Clients..
#vi cbq_0032.clients

Edit the file like this..

DEVICE=eth1,10Mbit,1Mbit
RATE=32Kbit
WEIGHT=3Kbit
PRIO=5
RULE=192.168.1.101
RULE=192.168.1.102
RULE=192.168.1.103
……………………….
……………………….
……………………….
RULE=192.168.1.110

Done.

If everything goes ok, then exicute the command..
#cbq stop
#cbq start

And if you want to Dedicate 2 or 3 kbps to any IP, just make your own configuration file.

Its too easy. 🙂

Advertisements
Comments

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s