Cloned Oracle Linux (OEL) is missing eth0

Normally I use Oracle Linux to do much of my testing because of its similarity to RedHat Linux.  However I had an issue when I cloned OEL (Oracle Enterprise Linux) in VMWare.  The problem with the cloned server is that it would not have the eth0 network interface (no IP address from the DHCP).

Note: I use a DHCP to assign the IP addresses to these cloned servers.

Troubleshooting:

Signs that I had a problem with the eth0 network interface missing with the cloned server.

  • ifconfig – When I ran the ifconfig command, I did not see the DHCP assigned IP address.

ifconfig

  • ip link show – When I ran the command ip link show, I did not see the network interface eth0.

iplinkshow

  • service network restart – I thought by running service network restart, that the network interface would be restarted.   When this command was run, I received the error:
    Bringing up interface eth0: Device eth0 does not seem to be present, delaying initialization.

Bringing up interface eth0

Resolution:

Need to follow all the step below.

  • Need to be logged on as root.
  • Run the command to remove this file: rm –f /etc/udev/rules.d/70-persistent-net.rules

70-persistent-net.rules

  • Next, edit the file ifcfg-eth0, run the command: vim /etc/sysconfig/network-scripts/ifcfg-eth0

ifcfg-eth0

  • Once the file is open for editing, remove two line from this file.  The line that starts with UUID, and the line that starts with HWADDR.

edit ifcfg-eth0

  • Make sure you save the file after removing the two lines by typing :wq
    • File should look something like below when completed

Edited ifcfg-eth0

  •  Then rename eth1 to eth0 with the command: ip link set eth1 name eth0
    • To verify that it was renamed: ip link show

ip link set eth1 name eth0

  • Now reboot the server: reboot

OEL reboot

 

 

  • Once the server has completed restarting, again log on the server as root and verify with the command ifconfig.

ifconfig with eth0

5 Comments