Remove Old eth0 or eth1 from CentOS Linux

Remove Old eth0 or eth1 from CentOS Linux

Remove Old eth0 or eth1 from CentOS Linux

In this scenario, we have a backup server, that has a BOND interface. One of the network cards ifcfg-eth1 has died. The device has since then been replaced, HOWEVER, we want our new NIC to be eth1 rather than eth2.

Login, and su to root

Root shell prompt on the backup1 server

change to the following directory

cd /etc/udev/rules.d

copy the rule set to /root

cp 70-persistent-net.rules /root/ to back up the udev NIC rules

remove the rule set and reboot (you will have to re-configure your network connections via KVM or directly after this next step)

Same cp 70-persistent-net.rules /root/ command shown under the remove and reboot step

once rebooted, get the MAC address of the new NIC

ifconfig eth1 | grep HW showing the new NIC MAC address

in this case, we have a BOND interface setup, so one of the MAC addresses stays the same, our network connection came back up, from here all i need to do is re-configure eth1 (used to be eth2)

ls /etc/sysconfig/network-scripts with ifcfg-bond0, ifcfg-eth0 and ifcfg-eth1

from here ifcfg-eth1, and now all i have to do is change the MAC address as necessary

service network restart bringing up bond0 and loopback OK

from here i have to restart network connections

Same screenshot: service network restart with bond0 back up

done!

cat /proc/net/bonding/bond0 output showing eth0 and eth1 up in round-robin bonding

Bond Working Again!

That’s it!

Hosted Linux servers at www.zwiegnet.com/go

Related guides: Redundant NIC Configuration (bond) CentOS | Configure Bond Interface Oracle Linux 6

Leave a Reply

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