Fwd: [PATCH] PF+dummynet

Cristian KLEIN cristi at net.utcluj.ro
Tue Oct 30 09:13:23 PDT 2007


Ermal Luçi wrote:
> Ok thanks to remko@ for hosting it!
> 
> You can find it here:
> http://people.freebsd.org/~remko/patches/dummynet_pf.tar.gz
> 
> Please test and give feedback.

I am really interested in your patch and hope that I will soon have time to test it.

Meanwhile, I would like to ask you how dummynet interacts with the pf keep state
function. Ideally, one should be able to send uplink / downlink traffic to
different pipes. For example,

dnpipe 10 config bw 4Mbit mask src-ip 0x000000ff queue 10
dnpipe 11 config bw 4Mbit mask dst-ip 0x000000ff queue 10
pass in from $if_int proto tcp from any to any port 80 keep state dnpipe (up 10,
down 11)

should limit HTTP traffic for each host, to 4Mbps.

Could you please tell me how this works?

> 
>>> It gives full dummynet support in pf.conf syntax and removes dummynet
>>> depndency to ipfw.
>>>
>>> You can configure a pipe/queue using the same ipfw syntax the only
>>> difference is that i call those 'dnpipe'/'dnqueue' respectivley.
>>> GRED/RED isn't currently finished but that is a pfctl addition so not
>>> difficult.
>>>
>>> For dummynet i preserve ipfw style statistics so tools of ipfw can be
>>> used here to.
>>>
>>> Since this is PF i preserved ALTQ priotitizing of ACK, meaning on ALTQ you do
>>> pass in quick proto tcp from any to any flags S/SA queue(pri, que)
>>>
>>> You can do the same with dummynet queues only, since for pipes it
>>> doesn't make much sense since they simulate a link. So yuo can do
>>>
>>> dnpipe 10 bandwidth 100Kbit
>>> dnqueue 10 dnpipe 10 queue 100
>>> dnqueue 20 dnpipe 10 queue 20
>>>
>>> pass in quick proto tcp from any to any flags S/SA dnqueue(10, 20)
>>>
>>>
>>> Please test and give feedback.
>>> _______________________________________________
>>> 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"
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> 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"


More information about the freebsd-pf mailing list