Fix ethtool no such device error

[ad_1]

Webmaster and online service providers often inform that they are receiving a “no such device” message while using the ethtool command. This happens due to missing interface, driver issue etc.

As a part of our Server Management Services, we have helped online service providers to fix several similar Cloudflare errors.

Today, let’s discuss some tips to fix the DNS resolution error.

What causes ethtool no such device error?

Ethtool is a Network Interface Card configuration command that allows you to retrieve information and change your NIC settings. At times users may face a “no such device” error message while using this command. The typical error message looks like :

ethtool no such device error

The common reasons for this error message include:

1. Missing Interface or it renamed to any other name

2. Driver issue

3. Selinux block

How to troubleshoot ethtool no such device error?

The first step to start troubleshooting the issue would be to check the dmesg output. dmesg is a command that Linux operating systems use to print the message buffer of the kernel. Since we here need the output related to an interface, we can use the following command to collect the required details:

dmesg | grep <interface_name>

For example, for the interface eth0 ,

dmesg |grep eth0

The output of the above command may resemble the one given below:

bnx2 0000:04:00.0: eth0: Broadcom NetXtreme II BCM5708 1000Base-T (B2)
PCI-X 64-bit 133MHz found at mem c8000000, IRQ 18, node addr 00:14:5e:fd:6d:76
udev: renamed network interface eth0 to eth3

It confirms that the reason here is that the network interface was renamed from eth0 to eth3. Rename of the interface file or performing a cleanup of the subsystem will help to fix this error.

Let us now look at the steps to fix the error.

Rename the file

As we discussed earlier, if the rename of the interface triggers the no such device message, changing the interface file name fixes the error. For instance, if the interface was renamed from eth0 to eth3, we could follow the steps below:

1.Rename ifcfg-eth0 file to ifcfg-eth3

# mv /etc/sysconfig/network-script/ifcfg-eth0 /etc/sysconfig/network-script/ifcfg-eth3

2. Rename DEVICE parameter inside /etc/sysconfig/network-script/ifcfg-eth3

DEVICE=”eth3″
…
…

Another method is actually to clean up all the SUBSYSTEM Information and reboot. Hopefully, the eth0 is mapped back to /etc/sysconfig/network-script/ifcfg-eth0

Alternatively,  try modifying the /etc/udev/rules.d/70-persistent-net.rules and reboot. For instance, the contents of the file may resemble:

# PCI device 0x0000:0x0001 (bnx2)

SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”,
ATTR{address}==”00:00:00:00:00:01″, ATTR{type}==”1″,
KERNEL==”eth*”, NAME=”eth3″

The value of the NAME field needs to be changed to eth0. Once you are done, reload the udev configuration with the command start_udev

# start_udev

Finally, the network configuration needs to be updated.

# service network restart

Disable Selinux

Another option to fix the no such device error is to disable Selinux. Selinux is a Linux kernel security feature for access control. We could cross-check the status of it using the command below:

#sestatus

To disable SELinux on CentOS 7 temporarily, we can use the command

#setenforce 0

Similarly to set it disabled permanently, we will need to edit the SELinux configuration file.

#vi /etc/selinux/config  and set the SELINUX to disabled

Finally, reboot the server for the changes to take effect.

[Need assistance to fix ethtool no such device error? We’ll help you.]

Conclusion

In short, no such device error occurs due to reasons like renamed interface name, SELinux block etc. Today we discussed some tips that our Support Engineers follow to fix the ethtool error.

[ad_2]

Source link

Leave a Comment

Your email address will not be published. Required fields are marked *