Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 12 Dec 2014 21:06:46 +1100
From:      Luigi Rizzo <rizzo@iet.unipi.it>
To:        Brett Glass <brett@lariat.net>
Cc:        "freebsd-net@freebsd.org" <net@freebsd.org>
Subject:   Re: Can DUMMYNET handle weighting of traffic according to firewall rules?
Message-ID:  <CA%2BhQ2%2Bg40aZO%2B6JJsvDU8GG_UGp=rO1tQQoaETRe%2BBc-iyBNKA@mail.gmail.com>
In-Reply-To: <201412120711.AAA00622@mail.lariat.net>
References:  <201412120711.AAA00622@mail.lariat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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@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@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-net
> To unsubscribe, send any mail to "freebsd-net-unsubscribe@freebsd.org"



-- 
-----------------------------------------+-------------------------------
 Prof. Luigi RIZZO, rizzo@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)
-----------------------------------------+-------------------------------



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BhQ2%2Bg40aZO%2B6JJsvDU8GG_UGp=rO1tQQoaETRe%2BBc-iyBNKA>