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 157872 - DHCP client fails on boot, successful when invoked manually
Summary: DHCP client fails on boot, successful when invoked manually
Alias: None
Product: Fedora
Classification: Fedora
Component: kernel
Version: 3
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Kernel Maintainer List
QA Contact: Brian Brock
Depends On:
TreeView+ depends on / blocked
Reported: 2005-05-16 17:03 UTC by Nathaniel McAuliffe
Modified: 2008-02-11 18:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2008-02-11 18:29:05 UTC

Attachments (Terms of Use)
debugging dhclient-script (deleted)
2005-05-17 14:47 UTC, Jason Vas Dias
no flags Details
dhclient debugging results (deleted)
2005-05-17 16:17 UTC, Nathaniel McAuliffe
no flags Details

Description Nathaniel McAuliffe 2005-05-16 17:03:37 UTC
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):

How reproducible:

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 17:43:21 UTC
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:
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 19:39:47 UTC
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

Contents of ifcgf-eth0:

The card reports as a 3Com 3c980.

Comment 3 Jason Vas Dias 2005-05-16 21:11:02 UTC
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 12:25:06 UTC
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 14:47:39 UTC
Created attachment 114463 [details]
debugging dhclient-script

Comment 6 Jason Vas Dias 2005-05-17 14:54:34 UTC
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 14:59:09 UTC
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 15:00:44 UTC
 And then don't forget to move /sbin/dhclient-script-real back to
 /sbin/dhclient-script !

Comment 9 Nathaniel McAuliffe 2005-05-17 16:17:48 UTC
Created attachment 114469 [details]
dhclient debugging results

Comment 10 Jason Vas Dias 2005-05-17 16:50:52 UTC
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 ']'
+ 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 ']'
++ mii-tool eth0
+ output='eth0: 10 Mbit, half duplex, no link'
+ echo eth0: 10 Mbit, half duplex, no link
+ grep -q 'link ok'
+ echo eth0: 10 Mbit, half duplex, no link
+ grep -q 'no link'
+ return 0
+ m=0
+ check_ethtool eth0
+ '[' -x /sbin/ethtool ']'
++ ethtool eth0
+ output='Settings for eth0:
No data available'
+ echo Settings for eth0: No data available
+ grep -q 'Link detected: yes'
+ echo Settings for eth0: No data available

... repeats  

Comment 12 Nathaniel McAuliffe 2005-05-17 17:07:12 UTC
I double checked the card itself and it is a 3c980B.

Comment 14 Nathaniel McAuliffe 2005-07-20 18:02:55 UTC
Do you have any udates?

Comment 16 Matthew Miller 2006-07-10 21:42:08 UTC
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 18:29:05 UTC
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.