RHEL 5 ethtool reports no link even though the link light is lit

I had an issue today setting up a new machine (HP DL380 G7, RHEL 5.5 x86_64) where ethtool wasn’t reporting a link on any of the NICs despite the actual physical link lights being lit up.

# ethtool eth1
Settings for eth1:
        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 auto-negotiation: Yes
        Speed: Unknown!
        Duplex: Half
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: d
        Link detected: no

After a fair amount of hair pulling, I finally got it reporting correctly by setting the NICs to DHCP and trying to up them. Even though there was no DHCP server, just trying to up the interfaces got ethtool reporting correctly.

# cat /etc/sysconfig/network-scripts/ifcfg-eth1
# Broadcom Corporation NetXtreme II BCM5709 Gigabit Ethernet
DEVICE=eth1
BOOTPROTO=dhcp
HWADDR=<something>
ONBOOT=no
HOTPLUG=no
TYPE=Ethernet

# ifup eth1

Determining IP information for eth1... failed.

# ethtool eth1
Settings for eth1:
        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 auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: g
        Wake-on: d
        Link detected: yes
Advertisements

Ethernet Speed / Duplex / Autonegotiation Troubleshooting

Mismatched Ethernet settings can cause all sorts of network hell.  This chart shows the outcome of each possible configuration.

Autonegotiation Valid Configuration Table