Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Is there an equivalent of LinuxIMQs in BSD ?


The imq device has two common usage cases:

Ingress shaping:

With linux only egress shaping is possible (except for the ingress queue which can only do rate limiting). IMQ enables you to use egress qdiscs for real ingress shaping.

Shaping over multiple interfaces:

Qdiscs get attached to devices. A consequence of this is that one qdisc can only handle traffic going to the interface it is attached to. Sometimes it is desireable to have global limits on multiple interfaces. With IMQ you can use iptables to specify which packets the qdiscs sees, so global limits can be placed.

Does pf in BSD land (freebsd openbsd ?) have something like this, or that achieves the same thing? I am looking into how to set a maximum thoroughput per each client, while having multiple wan links.

share|improve this question
What exactly are you trying to accomplish? pf/ALTQ and IPFW/DummyNet can do ingress rate limiting at a logical level. Wire level ingress filtering isn't possible to force on Ethernet. Some protocols can fake being shaped over time, for example limiting ACK rate for TCP. – Chris S Dec 31 '11 at 3:36
PF cannot do incomming traffic shaping, you can only limit outgoing traffic. Although you can prioritize incoming traffic, but not to shape it. FreeBSD has old version of PF, on FreeBSD it is better to stick with IPFW I think. – Jiri Xichtkniha May 29 '12 at 8:59

If what you like to do is something like that :

[ Alice ]    [ Charlie ]
    |             |                              ADSL
 ---+-----+-------+------ dc0 [ OpenBSD ] fxp0 -------- ( Internet )
       [ Bob ]

Then read this FAQ examples about configuring OpenBSD PF for this. Theses examples shows you how to apply egress and ingress shaping to individual "clients" (IP addresses and ports in fact).

Connect your multiple WAN links to your OpenBSD (one network card per link) and then configure a trunk(4) to aggregate links as one virtual trunk interface, and then use it in pf.conf (in the schema above, fxp0 would be replaced by trunk0).

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.