This method is used to solve the problem where the new Nic is changed to eth1 and the source Nic name is eth0, which cannot be used by the new Nic. It can also be used to rename a nic. After the nic mac address is changed, find the NIC in Linux. The new NIC will be identified as eth1 or written to/etc/udev/rules. in the d/70-persistent-net.rules file, modify/etc/udev/rules. d/70-persistent-
This method is used to solve the problem where the new Nic is changed to eth1 and the source Nic name is eth0, which cannot be used by the new Nic. It can also be used to rename a nic.
After the nic mac address is changed, find the NIC in Linux. The new NIC will be identified as eth1 or written to/etc/udev/rules. in the d/70-persistent-net.rules file, modify/etc/udev/rules. in the d/70-persistent-net.rules file, modify the MAC address of eth0 to the changed address.
Edit
/Etc/udev/rules. d/70-persistent-net.rules
Root @ shangyuan-laptop:/etc/udev/rules. d # more 70-persistent-net.rules
# This file maintains persistent names for network interfaces.
# See udev (7) for syntax.
#
# Entries are automatically added by the 75-persistent-net-generator.rules
# File; however you are also free to add your own entries.
# PCI device 0x14e4: 0x1713 (tg3)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 1e: ec: 0f: 79: f
6 ", ATTR {type }==" 1 ", KERNEL =" eth * ", NAME =" eth0"
# PCI device 0x8086: 0x4222 (iwl3945)
SUBSYSTEM = "net", ACTION = "add", DRIVERS = "? * ", ATTR {address} =" 00: 1f: 3c: 48: 70: B
1 ", ATTR {type }==" 1 ", KERNEL =" wlan * ", NAME =" wlan0"
Change eth0 to eth1. Save the settings and restart the system.