Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 482300 - net-misc/netifrc-9999 - Default dad_timeout is too low
Summary: net-misc/netifrc-9999 - Default dad_timeout is too low
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: netifrc (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: netifrc Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-24 07:47 UTC by Thomas Deutschmann (RETIRED)
Modified: 2013-08-28 16:02 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2013-08-24 07:47:16 UTC
Hi,

commit 6486f5a2fd87047fd4309ea91af583a26c7c6e0f introduced a patch for bug 481970.

The patch is valid, but a default value of 5 seconds is too low for many server NICs. Please adjust the default timeout to 10 seconds.

Remember that DAD will only start when the NIC has carrier (=reports that a cable with a link is attached). 5 seconds for DAD-only would be enough, but now we don't check for carrier anymore (well, the previous check was only a onetime check, which doesn't work) so we have to add this time to the DAD timeout.

=> 10 seconds should work on most systems.
Comment 1 William Hubbs gentoo-dev 2013-08-24 18:21:40 UTC
I see now that in the git repo we have two README files.
My intention was to not have a stub /etc/conf.d/net at all, but have the
doc/README get installed in DOCDIR and tell you how to write conf.d/net.

Since we now also have a README file at the top level, which README should
the ebuild install?
Comment 2 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-08-24 19:32:07 UTC
williamh:
PLEASE don't hijack bugs with completely unrelated comments. I have split your issue to bug 482350.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-08-24 19:34:08 UTC
thomas:
patches welcome, but 5 seconds works here on my supermicro gear in general.

But in general, for DAD to work, the NIC needs carrier, and STP forwarding needs be completed (if the port is in learning-only mode, traffic is dropped).

I think maybe we document the setting better for users to adjust themselves.
Comment 4 William Hubbs gentoo-dev 2013-08-24 20:20:02 UTC
@robbat2:
I guess that must have been a fat-finger or something that got the
comment about the README on this bug instead of where I wanted it to go.
Sorry about that.
Comment 5 Ian Stakenvicius (RETIRED) gentoo-dev 2013-08-26 14:47:46 UTC
(In reply to Robin Johnson from comment #3)
> thomas:
> patches welcome, but 5 seconds works here on my supermicro gear in general.
> 
> But in general, for DAD to work, the NIC needs carrier, and STP forwarding
> needs be completed (if the port is in learning-only mode, traffic is
> dropped).
> 
> I think maybe we document the setting better for users to adjust themselves.

Not knowing anything about STP forwarding I don't know if there's a way to leverage that, but for carrier would it make sense to leverage netplug? IE, recommend users use that even if they don't plan to (un)plug their cables on a regular basis -- Thomas, if you use netplug or ifplugd, do you need more than dad_timeout=5 ?
Comment 6 Thomas Deutschmann (RETIRED) gentoo-dev 2013-08-26 15:34:48 UTC
Hi,

I never used netplug or ifupd nor I plan to use it, so I cannot say.

With this bug report I wanted to share *my* experience, that dad_timeout 5 is too low, because like Robin said, before the kernel can actual run the duplicated address detection at all, the NIC must be ready and therefor I suggested a better default value ("Default values are generally intended to make a device (or control) usable "out of the box". A common setting, or at least a usable setting, is typically assigned." [1] ;-)).

My experience with multiple server NICs (bnx2, e1000 and r8169) is that it typically needs 6-7 seconds until your unconfigured NIC becomes available and ready to use (=you can bind addresses).

I don't see why setting the default timeout to 10s would be a problem at all. If 5s was fine, because on most hardware it only takes <=5s - defaulting to 10s wouldn't hurt anybody, because it will still only takes <=5s on most systems.

Only when you set a static address and do not have a cable with an active link attached, you would have to wait 5 more seconds.

But on systems with server NICs, which aren't that fast when you bring them up for this first time, 10s would be a good default. That's my definition of a good default value, because it would really minimize user interaction on most systems.

If you have made different experiences and therefor do not want to adjust the default value, I am fine with that. This is only a suggestion.


See also:
=========
[1] http://en.wikipedia.org/wiki/Default_%28computer_science%29
Comment 7 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2013-08-28 16:02:29 UTC
InGit