Can DUMMYNET handle weighting of traffic according to firewall rules?

Luigi Rizzo rizzo at iet.unipi.it
Fri Dec 12 10:06:49 UTC 2014


you can set the limit for the pipe, create two queues with different
weights attached to the pipe, and then schedule.

ipfw pipe 12 config bw 3456 Kbit/s
ipfw queue 34 config weight 2 pipe 12
ipfw queue 56 config weight 1 pipe 12
ipfw add queue 34 in recv halfduplexlink0
ipfw add queue 56 out xmit halfduplexlink0

that should do the job

cheers
luigi


On Fri, Dec 12, 2014 at 6:10 PM, Brett Glass <brett at lariat.net> wrote:
> Everyone:
>
> I have an interesting problem that I'm trying to solve with FreeBSD's IPFW
> and DUMMYNET facilities. I have an application in which, due to arbitration
> overhead, a half duplex data link has significantly higher costs --
> typically about twice as much -- in one direction than in the other. I'd
> therefore like to set up a DUMMYNET pipe in FreeBSD that limits bandwidth
> usage so that
>
> 2*(bandwidth in one direction) + (bandwidth in the other direction <= total
> bandwidth limit
>
> It's easy to set IPFW up to sort the packets by direction, but it does not
> seem possible to inject them into the same pipe in such a way that some
> packets will count more toward the pipe's bandwidth limit than others. Any
> ideas on how I can implement this? Willing to code if I must, but don't want
> to reinvent the wheel.
>
> --Brett Glass
>
> _______________________________________________
> freebsd-net at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe at freebsd.org"



-- 
-----------------------------------------+-------------------------------
 Prof. Luigi RIZZO, rizzo at iet.unipi.it  . Dip. di Ing. dell'Informazione
 http://www.iet.unipi.it/~luigi/        . Universita` di Pisa
 TEL      +39-050-2211611               . via Diotisalvi 2
 Mobile   +39-338-6809875               . 56122 PISA (Italy)
-----------------------------------------+-------------------------------


More information about the freebsd-net mailing list