Re: pf+altq for bandwidth management
- From: "Lan Tran" <llt@xxxxxxxxx>
- Date: Thu, 17 May 2007 09:37:32 -0400
----- Original Message ----- From: "Jeremy Tregunna" <info@xxxxxxx>
To: "Lan Tran" <llt@xxxxxxxxx>
Cc: <freebsd-isp@xxxxxxxxxxx>
Sent: Wednesday, May 16, 2007 1:21 PM
Subject: Re: pf+altq for bandwidth management
On 16-May-07, at 11:33 AM, Lan Tran wrote:Jeremy,
Hello,
Is pf and altq a right combo for bandwidth limiting? What I'm trying to do is limit each IP or block of IPs to predefined bandwidth. I'm not doing traffic shaping, just wanting to prevent servers from hogging all the bandwidth.
My setup is as follow:
LAN {test server} -> xl1 {FreeBSD} xl0 -> router -> net
xl0 and xl1 are functioning as a bridge. kernel has pf and altq compiled.
pf.conf:
ext_if = "xl0"
int_if = "xl1"
pc = "any"
set loginterface $ext_if
# to net
altq on $ext_if cbq bandwidth 100Mb queue { std_ext, test_ext }
queue std_ext bandwidth 3Mb qlimit 1000 priority 5 cbq(default red ecn)
queue test_ext bandwidth 2Mb priority 1 cbq(red ecn)
pass out on $ext_if from $pc to any keep state queue test_ext
---
The problem I'm having is that all outbound traffic from "test server" always shows around 3Mb instead of 2Mb per queue test_ext ruleset. What am I missing?
I've noticed the best precision for bandwidth limiting on cheap cards like realtek's (provided of course, the particular rl(4) card you're using is supported). Cards like fxp(4) and xl(4) I've not had great luck with getting them limited properly (always above or below the target)).
--
Jeremy Tregunna
Thanks for the input on types of card. It seems the "default" cbq rule is getting hit instead of the expected ruleset. If I change queue test_ext bandwidth 2Mb priority 1 cbq(red ecn) to queue test_ext bandwidth 2Mb priority 1 cbq(red ecn default), I get the rate I want. But this causes every rule to be matched to 2Mb. Any ideas?
LT
_______________________________________________
freebsd-isp@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isp
To unsubscribe, send any mail to "freebsd-isp-unsubscribe@xxxxxxxxxxx"
- References:
- pf+altq for bandwidth management
- From: Lan Tran
- Re: pf+altq for bandwidth management
- From: Jeremy Tregunna
- pf+altq for bandwidth management
- Prev by Date: This is an autoreply...[Re: new e-mail address]
- Next by Date: HW RAID advice requested
- Previous by thread: Re: pf+altq for bandwidth management
- Next by thread: This is an autoreply...[Re: new e-mail address]
- Index(es):
Relevant Pages
|
|