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:
shutdown -h nowfrom a commandline should do the trick ).
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 should first check you see it listed with this command:
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
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.
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.
ifconfig -a too see which network adaptors are conencted to the box, then assign an IP to it by doing
ifconfig eth# 192.168.0.2 netmask 255.255.255.0 or whatever your IP is.