On Saturday 16 March 2002 12:45, you wrote:> Hello,
>
> I have a Q running (script attached, from the how-to) which does the
> following:
>
> 1. Assign 6MBit to link
> 2. Assign 5MBit to 192.168.230.0/24
> 3. Assign 3MBit to 192.168.220.0/24
>
> I have two questions:
>
> 1. Is it possible to set a limit for a particular IP address, rather than a
> range? I''ve tried the following:
>
> match ip src 192.168.230.1 - the filter has no effect on traffic
> match ip src 192.168.230.4/32 - the filter has no effect on traffic
> match ip src 192.168.230.1/24 - the filter affects the whole 192.168.230.0
> network
This works for me :
tc filter add dev eth0 parent 10: protocol ip u32 match ip dst 192.168.1.253
flowid 10:10
>
> 2. With the attached script, bandwidth is set to 5MBit or 3Mbit for a
> single machine on the filtered networks. When I add another machine on the
> same network, both machines get half of the rate. Is there a way to say
> that all machines on a particular /24 are limited to a particular rate,
> rather than sharing it between them?
The only thing you can do is create a class and filter for each of the extra
machines. The WRR qdisc can do this automatically, but I never tried it. It
creates a class for each ip-address or mac-address it sees and gives each
class an equal umount of bandwidth.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.openprojects.net