The linux network cannot be started, and the linux network device cannot be started.

A CentOS operating system was installed to test Nginx load balancing before, but it was useless for a long time. Once a colleague upgraded the VM, and recently wanted to test KeepAlived on it, so the service could not be connected.

I started to find the reason, I have been foolishly changing the ifcfg-eth0 configuration file, and it is always prompted when I restart the network.

3b2462528c15d575e6fdd3168ba60883.png

The device eth0 could not be found, so I used the ifconfig -a command to check all the current network devices, and found that eth0 does not exist, but there is an eth1, has the name changed? No matter how much it is, let's redo it.

So I directly modified the configuration of ifcfg-eth0, changed the device to eth1, tried to restart the network, and got an error again.

091d6ea779d0a0452979911f6776d0dd.png

At this time, it told me that the mac address was wrong, and I had to find the mac address of eth1 again.

open cat /etc/udev/rules.d/70-persistent-net.rules

Remember the mac address of eth1, then re-edit ifcfg-eth0, and replace the mac address inside

restart the network

service network restart

Get it! !

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324481961&siteId=291194637