Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 05-16-2004, 09:47 AM   #1
Registered: Oct 2002
Posts: 38

Rep: Reputation: 15
prioritise packets with cbq.init for better ping times


I have a small LAN with 6 windows machines. They all get their net from a Linux FC1 server, running an iptables firewall script (monmotha) - (sorry, can't make it clickable).

eth1 ( is the external (NO ppp0) and eth0 ( is the internal interface. The network machines are all 192.168.0.xx ( network).

I don't use traffic shaping, because the connection is quite tolerable for browsing and downloading, as it has an 1 Mbit downlink and 512 kbit upload. The problem is, that at least one of my neighbors is always downloading something or even worse - watching pic gallerys. Ping goes up and down and there's lag or even packet loss present when playing firstpersonshooters like Quake or UT on the net.

I want to prioritise the packets coming from and to my machine (, so that I'd have OK ping while playing. I usually wget stuff to the linuxbox, so my shaping probably doesn't harm my neighbors too much when I download smth. I may later set it only for specific game ports, when I get it working. I read a little about cbq.init here and there, searched this forum and found several topics, but obviously it's not enough for me. I need help.

I made these two cbq.init conf files:


# cat cbq-666.incoming

# cat cbq-666.outgoing


I'm not sure if I even got outgoing and incoming right in the filenames, maybe it's vice versa.

I set ISOLATED to "yes", to be sure, that nothing is interrupting me while testing. When done testing, I can set it to "no", right?

I guess 256kbit is enough for playing quake? I don't know what the ul/dl ratio is, so I set to 1/1 (256/256) now. As you see, I set PRIO to it's highest (1), so these packets were the most important and handled first. I tested this configuration and it doesn't seem to work.

What did I do wrong, how should it be done correctly? Maybe cbq.init is not the correct tool for this kind of shaping?

Thanks in advance,
Alex (kilgor)
Old 05-28-2004, 11:20 AM   #2
Registered: Apr 2004
Distribution: Gentoo
Posts: 95

Rep: Reputation: 28
I don't recommend using CBQ since it's hard to get right. You might want to try your luck with HTB. There's also HTB.init similar to CBQ.init. For prioritizing interactive traffic alone you might probably want to take a look at the Wondershaper from as that's what it does (no per-user shaping, just traffic classifying) and many other scripts on the net do similar stuff. For per-user shaping (fair bandwidth sharing among users) you could try my own script on Even if they are not right for you, they may be useful as example.

Be sure to read the Howto on if you want to set up your own solution.

Last edited by frostschutz; 05-28-2004 at 11:22 AM.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Want to log traceroute or ping times wkm001 Linux - Software 4 10-22-2011 06:27 AM
using cbq.init to shape bandwidth? shrike_912 Linux - Software 1 10-31-2004 11:24 AM
Ping hangs and Konq times out... Lostboy7500 Linux - Networking 1 10-09-2004 06:41 PM
Ping - Logging the times to a file. johnsont Programming 2 09-09-2003 01:09 PM
cbq.init zipzero Linux - Networking 0 02-20-2002 03:46 PM > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 02:46 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration