My company has a CentOS 5 Linux server. The network card died today and we replaced it with an Intel Pro 1000 GT network adapter.

I'm not great with Linux. How can I get this new NIC working?



The easiest way is to have the new card assume the same device name (eth0). Do this by:

  • Delete the /etc/udev/rules.d/70-persistent-net.rules file. This is the file that ties hardware devices to ethX interfaces, causing your replacement card to become eth1 or eth2. Hopefully we can prevent that.
  • Shutdown the server ( shutdown -h now from a commandline should do the trick ).
  • Disable the onboard NIC in the BIOS, or remove the defective card.
  • Start the system up again. If the replacement card has assumed the same ethX device, it should start up with the same networking configuration. Check with ip addr or ifconfig -a.

These steps assume you have a fairly simple server which had one ethernet card, and needs to have it replaced with another single ethernet card.

  • You could also open the "70-persistent-net.rules" in a text editor, and simply remove the line that corresponds to the old/dead NIC. Thus making it so that only the new card will get the old one's ID. – Soviero Nov 19 '11 at 6:51

You should first check you see it listed with this command:

ifconfig -a

Each entry beginning with 'eth' stands for a detected network card. If you see none, you will have to troubleshoot as it's likely unsupported.

If you do see it listed, remember its name (for example: eth1) and do this:

cd /etc/sysconfig/network-scripts
cp ifcfg-eth0 ifcfg-eth1 # this assumes the old card was eth0 and the new one is eth1
sed -i 's/eth0/eth1/g' ifcfg-eth1 # or edit it by hand and change eth0 to eth1 where it appears

Then reboot.

I hope it's clear and it works. You can do it other ways, but this is quick and I think has the advantage of using the old config so you get to keep IP, netmask and other configs by default.

  • The nics listed by ifconfig -a are eth1 and eth2. I'm pretty sure that eth2 is the new adapter. In /etc/sysconfig/network-scripts, I don't see ifcfg-eth0, but I do see ifcfg-eth0.bak. Should I use that for the config? – Ronnie Overby Apr 11 '11 at 19:56
  • It depends on whether the old adapter was eth0 or eth1. If it was eth0 go with ifcfg-eth0.bak, otherwise use ifcfg-eth1 if available. A "simple" if somewhat convoluted way to find out which NIC is which eth* is to take the MAC address listed by ifconfig and run it through a site like this. This only works if each NIC comes from a different vendor, though! – Eduardo Ivanec Apr 12 '11 at 23:40

Each nic will get a new ethN interface number. From what you've said, it sounds like eth0 is the interface that died and eth2 is the new NIC you'd like to use.

First, look at the config file for eth0.bak. That should give you some clues as to how the interface was previously setup. Note the IP address, netmask, and default route. Double check these in your DNS and network configuration.

Next, see if you have the following utility installed: system-config-network. I like the command line version but there is a GUI version as well. For details see here:


If it's not installed, run "yum -y install system-config-network"

Next, run system-config-network in either text or GUI mode and move the configuration that was previously on eth0 over to your new eth2.

Next, run "service network restart"

Finally, run "ifconfig" and look at your running configuration. Try pinging a few hosts to make sure you are all setup.


Do ifconfig -a too see which network adaptors are conencted to the box, then assign an IP to it by doing ifconfig eth# netmask or whatever your IP is.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.