All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dongsheng Song <dongsheng.song@gmail.com>
To: netfilter@vger.kernel.org
Subject: strange incoming speed behaver of hashlimit
Date: Wed, 10 Jun 2009 10:31:23 +0800	[thread overview]
Message-ID: <4A2F1AFB.2000206@gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1147 bytes --]

I'm want use hashlimit to limit incoming/download speed:

iptables -t filter -A FORWARD -d 10.10.0.0/16 -m hashlimit
--hashlimit-above 10/sec --hashlimit-burst 2 --hashlimit-mode dstip
--hashlimit-name pkt_limit --hashlimit-htable-max 270
--hashlimit-htable-expire 60000 -j REJECT --reject-with icmp-host-prohibited

iptables -t filter -A FORWARD -d 10.10.0.0/16 -m hashlimit
--hashlimit-above 12/sec --hashlimit-burst 2 --hashlimit-mode dstip
--hashlimit-name pkt_limit --hashlimit-htable-max 270
--hashlimit-htable-expire 60000 -j ULOG --ulog-cprange 100
--ulog-qthreshold 1 --ulog-prefix "[test-hashlimit]"

iptables -t filter -A FORWARD -s 10.10.0.0/16 -j ACCEPT

I can verified hashlimit take effect by ulog, but I still observed
download speed above 300kbyte/s !
The theory speed limit shoud be: (10 + 2) * 1460 bytes/s = 17kbyte/s,
is't it ?

Can someone tell me the ipt_hashlimit file format ?

# cat /proc/net/ipt_hashlimit/pkt_limit
35 0.0.0.0:0->10.10.7.103:0 3200 3200 64
4 0.0.0.0:0->10.10.7.104:0 3200 3200 64
59 0.0.0.0:0->10.10.2.112:0 3200 3200 64
...

Thanks for some help,

--
Dongsheng Song



[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 542 bytes --]

                 reply	other threads:[~2009-06-10  2:31 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=4A2F1AFB.2000206@gmail.com \
    --to=dongsheng.song@gmail.com \
    --cc=netfilter@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.