Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 81973 - dhclient only works the second time around
Summary: dhclient only works the second time around
Keywords:
Status: CLOSED DUPLICATE of bug 81974
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: dhcp
Version: 8.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2003-01-15 22:12 UTC by Gabriel Schulhof
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-02-21 18:51:11 UTC


Attachments (Terms of Use)

Description Gabriel Schulhof 2003-01-15 22:12:24 UTC
Description of problem:
First of all, why don't you have dhclient in the list of components ?

The system:
Dell Latitude CPx with PIII700, 128MB RAM, ATI Mach 64, Pegasus-based USB 
ethernet

The kernel:
Vanilla 2.4.20 compiled so RedHat likes it (modular USB, sound, etc.)

The software:
RedHat 8.0

The story:
For the longest time, and across 2.4.18, 2.4.19, and 2.4.20, I would leave my
laptop on, and suspend it instead of powering it down.  Then I would resume at
another location, hotplug would fire up, set up eth0 (pegasus), DHCP an IP, and
be fine.  Then I got Internet service via a cable modem, service that includes 2
free IPs.  So I bought a small hub, hooked up all the cables to get the
connectivity right, and resumed my laptop.  Sure enough, it DHCP-ed an IP via
the hub, via the cable modem, from my ISP, and was fine (I could ping all the
sites I wanted).  But then, I did the unthinkable:  I rebooted my laptop. When
it came up, it hung on "Bringing up interface eth0".  Of course, it couldn't
grab an IP.  After frelling around with the cable modem, hub, et. al., I tried
running 
dhclient eth0
Much to my surprise, it worked.  So, I thought all was well again, and rebooted.
 Of course, it hung on eth0 again.  So I thought there was still something wrong
with my cable modem/hub setup and I went onto another network (at the
University) where the laptop used to grab IPs just fine.  Well, it didn't work
there either (at boot time).  I tried going into runlevel 1 and doing
ifconfig eth0 up
dhclient eth0

That hung, so I hit C-c.  I did dhclient eth0 again, and this time it worked.

Conclusion: For some unknown reason, ever since my reboot at the time when I
started using the hub with the cable modem, even on other networks, I have to
run dhclient, C-c it, then run it again, if I want to grab an IP.  I scripted
this workaround into /etc/sysconfig/network-scripts/ifup like so:

--- ifup        2003-01-15 14:57:36.000000000 -0500
+++ new.ifup    2003-01-15 14:57:15.000000000 -0500
@@ -183,6 +183,13 @@
        FWHACK=1
     fi
 
+    [ -x /sbin/dhclient ] &&
+        {
+        /sbin/dhclient ${DEVICE} &
+        sleep 2
+        /bin/kill -9 $!
+        }
+
     if [ -x /sbin/dhclient ] && /sbin/dhclient ${DHCLIENTARGS} ${DEVICE} ; then
        echo $" done."
     elif [ -z "`pidof -x dhclient`" ] && [ -x /sbin/dhcpcd ] && /sbin/dhcpcd
${DHCPCDARGS} ${DEVICE} ; then

Well, that's not exactly C-c, I know, but you can always replace kill -9 with
kill -INT.  I realize this is a dirty, ugly, rotten workaround, but it's the
only one that seems to work.

Version-Release number of selected component (if applicable):
dhclient-3.0pl1-9

How reproducible:
Every time

Steps to Reproduce:
1. Boot up
2. Watch it hang at "Bringing up interface eth0", even though it had worked a
million times before, on a myriad of different networks where DHCP was the means
of grabbing an IP.
3. Reboot
    
Actual results:
rc hangs on 'network start' for a time exceeding 3 minutes (that's the longest
I've waited for it to move on), namely on bringing up eth0 (pegasus based USB
eth NIC)

Expected results:
Bringing up interface eth0:                   [   OK   ]
within about 5-7 seconds

Additional info:
None

Comment 1 Daniel Walsh 2003-01-16 20:27:50 UTC

*** This bug has been marked as a duplicate of 81974 ***

Comment 2 Red Hat Bugzilla 2006-02-21 18:51:11 UTC
Changed to 'CLOSED' state since 'RESOLVED' has been deprecated.


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