Bug 157872 - DHCP client fails on boot, successful when invoked manually
DHCP client fails on boot, successful when invoked manually
Status: CLOSED INSUFFICIENT_DATA
Product: Fedora
Classification: Fedora
Component: kernel (Show other bugs)
3
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Kernel Maintainer List
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-16 13:03 EDT by Nathaniel McAuliffe
Modified: 2008-02-11 13:29 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2008-02-11 13:29:05 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)
debugging dhclient-script (396 bytes, text/plain)
2005-05-17 10:47 EDT, Jason Vas Dias
no flags Details
dhclient debugging results (1.90 KB, application/x-gzip)
2005-05-17 12:17 EDT, Nathaniel McAuliffe
no flags Details

  None (edit)
Description Nathaniel McAuliffe 2005-05-16 13:03:37 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.7) Gecko/20050416 Fedora/1.0.3-1.3.1 Firefox/1.0.3

Description of problem:
When the box boots, linux fails to bring up eth0. After OS successfully boots, dhclient run manually successfully leases address and creates a link.

Version-Release number of selected component (if applicable):
dhclient-3.0.1-42_FC3

How reproducible:
Always

Steps to Reproduce:
1.Hard or soft boot box
2.After login, open up terminal and run 'dhclient'
3.eth0 is brought up
  

Actual Results:  eth0 successfully came up

Expected Results:  eth0 should be brought up correctly during boot

Additional info:
Comment 1 Jason Vas Dias 2005-05-16 13:43:21 EDT
Please supply some further information .

Do you have SELinux enabled ? 

Have you used system-config-network (or neat) to setup your interfaces ?

What are the contents of your /etc/sysconfig/network-scripts/ifcfg-eth0 file ?
In order for an interface X to be brought up during boot with DHCP, you must 
put the following in your /etc/sysconfig/network-scripts/ifcfg-X file:
"
DEVICE=X
BOOTPROTO=DHCP
ONBOOT=yes
"
where X is the name of the interface (eg. "eth0") .

I cannot duplicate this problem - with dhcp-3.0.1-42_FC3 on FC3 with
SELinux enabled, all my DHCP interfaces are brought up fine during boot -
so your help in diagnosing the problem in your case would be appreciated.

Comment 2 Nathaniel McAuliffe 2005-05-16 15:39:47 EDT
SELinux is enabled.

eth0 was set up automatically during the install. I used system-config-network
to manually delete the connection and the NIC. I then recreated everything
manually. 

Contents of ifcgf-eth0:
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
DHCP_HOSTNAME=fsucacti.ferris.edu
USERCTL=no
PEERDNS=yes
IPV6INIT=no

The card reports as a 3Com 3c980.
Comment 3 Jason Vas Dias 2005-05-16 17:11:02 EDT
Does the DHCP interface configuration succeed during boot if you
boot with the kernel argument "selinux=no" ? 
( you can set this from the initial boot grub screen, press <ESC>
  and then 'a', and then type 'selinux=no', and press return 
). 
If so, please boot without the "selinux=no" argument, reproducing the
problem, and run 
   # audit2allow < /var/log/messages > /tmp/selinux_avc.log
and append the /tmp/selinux_avc.log to this bug.  

If not, please check:
  - do you have "NETWORKING=yes" in /etc/sysconfig/network ? 

When you say DHCP configuration succeeds when dhclient is run manually,
do you mean you ran the "/sbin/dhclient" command, or the "ifup eth0" command ?

Does DHCP configuration succeed when you run the command "ifup eth0" as root ?



Comment 4 Nathaniel McAuliffe 2005-05-17 08:25:06 EDT
The same things happen when I add "selinux=no" to the kernel arguments. 

Here is the output of selinux_avc.log:
allow httpd_sys_script_t binfmt_misc_fs_t:filesystem getattr;
allow httpd_sys_script_t devpts_t:filesystem getattr;
allow httpd_sys_script_t httpd_log_t:file ioctl;
allow httpd_sys_script_t proc_t:filesystem getattr;
allow httpd_sys_script_t sysfs_t:filesystem getattr;
allow httpd_sys_script_t tmpfs_t:filesystem getattr;
allow httpd_sys_script_t usbfs_t:filesystem getattr;
allow httpd_sys_script_t var_lib_nfs_t:dir search;
allow httpd_sys_script_t var_t:dir getattr;
allow mysqld_t var_log_t:file append;


"NETWORKING=yes" in /etc/sysconfig/network does exist.

ifup eth0 does not work. It produces the same results as boot. I still need to
run dhclient afterwords. I am running the dhclient command.
Comment 5 Jason Vas Dias 2005-05-17 10:47:39 EDT
Created attachment 114463 [details]
debugging dhclient-script
Comment 6 Jason Vas Dias 2005-05-17 10:54:34 EDT
Great! Thanks for the information. We've narrowed it down to a networks
scripts problem .

Please do the following.
  1. Download the attached 'dhclient-script-dbg' debugging dhclient script file.
  2. Install it:
     # mv /sbin/dhclient-script /sbin/dhclient-script-real
     # mv dhclient-script-dbg /sbin/dhclient-script
     # restorecon /sbin/dhclient-script
     # mkdir /tmp/dhcp
     # chcon /tmp/dhcp dhcpc_t 
  3. Run "ifup eth0" in debugging mode:
     (first bring it down):
     # ifdown eth0
     # pkill dhclient
     
     # bash -xf /sbin/ifup eth0 2>&1 | tee /tmp/dhcp_ifup.log
  
  
Comment 7 Jason Vas Dias 2005-05-17 10:59:09 EDT
Whoops! I pressed return too soon. As I was saying:

   Once the ifup completes:
 
   # pkill dhclient
   # tar -xpvf - /tmp/dhcp* | gzip > dhcp_dbg.tar.gz   

   Then please append the dhcp_dbg.tar.gz to this bug.

   (You can omit the "chcon" command above).
   

Comment 8 Jason Vas Dias 2005-05-17 11:00:44 EDT
 And then don't forget to move /sbin/dhclient-script-real back to
 /sbin/dhclient-script !
Comment 9 Nathaniel McAuliffe 2005-05-17 12:17:48 EDT
Created attachment 114469 [details]
dhclient debugging results
Comment 10 Jason Vas Dias 2005-05-17 12:50:52 EDT
Aha! We've found the problem :

ethtool is failing to detect your ethernet card settings, 
while it is evident that there is no problem with your
ethernet card or kernel driver module, as dhclient can
bring it up fine if given the chance to run.

I'm moving this bug to ethtool. 

This "ifup eth0" -x debug output shows ethtool is failing
to detect the card (a 3Com 3c980 ?) status correctly :
 
+ echo -n 'Determining IP information for eth0...'
Determining IP information for eth0...+ check_link_down eth0
+ '[' -x /sbin/mii-tool -o -x /sbin/ethtool ']'
+ LC_ALL=C
+ ip link show dev eth0
+ grep -q UP
+ ip link set dev eth0 up
+ timeout=0
+ '[' 0 -le 10 ']'
+ check_mii_tool eth0
+ '[' -x /sbin/mii-tool ']'
++ LC_ALL=C
++ mii-tool eth0
+ output='eth0: 10 Mbit, half duplex, no link'
+ echo eth0: 10 Mbit, half duplex, no link
+ LC_ALL=C
+ grep -q 'link ok'
+ echo eth0: 10 Mbit, half duplex, no link
+ LC_ALL=C
+ grep -q 'no link'
+ return 0
+ m=0
+ check_ethtool eth0
+ '[' -x /sbin/ethtool ']'
++ LC_ALL=C
++ ethtool eth0
+ output='Settings for eth0:
No data available'
+ echo Settings for eth0: No data available
+ LC_ALL=C
+ grep -q 'Link detected: yes'
+ echo Settings for eth0: No data available

... repeats  
Comment 12 Nathaniel McAuliffe 2005-05-17 13:07:12 EDT
I double checked the card itself and it is a 3c980B.
Thanks!
Comment 14 Nathaniel McAuliffe 2005-07-20 14:02:55 EDT
Do you have any udates?
Comment 16 Matthew Miller 2006-07-10 17:42:08 EDT
Fedora Core 3 is now maintained by the Fedora Legacy project for security
updates only. If this problem is a security issue, please reopen and
reassign to the Fedora Legacy product. If it is not a security issue and
hasn't been resolved in the current FC5 updates or in the FC6 test
release, reopen and change the version to match.

Thank you!
Comment 17 petrosyan 2008-02-11 13:29:05 EST
Fedora Core 3 is not maintained anymore.

Setting status to "INSUFFICIENT_DATA". If you can reproduce this bug in the
current Fedora release, please reopen this bug and assign it to the
corresponding Fedora version.

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