Tag Archives: rescan nics

Rescan NIC on Centos

After clone a VM (Centos 6) in Vmware i was not able to use the nic (eth0), after some research it was using the same original VM MAC-ADDRESS (00:0c:29:2c:a9:ae)

To solve it i did:

rm -f /etc/udev/rules.d/70-persistent-net.rules

Because this is my lab i can reboot my vservers whenever i want :), so i rebooted

After reboot i was able too see correct mac-address assigned to my vserver

[[email protected] ~]# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x8086:0x100f (e1000) (custom name provided by external tool)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:0c:29:2c:a9:af", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

Eth0 Interface pick up the right MAC and  i was able to communicate with my Lab World :)

[[email protected] ~]# vi /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=00:0C:29:2c:a9:af
TYPE=Ethernet
UUID=9e18221f-2e93-4326-8923-d3f834d15c62
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=static
IPADDR=10.0.0.100
NETMASK=255.255.255.0
GATEWAY=10.0.0.254