> The documentation is fantastic, but it is so recondite and abstruse as to
> be of absolutely no value whatsoever (just kidding guys!). Actually, I
> could hardly make head nor tail of it (perhaps a real networking guru
> could), and so I make use of cbq, which is a script that implements the
> commands that you read about in the HOWTO and which you configure with a
> readable text file.

Actually, there's a lot of theory behind CBQ, which comes in a several page
document that's really heavy reading.  The cbq.init script below will help a
lot, but in the end, you've got to know what it does to be able to understand
CBQ more fully.

> 
> Here's an example of a cbq config file. I've included the comments so you 
> get a better idea of what it does:
> 
> --begin file
> # This is an example of using CBQ (Class Based Queueing) and policy-based
> # filter for building smart ethernet shapers. All CBQ parameters are
> # correct only for ETHERNET (eth0,1,2..) linux interfaces. It works for
> # ARCNET too (just set bandwidth parameter to 2Mbit). It was tested
> # on 2.1.125-2.1.129 linux kernels (KSI linux, Nostromo version) and 
> # ip-route utility by A.Kuznetsov (iproute2-ss981101 version). 
> # You can download ip-route from ftp://ftp.inr.ac.ru/ip-routing or
> # get iproute2*.rpm (compiled with glibc) from ftp.ksi-linux.com.
> # 
> # 
> # HOW IT WORKS
> # 
> # Each shaper must be described by config file in $CBQ_PATH
> # (/etc/sysconfig/cbq/) directory - one config file for each CBQ shaper.
> # 
> # Some words about config file name:
> # Each shaper has its personal ID - two byte HEX number. Really ID is 
> # CBQ class.
> # So, filename looks like:
> # 
> # cbq-1280.My_first_shaper
> # ^^^ ^^^  ^^^^^^^^^^^^^
> #  |  |            |______ Shaper name - any word
> #  |  |___________________ ID (0000-FFFF), let ID looks like shaper's rate
> #  |______________________ Filename must begin from "cbq-" 
> # 
> # 
> # Config file describes shaper parameters and source[destination] 
> # address[port].
> # For example let's prepare /etc/sysconfig/cbq/cbq-1280.My_first_shaper:
> # 
> # ----------8<---------------------
> # DEVICE=eth0,10Mbit,1Mbit
> # RATE=128Kbit
> # WEIGHT=10Kbit

> Works great! If you ever wanted to shape traffic on your lan (give that
> office mate that only looks at porno the whole day only 8 kbps so that he
> doesn't hog all the bandwidth!), this is the way to go! You can also shape
> traffic going to dialup access servers, routers (for leased line
> clients).. the possibilities are endless

CBQ is great for shaping bandwidth, but not conserving it.  For HTTP traffic
shaping and caching, you've got to go with squid's delay_pools.  With this you
actually have that same amount of control which is much more configurable IMHO,
and scalable.  However, you're only doing limits to HTTP/FTP traffic with this.
For the napster enabled networks, policies have to be enforced with CBQ.


-
Philippine Linux Users Group. Web site and archives at http://plug.linux.org.ph
To leave: send "unsubscribe" in the body to [EMAIL PROTECTED]

Reply via email to