February 8th, 2005, 08:15
I'm on an ADSL connection and I would like to prioritize empty ACK packets, as suggested by many sources. I compiled my kernel with device pf and those ALTQ related options, and set up my pf rules like /usr/share/examples/pf/ackpri, but it's not working - when I upload something my downloads still slow down drastically. Is there something else I need to do to make this work?

February 8th, 2005, 12:43
Posting your pf.conf would be a great first step.

February 8th, 2005, 12:48
If you look back through the posts in this forum dreams, you'll see my pf.conf which does exactly what you;re talking about.

BTW Welcome to S.E.

February 8th, 2005, 13:01
A few things to keep in mind when working with ALTQ.

Block everything to start with. ALTQ won't be able to queue it if it's not blocked at least on the interface(s) that you want to queue on.

ALTQ only works on the outbound side of an interface. The bandwidth has already been consumed on the inbound side so it's worthless to try to queue it there. You need to queue on the oubound side of your internal interface for traffic coming from the internet into your network and on the outbound side of the external interface for traffic leaving your network to the outside.

Set your queue bandwidth to your connection speed minus a little overhead (If you have 128k up then set your queue on the external interface to 120k or so). It can't effective queue if your speed is set too high and it will limit your connection if you set it too low. I forgot to change my upload queue when I switch ISPs and I was wondering what their issue was. ( oops :eggface: )

Queues are prioritized by the higher number assigned. Make sure tcpack queue is the highest queue (priority 15).

Here's an example pass out that works for me prioritizing tcpack packets:
pass out on $ext_if inet proto tcp from $int_if:network to any keep state queue (q_out, q_ack_out)

Feel free to post what you have so far and we'll take a look.

February 9th, 2005, 00:24
Thanks for the replies. My ADSL's upstream bandwidth is supposed to be 256kbps so I used 200 for altq. (I even tried smaller numbers like 100...) Here's what I have now:


scrub in all
scrub out on $ext all no-df random-id max-mss 1492

altq on $ext priq bandwidth 200Kb queue{priq_ack, priq_std}
queue priq_ack priority 7
queue priq_std priority 1 priq(default)

nat on $ext from $int:network to any -> ($ext)

block all
pass quick on lo0 all

pass out on $ext proto tcp flags S/SA modulate state queue(priq_std, priq_ack)
pass out on $ext proto udp keep state queue priq_std
pass out on $ext inet proto icmp icmp-type echoreq keep state queue priq_ack

pass in on $int from $int:network
pass out on $int to $int:network queue(priq_std, priq_ack)

Previously I didn't specify a queue on the outbound of my internal interface (I guess it'll use the default queue). I've added that as per Strog's suggestion, but it still doesn't seem to be prioritizing anything.