eternallkp.blogg.se

Centos change network adapter mac address
Centos change network adapter mac address









centos change network adapter mac address

Although my data was save, the server wouldn’t connect to the network anymore – because it had a new MAC address. Lucky for me, the data centre could simply swap out my hard disks and put them into another server. This will assign the eth1 profile to the new network card by identifying it via its MAC address.I had an issue with one of my servers the other day: its power supply died unexpectedly during a scheduled restart. Then, open up the network settings profile: nano /etc/sysconfig/network-scripts/ifcfg-eth1Īnd edit HWADDR line with the new MAC address:

centos change network adapter mac address

If this happens, change it back:Ĭtrl-O and Ctrl-X to save and exit the file. In some cases, it may assign the network card a different name, such as eth2 instead of eth1. In this case, the MAC address is aa:bb:cc:11:22:33. After that, replace the card and delete the persistent rules file as above.Īfter the reboot, you need to get the MAC address of the new NIC, so open up the rules file: nano /etc/udev/rules.d/lesĪnd look for the MAC address of the new NIC: Whichever MAC address changes in this file after the replacement will be the new network card.

centos change network adapter mac address

Make a quick note of MAC addresses (you do not need to write them down). Then, open up the network rules file from above: nano /etc/udev/rules.d/les First, you need to note which interface it was originally assigned (such as eth1).

centos change network adapter mac address

If you are replacing a NIC that was already configured, you do not need to re-do the entire configuration. If you are adding a new NIC, you can configure its network settings (such as IP address or gateway) with the network configuration wizard: system-config-network Replacing a NIC While it is possible to manually edit it, it is usually simpler to just delete it and reboot the system, so it rescans network adapters attached to the system and acquires their MAC addresses. Setup the new NIC via the network configuration wizard: system-config-networkĬentOS stores its current network adapter configuration in les file. Reboot and CentOS will re-acquire network adapters attached to the system. You can reset your network card configuration by deleting the /etc/udev/rules.d/les file: rm /etc/udev/rules.d/les Getting CentOS to recognize a new external network card.











Centos change network adapter mac address