|
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
|