Bug 717330 - /etc/init.d/network ifup fails on dhcp configured client
Summary: /etc/init.d/network ifup fails on dhcp configured client
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: initscripts
Version: 6.1
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: initscripts Maintenance Team
QA Contact: qe-baseos-daemons
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-28 15:09 UTC by John Sopko
Modified: 2011-06-28 20:02 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-28 19:20:05 UTC
Target Upstream Version:


Attachments (Terms of Use)

Description John Sopko 2011-06-28 15:09:00 UTC
Description of problem:


Version-Release number of selected component (if applicable):
initscripts-9.03.23-1.el6.x86_64

How reproducible:
Always.

Steps to Reproduce:
1. boot system
2. or run ifup command
3.
  
Actual results:
See below

Expected results:
Would like dhcp configured eth0 to start on boot.

Additional info:

On Red Hat 6.0 and 6.1 using dhcp on boot fails with:

Determining IP information for eth0... failed; no link present.  Check cable?

I was hoping that rhel6.1 was going to fix but it did not. The same
system works fine with Red Hat 5.x.

Using a static IP in ifcfg-eth0 works. Using NetworkManager works as
long as 'NETWORKWAIT=yes" option is added to /etc/sysconfig/network else
NetworkManager fails.

Running "ifup eth0" with a dhcp configuration fails the first time.
Running "ifup eth0" a second time works.


NetworkManager manger service is turned off, daemon not running.
Client configured to use dhcp only, here is the ifcfg-eth0 settings:

DEVICE="eth0"
ONBOOT="yes"
TYPE="Ethernet"
HWADDR="00:01:6C:8F:D4:04"
BOOTPROTO="dhcp"
IPV6INIT="yes"
MTU="1500"
NM_CONTROLLED="no"


The intefrace was turned off with "ifdown eth0", then I try
to bring it up:

# ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:01:6C:8F:D4:04  
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:222500 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21468 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:27699281 (26.4 MiB)  TX bytes:2074947 (1.9 MiB)
          Interrupt:16 Memory:d8080000-d80a0000 

# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: Unknown
        Supports Wake-on: pumbag
        Wake-on: g
        Current message level: 0x00000001 (1)
        Link detected: no

# ifup eth0
Determining IP information for eth0... failed; no link present.  Check cable?

# ethtool eth0
Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: No
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: off
        Supports Wake-on: pumbag
        Wake-on: g
        Current message level: 0x00000001 (1)
        Link detected: yes

Note that the link is now detected and the second time ifup is
run the interface comes up:

# ifup eth0
Determining IP information for eth0... done.

#ifconfig eth0
eth0      Link encap:Ethernet  HWaddr 00:01:6C:8F:D4:04  
          inet addr:152.2.130.183  Bcast:152.2.143.255  Mask:255.255.240.0
          inet6 addr: fe80::201:6cff:fe8f:d404/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:227430 errors:0 dropped:0 overruns:0 frame:0
          TX packets:21708 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:28125605 (26.8 MiB)  TX bytes:2097733 (2.0 MiB)
          Interrupt:16 Memory:d8080000-d80a0000 




first ifup eth0 /var/log/messages:
----------------------------------

Jun 28 09:04:03 tophat kernel: ADDRCONF(NETDEV_UP): eth0: link is not ready
Jun 28 09:04:10 tophat kernel: e1000e: eth0 NIC Link is Up 1000 Mbps Full Duplex, Flow Control: None
Jun 28 09:04:10 tophat kernel: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

Note it takes 7 seconds for the link to become ready. Here is the card info:

# lspci | grep Ethernet
02:00.0 Ethernet controller: Intel Corporation 82573E Gigabit Ethernet Controller (Copper) (rev 03)

The check_link_down function in /etc/sysconfig/network-scripts/network-fucntions
is failing when called by /etc/sysconfig/network-scripts/ifup-eth. I cannot
figure out why.

The "ethtool --test eth0 online" and offline tests pass fine. The system
works fine once the interface is running. Thanks for any help.

Comment 1 Bill Nottingham 2011-06-28 15:17:07 UTC
What's your switch configuration?

Comment 2 Bill Nottingham 2011-06-28 15:17:47 UTC
Note that if it takes longer for your link to appear, setting LINKDELAY in your config should solve your issue.

Comment 4 John Sopko 2011-06-28 17:50:10 UTC
I will have to investigate our switch configuration. I have managed 
many rhel 3,4,5 systems and never had to use a LINKDELAY. I added
LINKDELAY=10 to /etc/sysconfig/network-scripts/ifcfg-eth0 and
that fixed. The LINKDELAY option is not mentioned in the
rhel6.x install, release or deployment guides. I did see
it in the knowledge base. Thanks for you quick response.
I guess you can close.

Comment 5 Bill Nottingham 2011-06-28 19:20:05 UTC
It's possible there's a driver change that affects link negotiation time, as well. The default delay has been five seconds for quite a while.

Comment 6 John Sopko 2011-06-28 20:02:37 UTC
The machine having the problem is dual boot with ubuntu 10.04, it took 5 seconds
for the interface to come up using "ip link set eth0 down" and then watching
the syslog after running "ip link set eth0 up" in ubuntu. So a slower driver
may be the case. Using NetworkManager with the NETWORKWAIT=yes and dhcp is
probably the best choice. Thanks.


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