LinuxQuestions.org
Visit Jeremy's Blog.
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 08-15-2006, 07:12 AM   #1
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 668
Blog Entries: 7

Rep: Reputation: 31
CBQ.init upload question


Hi.. Iam using cbq.init to do some bandwidth limiting on my network, Ive read the examples in the script and they are straight forward as a result I came out with the following two scripts two limit both download and upload for a certain host on the network. The download script works fine while the upload script does not work properly.

Download Script Working !!

DEVICE=eth1,10Mbit,1Mbit
RATE=80Kbit
WEIGHT=8Kbit
PRIO=5
RULE=:80,192.168.1.166

Upload Script "NOT WORKING"

# --------------------------------------------------------------------------
DEVICE=eth1,10Mbit,1Mbit
RATE=8Kbit
WEIGHT=1Kbit
PRIO=5
RULE=192.168.1.166,
# --------------------------------------------------------------------------

Now the example in script states the following :

# The configuration says that we will control traffic on 10Mbit ethernet
# device eth0 and the traffic going to network 192.168.1.0 will be
# processed with priority 5 and shaped to rate of 128Kbit.
#
# Note that you can control outgoing traffic only. If you want to control
# traffic in both directions, you must set up CBQ for both interfaces.
#
# Consider the following example:
#
# +---------+ 192.168.1.1
# BACKBONE -----eth0-| linux |-eth1------*-[client]
# +---------+
#
# Imagine you want to shape traffic from backbone to the client to 28Kbit
# and traffic in the opposite direction to 128Kbit. You need to setup CBQ
# on both eth0 and eth1 interfaces, thus you need two config files:
#
# cbq-128.client-backbone
# --------------------------------------------------------------------------
# DEVICE=eth0,10Mbit,1Mbit
# RATE=128Kbit
# WEIGHT=10Kbit
# PRIO=5
# RULE=192.168.1.1,
# --------------------------------------------------------------------------
#

In the example above the script says that you can only shape or limit outgoing traffic, for my upload the outgoing traffic would be the traffic leaving eth0 just like the example "In my case eth0 is the internet interface" ..however the way I see it when traffic is leaving eth0 it would already have been SNATed ..and the provided IP for the host 192.168.1.1 would have been changed in the header of the packets coming from host 192.168.1.1 ..so any help on clarifying this issue or telling me how to set the rule so that it limits the upload rate of 192.168.1.1 using this technique is welcome..

Thx for your suggestions
 
Old 08-17-2006, 03:50 AM   #2
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 668
Blog Entries: 7

Original Poster
Rep: Reputation: 31
Anyone ??
Please....
 
Old 08-16-2007, 01:20 AM   #3
sussane
LQ Newbie
 
Registered: Aug 2007
Posts: 19

Rep: Reputation: 0
I also have been waiting for my post reply, no body seems using CBQ here. I m using CBQ but i m not certain whether it works or not ?
Did your rule worked to limit port 80 to certain amount of bandwidth ALINUX ?
Waiting for your reply ...
 
Old 08-16-2007, 01:44 AM   #4
ALInux
Member
 
Registered: Nov 2003
Location: Lebanon
Distribution: RHEL 5/CentOS 5/Debian Lenny/(K)Ubuntu Is Dead/Mandriva 10.1
Posts: 668
Blog Entries: 7

Original Poster
Rep: Reputation: 31
Well to be honest with you..I tried scripts like cbq.init hbt.ini mastershaper wondershaper..and I dont know what else..
In the end I ended up learning HTB and writing my own script for my own personal use. The thing is that you have to mark your packets and if you linux machine is a router you have to do so before the postrouting stage in the mangle stage..to mark the packets for traffic limiting before their source address get rewritten (That is for upload).
As said you would be better of spending a couple of days learning the in and out of the LARTC.
 
  


Reply


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
CBQ upload shaping Soulstealer Linux - Networking 0 12-14-2004 06:58 PM
using cbq.init to shape bandwidth? shrike_912 Linux - Software 1 10-31-2004 11:24 AM
limiting upload with CBQ orko Linux - Networking 3 11-28-2003 03:46 PM
CBQ limit upload dracula2000 Linux - Networking 0 11-20-2003 03:50 AM
cbq.init zipzero Linux - Networking 0 02-20-2002 03:46 PM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration