eth0 NIC Link is Down repeating message in kernel log

  1. check for errors on the wire, look at the "errors" field in the output of ifconfig. If non-zero then there are problems with hardware (cable, NIC card, or hub/switch). An unreliable Ethernet cable will give errors in this field too.
  2. replace the Ethernet cable, regardless of step 1. This is quick, cheap and easy, and should be done whenever your link is going up and down at random intervals.
  3. use ethtool and make sure the network settings (duplex, etc) match those on the switch. If you are not the admin of the switch, then ask the network admin to provide you with the settings.
  4. if the switch has flow control enabled, then be sure it is enabled on your Linux box. Otherwise, disable it.

As a side note, you should assess whether you need flow control. According to HP, it is only necessary for high-performance applications: see HP article on When to Use Flow Control


Here's my fix. This problem happens on specific hardware (on one machine only 1 out of 2 ports on the NIC), always with the e1000e driver, since kernel 3.9 or so. This file is for centos7, goes in /etc/init.d/ and has to be enabled with chkconfig --add <name>. The interface name is hardcoded...be sure to set it.

#!/bin/sh

### BEGIN INIT INFO
# Provides:          pm-e1000e-fix
# Required-Start:    $network
# Required-Stop:     $network
# Default-Start:     2 3 4 5
# Default-Stop:      0 6
# Short-Description: workaround for e1000e issue
# Description:       e1000e fix
### END INIT INFO

################################################################################
# Give Usage Information                                                       #
################################################################################
usage() {
    echo "Usage: $0 start|restart" >&2
    exit 1
}

################################################################################
# E X E C U T I O N    B E G I N S   H E R E                                   #
################################################################################
command="$1"
shift

interface="eth0"

case "$command" in
    start)
        ethtool -K "$interface" gso off gro off tso off
        ;;
    restart)
        ethtool -K "$interface" gso off gro off tso off
        ;;
    *)
        usage
        ;;
esac