When cloning vm’s inside a ESX I always get a eth1 instead of eth0.
So here is what I do to fix that.
Step #1:Get Mac
ifconfig -a | grep hwaddr
eth0 Link encap:Ethernet HWaddr b8:ac:6f:65:31:e5
Step #2: Rename eth1 as eth0
vi /etc/udev/rules.d/70-persistent-net.rules
The names of the Ethernet devices are listed in this file as follows, also check the MAC address:
# PCI device 0x14e4:0x1680 (tg3)
SUBSYSTEM==”net”, ACTION==”add”, DRIVERS==”?*”, ATTR{address}==”b8:ac:6f:65:31:e5″, ATTR{dev_id}==”0x0″, ATTR{type}==”1″, KERNEL==”eth*”, NAME=”eth0″
Save and close the file. Reboot the system to test changes:
Step #3: Restart the server
Verify new settings:
ifconfig -a
ifconfig eth0
ifconfig -a | less
ip addr show

1 thought on “Linux how to change interface name

  1. Hi,
    it’s much easier to just delete this file … it would be auto-recreated at next boot 😉

Leave a Reply

Your email address will not be published. Required fields are marked *