LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 06-29-2005, 02:59 AM   #1
ikillu
Member
 
Registered: Jul 2004
Posts: 34

Rep: Reputation: 15
CBQ-help


Hi guys,
here I face a little problem about CBQ. I share my internet connection with a simple iptable command ->
iptables -t nat -A POSTROUTING -j MASQUERADE
it work fine. now I control bandwidith with CBQ. my current configuration of CBQ is
Quote:
cbq-98.service

DEVICE=eth1,10Mbit,1Mbit
RATE=1024Kbit
WEIGHT=60Kbit
PRIO=5
RULE=192.168.0.50

cbq-99.clients

DEVICE=eth1,10Mbit,1Mbit
RATE=48Kbit
WEIGHT=6Kbit
PRIO=5
RULE=192.168.0.0/24
My PC IP is 192.168.0.50 . nobody get more than 6 KBps without me. Now I want only those IP that I difined (like 192.168.0.51 and 192.168.0.52) get 6 KBps and all other user get nothing! I try with this configure. .

Quote:
cbq-98.service

DEVICE=eth1,10Mbit,1Mbit
RATE=48Kbit
WEIGHT=4Kbit
PRIO=5
RULE=192.168.0.51
RULE=192.168.0.52

cbq-98.service

DEVICE=eth1,10Mbit,1Mbit
RATE=1024Kbit
WEIGHT=60Kbit
PRIO=5
RULE=192.168.0.50

cbq-99.clients

DEVICE=eth1,10Mbit,1Mbit
RATE=0Kbit
WEIGHT=0Kbit
PRIO=5
RULE=192.168.0.0/24
but it doesn't work. any one can help me??
 
Old 06-29-2005, 02:42 PM   #2
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
I see you don't write CBQ rules yourself, you use some kind of script that accepts the parameters you posted. Where can I see the scripts? Where are they from?
 
Old 06-30-2005, 12:24 AM   #3
ikillu
Member
 
Registered: Jul 2004
Posts: 34

Original Poster
Rep: Reputation: 15
those script is contain in -> /etc/sysconfig/cbq/cbq-98.service
 
Old 06-30-2005, 03:33 PM   #4
Mara
Moderator
 
Registered: Feb 2002
Location: Grenoble
Distribution: Debian
Posts: 9,696

Rep: Reputation: 232Reputation: 232Reputation: 232
Short note for you (may be useful later): CBQ is a special service, in fact. Your /etc/sysconfig/cbq/cbq-98.service is a script setting up CBQ using 'tc' command. There's no 'cbq' one. Also, instead of CBQ you can use different other ones like HTB (they differ in the ways they deal with packets that come to one group - or class as it's called). Settings for such services are made of rules (like for iptables).

I see that you're using a script that's similar to http://www.cs.ut.ee/~mroos/cbq.init (the same variables in config file). Now, there's a default rule. All packets that don't go into other defined ones match the default ones. The program also doesn't like settings with '0'. It was designed to limit traffic, but to a positive value, not block it. The best solution IMO is to block using iptables. You have masquerade set, so now you need to add blocking rule. Something like
iptables -A INPUT -s 192.168.0.51 -j ACCEPT
iptables -A INPUT -s 192.168.0.52 -j ACCEPT
with default policy DROP on INPUT should handle this.
 
  


Reply



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
problem in cbq alvi2 Linux - Networking 11 03-31-2006 02:17 AM
Where is CBQ? shrike_912 Linux - Newbie 3 10-26-2004 12:09 PM
Where is CBQ? shrike_912 Programming 2 10-25-2004 02:39 PM
CBQ, and heartbeat twistedpair Linux - Networking 0 04-06-2004 11:10 PM
CBQ and mldonkey thinkninja Linux - Newbie 0 08-22-2003 04:30 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:19 PM.

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