linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Randy.Dunlap" <rddunlap@osdl.org>
To: Christian Hammers <ch@westend.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: icmp_ratelimit seems to be too low (related to NAT?)
Date: Mon, 5 May 2003 07:53:58 -0700	[thread overview]
Message-ID: <20030505075358.7555f137.rddunlap@osdl.org> (raw)
In-Reply-To: <20030505093523.GE15625@westend.com>

On Mon, 5 May 2003 11:35:23 +0200 Christian Hammers <ch@westend.com> wrote:

| Hello
| 
| icmp_ratelimit has, as of kernel 2.4.20, a default of 100 (which unit
| btw?). This seems to be too low as I have packet loss when doing two
| "mtr" to the same 4 hops away host simultaneously. As this suggerates
| packet loss on the network to the administrator, a too low limit will 
| certainly annoy network admins as it gives wrong information.

icmp_ratelimit is init to 1 * HZ (where HZ == 100 most likely),
so I'll guess that unit is jiffies (100ths of a second).

| My tests gave the following results:
| 
| src. linux --> SNAT'ing linux router --> cisco1 --> cisco2 --> dst. linux
| 
| On the src linux host I opened _two_ mtr at the same time and watched
| the packet loss at the first host after 30 rounds (seconds).
| 
| 	icmp_ratelimit | loss at hop1 for both mtr
| 	0		 0
| 	10		 0
| 	20		 0
| 	40		 0
| 	80		 34% and 37%
| 	100		 44% and 57%	(default)
| 	160		 64% and 75%
| 	320		 87% and 83%
| 	999		 100% and 100%
| 
| For 2*(4*icmp_request + 4*icmp_timeexceeded/reply) = 16 packets per 
| second the loss seems to be a bit high at the default value of 100.
| 
| Is this related to any other setting? Maybe NAT?
| My /proc/net/ip_conntrack only has 1200 lines and the max in 
| /proc/sys/net/ipv4/ip_conntrack_max is 32767.

Only other value that I see related to it is
icmp_ratemask, which has a default value of 0x1818.
>From net/ipv4/icmp.c:

/* 
 * 	Configurable global rate limit.
 *
 *	ratelimit defines tokens/packet consumed for dst->rate_token bucket
 *	ratemask defines which icmp types are ratelimited by setting
 * 	it's bit position.
 *
 *	default: [for ratemask -RDD]
 *	dest unreachable (3), source quench (4),
 *	time exceeded (11), parameter problem (12)
 */

--
~Randy

      reply	other threads:[~2003-05-05 14:44 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-05-05  9:35 Christian Hammers
2003-05-05 14:53 ` Randy.Dunlap [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=20030505075358.7555f137.rddunlap@osdl.org \
    --to=rddunlap@osdl.org \
    --cc=ch@westend.com \
    --cc=linux-kernel@vger.kernel.org \
    --subject='Re: icmp_ratelimit seems to be too low (related to NAT?)' \
    /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

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).