Centos network card eth1 becomes eth0 modification method

  

In virtualization, the virtual machine network card cloned from the template will be named eth1, and some programs or scripts, related to the network card, the default is eth0, then There is a problem with changing eth1 to eth0, as follows:

#vi /etc/udev/rules.d/70-persistent-net.rules

70-persistent-net.rules The contents of the old network card are still retained, and the new network card is recognized as eth1. Comment out the line indicating the old network card, and then change eth1 in the line indicating the new network card to eth0

#mv /etc/sysconfig/network-scripts/ifcfg-eth1 /etc/sysconfig/network-scripts/Ifcfg-eth0

Then edit the /etc/sysconfig/network-scripts/ifcfg-eth0 file and change eth1 to eth0:

vi /etc/sysconfig/network-scripts /ifcfg-eth0

Restart.

Copyright © Windows knowledge All Rights Reserved