Resolving “Disconnecting Failed” network adapter issue in Linux

RH fix network post

I was recently installing the latest version of Red hat Linux in my virtual environment. When I ran through the installation, I noted that the installer did not automatically find the network adapter. Well, I thought to myself, that will get quickly resolved as soon as I install VMware tools.

Since I had no network connectivity, I was accessing the machine through iSphere’s console. I went ahead and installed VMware tools thinking that would enable my vmxnet3 adapter. But, afterwards, when I ran “service network restart”, the machine’s response was “disconnecting failed: this device is not active”.

What’s going on here?

Turns out that Linux configures the network adapter automatically, specifying the MAC address of the hardware it thinks it has, and DHCP. The latter was fine, since I was not planning on setting up this workstation with a static IP address. But, the former had a strange value, which I am not sure where it came from. With this incorrect MAC address, which Linux couldn’t find associated hardware for, the network would not start. The resolution was as follows:

  1. Recreate the problem:
    • Open a terminal window by using Applications | Other | Terminal
    • Run the command: service network restart
    • Notice the red failed message
  2. Edit the network settings:
    • Goto the correct directory: cd etc/sysconfig/network-scripts
    • Save a backup copy of your configuration: cp ifcfg-eth0 *.back
    • Edit the configuration: vi ifcfg-eth0
    • Remove a bunch of lines, including the MAC address. Setup only six lines, as follows:

      DEVICE=eth0
      BOOTPROTO=dhcp
      NM_CONTROLLED=no
      ONBOOT=yes
      TYPE=ethernet
      IPV6INT=no
    • Save your configuration changes: escape :wq
  3. Validate the resolution:
    • Run the command: service network restart
    • Notice the OK messages in response
    • Ping other machines in your network

You will note that I turned off IPv6 on this machine. Obviously, don’t do this if you are actually using IPv6. Anyway, once I had the network card working, I could access other network resources, and I happily moved forward.