#Centos network card inconsistency causes problems

Problem Description:

Today I need to check the speed of the network card of the virtual machine, but I found that the speed cannot be checked through ethtool. I found that the name of the network card does not match the configuration file through ip add and the information in the network-script file.

Solutions:

In the /etc/sysconfig/network-scripts directory, directly rename the ifcfg-ens18 file to ifcfg-eth0, and then modify the file content:

NAME=eth0
DEVICE=eth0
UUID=***  ("nmcli con"命令查看)
HWADDR=*** (mac地址,用ifconfig或ip addr里的内容填上)

Then restart the network service

After testing, it is already possible to view the interface rate.

 

 

Guess you like

Origin blog.csdn.net/jiuyou91/article/details/127958008