Re: ipfw: bandwidth limiting

2009-04-15 Thread Martin Schweizer

Hello Wojciech

Sorry for the delay but in the past I was very busy. I use now the folowing:

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

$ipfwcmd queue 1 config pipe 1 weight 1 mask dst-ip 0x
$ipfwcmd add queue 1 all from any to 192.168.10.0/24{100-254} via em1

I expect that all hosts are targed with the ip address 192.168.10.0/24, 
from .100 to .254. Is that correct? As far as I can see it works like 
expected but I'm not 100% sure. I'm right?


Kind regards,


Wojciech Puchar schrieb:

[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 0x
$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.


--
Martin Schweizer

PC-Service M. Schweizer GmbH; Bannholzstrasse 6; Postfach 132;
CH-8608 Bubikon; Tel. +41 55 243 30 00; Fax: +41 55 243 33 22;
http://www.pc-service.ch
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ipfw: bandwidth limiting

2009-04-06 Thread Martin Schweizer
Hello Wojciech

Am Sun, Apr 05, 2009 at 02:08:09PM +0200 Wojciech Puchar schrieb:
 [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 0x
 $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.

I will try it in the next days and give you a feedback. Thanks.

Regards

-- 

Martin Schweizer
off...@pc-service.ch

PC-Service M. Schweizer GmbH; Bannholzstrasse 6; CH-8608 Bubikon
Tel. +41 55 243 30 00; Fax: +41 55 243 33 22; http://www.pc-service.ch;
public key : http://www.pc-service.ch/pgp/public_key.asc; 
fingerprint: EC21 CA4D 5C78 BC2D 73B7  10F9 C1AE 1691 D30F D239;

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


ipfw: bandwidth limiting

2009-04-05 Thread Martin Schweizer
Hello

My system:
FreeBSD firewall 7.0-RELEASE FreeBSD 7.0-RELEASE #3: Fri Feb  6 
10:47:08 CET 2009 mar...@firewall:/usr/obj/usr/src/sys/FREEBSD_AMD64  amd64

I use the following rule in my /etc/rc.firewall:

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

Kind regards,
-- 

Martin Schweizer
off...@pc-service.ch

PC-Service M. Schweizer GmbH; Bannholzstrasse 6; CH-8608 Bubikon
Tel. +41 55 243 30 00; Fax: +41 55 243 33 22; http://www.pc-service.ch;
public key : http://www.pc-service.ch/pgp/public_key.asc; 
fingerprint: EC21 CA4D 5C78 BC2D 73B7  10F9 C1AE 1691 D30F D239;

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org


Re: ipfw: bandwidth limiting

2009-04-05 Thread Wojciech Puchar

[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 0x
$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.

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org