"action pass random determ/netrand reclassify --value--": granularity problems

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all!

I'm trying to do proportional marking of real-time traffic to indicate link congestion, and for that, I wish to use the DSMARK filter to mark from, say EF to 0xcc. (an unused DSCP value)
By proportional, I mean, if congestion on the egress link is, say 38%, then I shall remark 38 packets of every 100 leaving eth0.

I already wrote some scripts, and I can measure the overload ratio, decide when congestion occurs locally, and modify any filter from C code in runtime with system calls.

Problem is, from what I get from the /doc library from the newest iproute2 package, when using ACTIONS with DETERM or NETRAND, followed by a value, that number is an INTEGER, and thus it says:

action drop random netrand ok 10  -->
allow 1 out 10 randomly

and

action drop random determ ok 2  -->
deterministically accept every second packet

This seems to behave like: every nth, so I can't have anything more than 50%,
and even below 50%, levels are stepped, like 33%, 25%, etc.

What I would like to do is:
action pass random determ continue  RATIO,
so when RATIO is 0, it would pass all packets, when it is not,
it would step to the next filter (the DSMARK remarker) before sending.
But I need stepping at % ratio, (meaning if insisting on nth-method, the value could be: every 100/74-th packet, which is obviously not an integer.

Could you give me some ideas? Anyone used something like this before?

Any advice/help is highly appreciated.

Ferenc


Yahoo! Messenger with Voice. PC-to-Phone calls for ridiculously low rates.
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux