Linux Netfilter discussions
 help / color / mirror / Atom feed
From: George Nychis <gnychis@cmu.edu>
To: George P Nychis <gnychis@cmu.edu>
Cc: netfilter@lists.netfilter.org
Subject: Re: getting random and average to accept decimals?
Date: Fri, 28 Apr 2006 22:16:06 -0400	[thread overview]
Message-ID: <4452CC66.40402@cmu.edu> (raw)
In-Reply-To: <33064.128.2.140.234.1146248997.squirrel@128.2.140.234>

Daniel made a really helpful suggestion on #iptables to solve my problem:

iptables -N CENTAPKT; iptables -A INPUT -m random --average 1 -j 
CENTAPKT; iptables -A CENTAPKT -m random --average 1 -j DROP

yey, 0.01% packet loss :)

George P Nychis wrote:
> Hi,
> 
> I need a very high precision loss model, and right now it seems as though --average can only accept integer numbers
> 
> I would for example like to introduce .01% packet loss, .1% packet loss, 1% packet loss, 1.5% packet loss ... except it seemas though out of that set, i would only be able to do 1% packet loss
> 
> lanthanum-ini ~ # iptables -A FORWARD -p all -m random --average .25 -j DROP
> iptables v1.3.5: bad --average `.25', must be between 1 and 99
> Try `iptables -h' or 'iptables --help' for more information.
> 
> is there any way i can get higher precision?
> 
> Thanks!
> George
> 
> 
> 


      reply	other threads:[~2006-04-29  2:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-28 18:29 getting random and average to accept decimals? George P Nychis
2006-04-29  2:16 ` George Nychis [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4452CC66.40402@cmu.edu \
    --to=gnychis@cmu.edu \
    --cc=netfilter@lists.netfilter.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox