Hi all!<br> <br> 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)<br> By proportional, I mean, if congestion on the egress link is, say 38%, then I shall remark 38 packets of every 100 leaving eth0.<br> <br> 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.<br> <br> 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:<br> <br> action drop random netrand ok 10&nbsp; --&gt;<br> allow 1 out 10 randomly<br> <br> and<br> <br> action drop random determ ok 2&nbsp; --&gt;<br> deterministically accept every second packet<br> <br> This seems to behave like: every nth, so I can't have anything
 more than 50%, <br> and even below 50%, levels are stepped, like 33%, 25%, etc.<br> <br> What I would like to do is:<br> action pass random determ continue&nbsp; RATIO,<br> so when RATIO is 0, it would pass all packets, when it is not,<br> it would step to the next filter (the DSMARK remarker) before sending.<br> 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.<br> <br> Could you give me some ideas? Anyone used something like this before?<br> <br> Any advice/help is highly appreciated.<br> <br> Ferenc<br> <p>
        
                <hr size=1><a href="http://us.rd.yahoo.com/mail_us/taglines/postman3/*http://us.rd.yahoo.com/evt=39666/*http://beta.messenger.yahoo.com">Yahoo! Messenger with Voice.</a> PC-to-Phone calls for ridiculously low rates.