Date: Thu, 17 May 2007 09:49:25 -0400 From: "Lan Tran" <llt@recol.com> To: <freebsd-pf@freebsd.org> Subject: pf+altq for bandwidth control Message-ID: <005001c7988a$2e7ed000$d101010a@recol.us>
next in thread | raw e-mail | index | archive | help
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 transparent 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" matches the "queue std_ext" instead of "queue test_ext" rule. It appears the cbq(default) child rule is overriding the other rule. What am I missing? LT
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?005001c7988a$2e7ed000$d101010a>