Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 5 Apr 2009 14:08:09 +0200 (CEST)
From:      Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
To:        Martin Schweizer <office@pc-service.ch>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: ipfw: bandwidth limiting
Message-ID:  <alpine.BSF.2.00.0904051404080.22885@wojtek.tensor.gdynia.pl>
In-Reply-To: <20090405085834.GL72129@saturn.pcs.ms>
References:  <20090405085834.GL72129@saturn.pcs.ms>

next in thread | previous in thread | raw e-mail | index | archive | help
> [snip]
> $ipfwcmd pipe 1 config bw 80KByte/s
> $ipfwcmd add pipe 1 ip from any to 192.168.10.0/24{100-254} via em1
> [snip]
>
> I'm not sure it works. When I do a large download which takes long and
> anybody else want download too, this download will only get a reduce
> bandwidth. I expect that the second download get same rate as the first one
> (and reduce the bandwidth from the first one). Is that correct?

your example limits it all to 80kB/s but does no traffic management. so it 
may get the same rate (half by half) or may not.


do

$ipfwcmd pipe 1 config bw 80kByte/s
$ipfwcmd queue 1 config pipe 1 weight 1  mask dst-ip 0xffffffff
$ipfwcmd add queue 1 ip from any to 192.168.10.0/24{100-254} via em1

this will limit them to 80kB/s and perform fair-sharing based of hosts.

for example if one user on one computer will start 100 downloads, and 
other on other computer will start 1 download, this will ensure that first 
user will not takeover most bandwidth.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.00.0904051404080.22885>