[pf4freebsd] pf hack: use scrub rule to set TOS bits

Hendrik Scholz hscholz at raisdorf.net
Wed Sep 15 20:42:49 PDT 2004


Hi!

I've got pf 1.59 w/ ALTQ running and now get into the situation
that outgoing packets are queued correctly but I don't have
the chance to configure the opposite side (DSL access concentrator, Cisco
router).
I'm just hacking up pfctl and pf to recognize a rule like this:

scrub out on $ext_if proto icmp from $internal to any tos 0x10 keep state
or
scrub out on $ext_if proto udp from $internal to any port 4000 tos 0x10 keep state 

This will set the ip_tos bits to 0x10 (if not set otherwise). I still
have to conduct some tests (prolly using nemesis-icmp) to see whether
my upstream routers will return the answer with the same tos bits.

In case a) the destination host and b) the upstream router both make
their queuing decisions based on the tos bits we might manage to
influence our upstream routers behaviour and finally play Diablo
while doing large <insert random traffic hogs> downloads.

Since weather is nice and I have other things to hack on this might
take a few days until it proofs stable.

Just FYI, Hendrik

-- 
Hendrik Scholz - <hscholz at raisdorf.net> - http://raisdorf.net/

drag me, drop me - treat me like an object 




More information about the freebsd-pf mailing list