Centos7 network card configuration error problem solution (ifcfg-Wired_connection_1)

Centos7 network card error (ifcfg-Wired_connection_1)

In the centos7 system, we checked the network configuration information and found the following strange phenomena:

Check the network card IP information:
[root@linserver01 network-scripts]# ifconfig
Centos7 network card configuration error problem solution (ifcfg-Wired_connection_1)

View network card configuration file
[root@linserver01 network-scripts]# ls
Centos7 network card configuration error problem solution (ifcfg-Wired_connection_1)

As you can see, there is eth0 network card information, but there is no corresponding ifcfg-eth0 configuration file, instead there is a very strange configuration file, ifcfg-Wired_connection_1.

View the content of the configuration file, which is consistent with the information of eth0:
Centos7 network card configuration error problem solution (ifcfg-Wired_connection_1)

Then we edit the configuration file and restart the network service:

[root@linserver01 network-scripts]# systemctl restart network

However, the configuration does not take effect. The reason
is that there are currently two network management tools, NetworkManager and network, on CentOS.
If both configurations are configured, it will cause conflicts, and NetworkManager will clean up the routes when the network is disconnected. If some custom routes are not added to the NetworkManager configuration file, the routes will be cleaned up and need to be customized after the network is connected. Add it up.

Therefore, we need to restart the NetworkManager.service service:

[root@linserver01 network-scripts]# systemctl restart NetworkManager.service

Check service status:

[root@linserver01 network-scripts]# systemctl status NetworkManager.service

Centos7 network card configuration error problem solution (ifcfg-Wired_connection_1)

After restarting the service, the modified configuration of the network card will take effect, or restart the system.

Tutorial entrance:
Zabbix5.0 enterprise-level distributed monitoring system : detailed lectures and enterprise applications

Zabbix function:
a powerful network, equipment, system status monitoring software, through Zabbix can monitor all aspects of IT infrastructure, including software and hardware, operating system, network, virtualization, middleware and various business application systems, etc.

Tutorial content:
Centos7 network card configuration error problem solution (ifcfg-Wired_connection_1)

Guess you like

Origin blog.51cto.com/2221384/2543301