Can DUMMYNET handle weighting of traffic according to firewall rules?

Brett Glass brett at lariat.net
Fri Dec 12 10:03:10 UTC 2014


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



More information about the freebsd-net mailing list