netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Anton VG <anton.vazir@gmail.com>
To: netfilter-devel <netfilter-devel@vger.kernel.org>, kaber@trash.net
Subject: rateest usage problem - slightly lost
Date: Sun, 31 May 2009 19:18:17 +0500	[thread overview]
Message-ID: <c4b050a10905310718h110e127cg6ee114cff0bc2f8c@mail.gmail.com> (raw)

Hi friends,

Am a little lost with using of the rateest target.

I'm trying to match if one of my interfaces have load over 2000kbit
but it does not seem to work.
While trying to understand the MAN page I'm a little lost - while man
gives example on the comparing the delta, but even trying the simpler
case it does not work for me.

my example s simpler - i just want to know if one interface have load
X to mark packets (to route them later to interface y) - and it does
not seem to work at all.

# iptables -t mangle -A POSTROUTING -o eth0.3810 -j RATEEST
--rateest-name fiber --rateest-interval 250ms --rateest-ewma 0.5s
# iptables -t mangle -A POSTROUTING -o eth0.3811 -j RATEEST
--rateest-name satellite --rateest-interval 250ms --rateest-ewma 0.5s
# iptables -t mangle -A PREROUTING -s 82.198.22.27/32 -m rateest
--rateest1 fiber --rateest-bps1 2000kbit --rateest-gt -j MARK
--set-mark 4
# iptables -t mangle -A PREROUTING -s 82.198.22.27/32 -m rateest
--rateest1 fiber --rateest-bps1 2000kbit --rateest-lt -j MARK
--set-mark 7

iptables -nL -v -t mangle gives

Chain PREROUTING (policy ACCEPT 302M packets, 151G bytes)
 pkts bytes target     prot opt in     out     source               destination
 1426  140K MARK       all  --  *      *       82.198.22.27
0.0.0.0/0           rateest match fiber bps gt 0 MARK xset
0x4/0xffffffff
    0     0 MARK       all  --  *      *       82.198.22.27
0.0.0.0/0           rateest match fiber bps lt 0 MARK xset
0x7/0xffffffff


May anyone give me a piece of clue?

             reply	other threads:[~2009-05-31 14:18 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-31 14:18 Anton VG [this message]
2009-05-31 16:24 ` rateest usage problem - slightly lost Anton VG
2009-06-05 13:27   ` Jan Engelhardt

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=c4b050a10905310718h110e127cg6ee114cff0bc2f8c@mail.gmail.com \
    --to=anton.vazir@gmail.com \
    --cc=kaber@trash.net \
    --cc=netfilter-devel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).