Linux Device eth does not seem to be present delaying initialization

Posted on

This article is an article where the focus in on the trouble met in activating a network interface exist in an operating system specifically in Linux operating system. Although it has been changed and restart, it is stated that Device eth0 does not seem to be present, delaying initialization.

The available network configuration card available is only :

[root@localhost network-scripts]# ls
ifcfg-eth0 ifcfg-lo ifdown-eth ifdown-isdn ifdown-routes ifup ifup-eth ifup-isdn ifup-post ifup-sit init.ipv6-global network-functions-ipv6
ifcfg-eth1 ifdown ifdown-ippp ifdown-post ifdown-sit ifup-aliases ifup-ippp ifup-plip ifup-ppp ifup-tunnel net.hotplug
ifdown-bnep ifdown-ipv6 ifdown-ppp ifdown-tunnel ifup-bnep ifup-ipv6 ifup-plusb ifup-routes ifup-wireless network-functions
[root@localhost network-scripts]#

So, for the ethernet card interface adapter, the only available one is ifcfg-eth0 and ifcfg-eth1. But is it really exist ?. The thing is, the situation can be described as follows :

As the harddisk contains the information on the current hardware description where it is attached, after the harddisk is moved to another server with similar specification but different hardware id, the old network interface can no longer be identified.

So, in order to solve the case by searching what is the id of the network card in the new server, below is the execution of a specific command to find and to identify it :

ip link

The command itself is actually a command for specifying the object of network interface device. So, the main purpose is really to check and to see the available network interface device in the new server environment since the hard disk is moved to a different server with different peripheral and device attached including network interface device.

Below is the execution of the ‘ip link’ command to check the available network interface card :

[root@localhost network-scripts]# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue state UNKNOWN
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth3: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN qlen 1000
link/ether f4:ce:46:7e:d0:30 brd ff:ff:ff:ff:ff:ff
3: eth2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP qlen 1000
link/ether f4:ce:46:7e:d0:34 brd ff:ff:ff:ff:ff:ff
[root@localhost network-scripts]#

So, since the the available network device is only eth2 and eth3. The solution is quite simple.  Just copy the old file configuration used to define eth0 network interface device or any network interface device which has already worked in the previous server. After that just rename the device and remove the parameter which is specifically defining the old network interface device. For an example the one which is shown below is the content of ifcfg-eth0 which is located in /etc/sysconfig/network-scripts (it is vary depends on the distribution of the Linux operating system) :

DEVICE=eth0
HWADDR=XX:XX:XX:XX:XX:XX
TYPE=Ethernet
UUID=xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=xxx.xxx.xxx.xxx
PREFIX=24
GATEWAY=xxx.xxx.xxx.xxx
DNS0=xxx.xxx.xxx.xxx
DNS1=xxx.xxx.xxx.xxx
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no

Just copy it into the same location which is in /etc/sysconfig/network-scripts/ and rename it into ifcfg-eth2 since the available network interface device based on the ‘ip link’ command generated are eth2 and eth3. The command can be shown as follows :

[root@localhost network-scripts]# cp ifcfg-eth0 ifcfg-eth2

After that, edit the content of the file ifcfg-eth2 to math and to be adjusted as the network interface device identifier of eth2 as follows :

DEVICE=eth2
TYPE=Ethernet
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=xxx.xxx.xxx.xxx
PREFIX=24
GATEWAY=xxx.xxx.xxx.xxx
DNS0=xxx.xxx.xxx.xxx
DNS1=xxx.xxx.xxx.xxx
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no

Restart the network service using the following command :

service network start

And last but not least, check the status of the network service which can be shown in the following command execution :

[root@localhost network-scripts]# service network status
Configured devices:
lo eth0 eth1 eth2
Currently active devices:
lo eth2
[root@localhost network-scripts]#

As seen in the output above, the command execution output result in the Configured devices section can be fathomed as the list of network interface device which has the existing network configuration devices file such as ifcfg-ethx. The next output result in the Currently active devices is the list of network interface device which is currently active.

One thought on “Linux Device eth does not seem to be present delaying initialization

Leave a Reply