How to restore network / internet access after replacing your NIC or Motherboard in Linux

When changing your network card or motherboard, your Mac address will change and this will cause your config to become incorrect.

I recently had this problem after the motherboard of my server failed and I have to replace it. This is how I resolved the issue:

Step 1. Make a copy of and delete /etc/udev/rules.d/70-persistant-net.rules
Step 2. Run ip a to find your new device’s mac address.
mac-address
Step 3. Edit /etc/sysconfig/network-scripts/ifcfg-eth0 and add the mac address from step to into the HWADDR value. (Note: This assumes your NIC is eth0, please adjust as necessary.)
Step 4. Reboot

This entry was posted in FAQ, Linux and tagged , . Bookmark the permalink.

Leave a Reply

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