How do you automatically detect a new network card in CentOS 6 / RedHat?

If your only problem is the mac address, you can run something similar to:

TEST=`ifconfig | grep eth | awk '{ print $5}'`; sed "s/HWADDR.*/HWADDR\=$TEST/g" ifcfg-eth0 > TMP; mv TMP ifcfg-eth0
 
To update the HWADDR entry.

Edit: Since it looks like the problem is an actual change in virtual hardware you can try the following.

edit /etc/sysconfig/hwconf and remove all reference to the previous NIC and rerun kudzu to see if it detects the new hardware. You may need to reboot.

You can use this tool also (This is not a GUI tool, its TUI tool, Text-based User Interface)

[root@localhost ~]# system-config-network-tui

Type above command and press Enter

 

Add Feedback