Date: Fri, 18 May 2007 13:15:52 +0200 From: Volker <volker@vwsoft.com> To: Umar <unix.co@gmail.com> Cc: freebsd-pf@freebsd.org Subject: Re: bandwidth controlling with ALTQ Message-ID: <464D8AE8.30103@vwsoft.com> In-Reply-To: <10679395.post@talk.nabble.com> References: <10678120.post@talk.nabble.com> <464D70D0.3000608@vwsoft.com> <10679395.post@talk.nabble.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 05/18/07 12:05, Umar wrote: > Dear Volker > > Thanks for your reply! > > I have 1mb up and 1mb down DSL and i have total 20 client at this time. > >>> if you want to limit per IP address, you need to create one queue for >>> every IP address in your internal network. > > Please tell me how i create the queue i will manage 20 queues by hand. But > i don't know the exact syntax in PF-ALTQ Umar, well, here your nightmare comes true! It's not just creating the queues, but have a different pass rule for every queue you're using. Let's go (assuming hfsc scheduler, cbq, priq will also do it for you): $clientIP1="192.168.0.2" $clientIP2="192.168.0.3" altq on $ext_if hfsc bandwidth 1Mb queue { qclient1, qclient2, qclient3, ... } queue qclient1 bandwdith 10Kb hfsc ( rio ) queue qclient2 bandwidth 10Kb hfsc ( rio ) ... pass in quick log on $int_if proto tcp from $clientIP1 to any \ flags "S/SA" keep state queue qclient1 pass in quick log on $int_if proto tcp from $clientIP2 to any \ flags "S/SA" keep state queue qclient2 Note: You also have to define one default queue "hfsc ( default )". Note2: You'll also want to pass other traffic (udp, icmp etc.). Happy maintenance! ;) HTH Volker PS: I suggest using a bandwidth for your root queue a bit lower than what you think your connections' upstream really is. For a 1 Mb upstream, a value of 940 Kb should be appropriate.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?464D8AE8.30103>