From: "H. Peter Anvin" <hpa@zytor.com>
To: Mark Glines <mark@glines.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] ip_local_port_range sysctl has annoying default
Date: Fri, 11 May 2007 19:12:15 -0700 [thread overview]
Message-ID: <4645227F.3030905@zytor.com> (raw)
In-Reply-To: <20070511170135.7c38615f@chirp>
Mark Glines wrote:
>
> By a one-in-a-million coincidence, this machine has a default port
> range starting with 2048, and this breaks things for me. I'm trying to
> run both klive and nfs on this box, but klive starts first (probably
> because of the filename sort order), and claims UDP port 2049 for its
> own purposes, causing the nfs server to fail to start.
>
> If the bind hash size is over a certain threshold, the range
> 32768-61000 is used. If it is under a certain threshold, a range
> like (1024|2048|3072)-4999 is used, depending on exactly how small it
> is. Thix box happened to get the 2048-4999 range, which broke nfs.
>
> A comment just above the code that does this says, "Try to be a bit
> smarter and adjust defaults depending on available memory." "smarter"?
> Maybe, maybe not. Either way, it's unexpected.
>
> Following the principle of least astonishment, I think it seems better
> to use high, out-of-the-way port numbers regardless of how much RAM the
> system has. So, the following patch changes this behavior slightly.
> The system still picks a dynamic range depending on the bind hash size,
> but now, all ranges start with 32768. I suppose another reasonable way
> to do this would be to end all ranges with 61000, or something like
> that.
>
Yes, that would be better. The IANA recommended port range for dynamic
ports are 49152-65535; Linux extends this to 32768 and chops off some of
the really high ports, but keeping them in the high range is thus the
right thing to do.
-hpa
next prev parent reply other threads:[~2007-05-12 2:12 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-05-12 0:01 [patch] ip_local_port_range sysctl has annoying default Mark Glines
2007-05-12 0:06 ` David Miller
2007-05-12 2:14 ` H. Peter Anvin
2007-05-12 3:18 ` Bernd Eckenfels
2007-05-14 20:19 ` Jan Engelhardt
2007-05-12 2:12 ` H. Peter Anvin [this message]
2007-05-12 19:10 ` Mark Glines
2007-05-12 19:12 ` H. Peter Anvin
2007-05-12 19:30 ` Mark Glines
2007-05-12 20:08 ` Alan Cox
2007-05-12 19:19 ` Alan Cox
[not found] <fa.6ICeqRTz5I23Pq+Z0ov/n8wicZE@ifi.uio.no>
[not found] ` <fa.IaUwa4kCMzO0RD0lNwacYsRlgXk@ifi.uio.no>
2007-05-12 1:03 ` Mark Glines
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=4645227F.3030905@zytor.com \
--to=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mark@glines.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