Bug 120427 - dhcp timeout should be 10 seconds by default
dhcp timeout should be 10 seconds by default
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: initscripts (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Bill Nottingham
: FutureFeature
: 136944 (view as bug list)
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2004-04-08 14:24 EDT by Brian "netdragon" Bober
Modified: 2014-03-16 22:44 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-09-30 16:48:26 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Brian "netdragon" Bober 2004-04-08 14:24:12 EDT
initscripts-7.49-1

Bug 64507 is about a dhcp timeout and got lost somewhere back there
and has apparently been abandoned.

The issue was a dhcp timeout causing the computer to seem to lock up
because dhcp has too large of a timeout period.

This is even worse in Fedora Core 2 test 2 because now you don't even
know its trying to do a dhcp check, it appears to freeze up in two
places, one is when it says "Uniform CD-Rom driver Revision x.xx" amd
another is when its doing the new graphical boot screen.

Although I have a router, I tested it by unplugging the cable. All we
need is a -t argument sent to dhcp.

I offered a solution in that bug, adding something like DHCP_TIMEOUT
to /etc/sysconfig/network by default. I think that'd be good because
then people could change the number and they'd see its there.

I think its also necessary to let people know why the computer is
stalling with some message like: "Doing a dhcp request, this could
take $DHCP_TIMEOUT seconds".

I am filing this bug because I can no longer comment in the bug 64507:

"You tried to change the component field from AfterStep-APPS to
initscripts, but only the owner or submitter of the bug, or a
sufficiently empowered user, may change that field."
Comment 1 Brian "netdragon" Bober 2004-04-08 15:29:49 EDT
I now can't figure out if that delay is caused by dhcp or what. The
delays occur at the point where it goes:

"Uniform CD-Rom Driver Revision"

and 

"Updating /etc/fstab" in the graphical part. And happened one time
when the ethernet cable was plugged in, but perhaps it still couldn't
get an IP.

I wish there were a better way to figure this out. Still, even though
I can't figure it out ^.^ , you should probably know better than I if
the timeout is ridiculously long still for dhcpcd. 5 seconds should be
fine by default, and users should have an easy way to configure it
system-wide and also be able to override it by interface. A setting of
DHCP_TIMEOUT in the /etc/sysconfig/network-scripts/ifcfg-xxx files
would probably be the best. It should be picked up each running of ifup.

Or should it be done through /etc/dhclient.conf

I created a file named /etc/dhclient.conf and put in "timeout 5;" and
if I then change it to 50, running "/sbin/network restart" still
appears to have a timeout of about 5. Yet, the changes do affect if I
run /sbin/dhclient. Is that value even used?

This is so frustrating, because I can't figure out exactly what's
going on. That's why I have to ask if the 60 second timeout still
occurs, since bug 64507 isn't marked fixed, and I now can't figure out
if the DHCP timeout is actually occuring or not even though I thought
it was at first.

I wish figuring this stuff out were easier.
Comment 2 Bill Nottingham 2004-04-08 16:06:26 EDT
Well....

There's a five second check for link before even starting dhclient...
if there's no link, dhclient won't even get started.

Aside from that, any timeouts with updfstab or the Uniform CD...
are completely unrelated to dhclient... they happen way before it gets
started.
Comment 3 Brian "netdragon" Bober 2004-04-08 17:07:24 EDT
ok, bleh. I thought it was something else.

I noticed /sbin/dhcpcd in the ifup script. Is that no longer used?
i.e. is it never a possibility someone would end up using that
instead? It seems in the ifup script that if /sbin/dhclient doesn't
exist, it'll use /sbin/dhcpcd. If so, should dhcpcd have a timeout val
to? If that's not an issue anymore (i.e. dhcpcd would never be used
again), then maybe bug 64507 should be marked fixed since RH9.0 is no
longer supported.

Lets say there is a link, but no dhcp server (like if i just went an
unplugged my switch right now from the firewall, would it then do the
standard dhcp timeout?
Comment 4 Bill Nottingham 2004-04-08 17:26:19 EDT
dhcpcd is for really old installs (it was shipped with 7.x.)

In the case of link but no server, yes, it would do the standard timeout.
Comment 5 Brian "netdragon" Bober 2004-04-08 17:33:38 EDT
> In the case of link but no server, yes, it would do the standard 
> timeout.

Based on /etc/dhclient.conf? If so, should there be a value of
"timeout 5"; in it?

> dhcpcd is for really old installs (it was shipped with 7.x.)

Is the dhcpcd stuff going to be removed from ifup?
Comment 6 Bill Nottingham 2004-04-08 18:04:14 EDT
If you want a 5 second timeout, 'timeout 5' would be appropriate. You
probably want longer, though. 30 seconds, maybe?

dhcpcd stuff will get removed one of these days.
Comment 7 Brian "netdragon" Bober 2004-04-08 18:15:06 EDT
I think 10 is all we need by default. If people want 30, they can
modify the default setting in /etc/dhclient.conf. Right now, as
tested, the default timeout is 60 seconds. I tested it by
disconnecting the uplink to my switch. If you think 10 is too short,
could we have at least a count-down appear to show how much time is
left within the timeout period? Maybe that's a good idea anyway.

For me, the update takes 4 seconds.

[root@netdragon1 tmphw]# date; /sbin/dhclient -q; date
Thu Apr  8 18:19:26 EDT 2004
/sbin/dhclient-script: configuration for sit0 not found.
Thu Apr  8 18:19:30 EDT 2004
Comment 8 Bill Nottingham 2004-10-25 17:33:14 EDT
*** Bug 136944 has been marked as a duplicate of this bug. ***
Comment 9 Barry K. Nathan 2004-10-26 21:40:11 EDT
This bug looks sort of like bug 64507 to me; that bug is currently
closed as WONTFIX.

Also, a long timeout is needed for those of us who are stuck with
flaky (but still usable) wireless connections. DHCP took about 33
seconds on the connection I'm using now.
Comment 10 Florian Effenberger 2004-10-27 03:45:33 EDT
Look at my suggestion of interrupting DHCP, maybe with "Press Ctrl-C
to override DHCP scanning"
Comment 11 Brian "netdragon" Bober 2004-10-27 06:10:28 EDT
Barry: That bug was marked WONTFIX because of link check, which wasn't
really a valid reason for marking it WONTFIX. If you read the former
comments, link check doesn't solve a no dhcp server issue. You can be
connected to a hub, but have no dhcp server, or have it down, and you
are dead in the water.

It's not necessary for the majority to wait 1 minute when a small
minority has a flaky wireless connection. The majority shouldn't be
punished. The setting can be modified in /etc/dhclient.conf
Comment 12 Bill Nottingham 2005-09-30 16:48:26 EDT
Closing bugs on older, no longer supported, releases. Apologies for any lack of
response.

Realistically, most of this code is going to be replaced in the future by
NetworkManager support; as such, I don't expect to be changing the default
timeouts. It is a locally modifyable config setting for those who need it, though.


Note You need to log in before you can comment on or make changes to this bug.