pf+altq for bandwidth management



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?

Thanks,
LT

_______________________________________________
freebsd-isp@xxxxxxxxxxx mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-isp
To unsubscribe, send any mail to "freebsd-isp-unsubscribe@xxxxxxxxxxx"



Relevant Pages

  • Re: limiting bandwidth
    ... >> or more) and when this happens, the rest of the network chokes. ... > can set up a default queue with total bandwidth equal to total outgoing ... > that machine on the smaller queue. ... I know its ALTQ, I'll read up on it :-) ...
    (comp.unix.bsd.openbsd.misc)
  • cbq not borrowing fully from parent queue
    ... I'm running 6-STABLE using pf and altq/cbq to manage bandwidth on my ... queue internal bandwidth 53104Kb priority 7 cbq ... so it can't borrow from the root queue. ...
    (freebsd-questions)
  • Re: How to shape VoIP traffic on FreeBSD 4.8 router?
    ... I'd also like to give TCP ACK packets a priority boost. ... > traffic without assimilating bandwidth. ... Define 1 pipe for the entire upstream bandwidth. ... add queue 2 ip from any to any not ssh,telnet,ntp out via oif ...
    (comp.unix.bsd.freebsd.misc)
  • Re: pf traffic shaping and perfomance
    ... I would like to implement traffic shaping using pf. ... #queue def bandwidth 13% cbq ... #queue ssh_bulk priority 0 ...
    (freebsd-questions)
  • Re: Quick question about PF and ALTQ
    ... There are three categories of queuing disciples supported by pf. ... priority based queuing ... The altq statement (which interface to work on, how much bandwidth ... "queue" lines that also determine what to do when there is congestion. ...
    (freebsd-questions)