gdt: Kangaroo road sign (Default)
[personal profile] gdt

Before you replace the hardware edit /etc/udev/rules.d/70-persistent-net.rules. Find the line containing the interface name you are replacing, such as NAME="eth0". Within that line alter the ATTR{address} clause from the current NIC's MAC address to the new NIC's address.

If the interface uses DHCP then remove knowledge of the DHCP lease by removing /var/lib/dhcp/dhclient.NAME.leases.

Now power down, disconnect the power lead, change the NIC card, and re-power.

If you forget to edit 70-persistent-net.rules beforehand all is not lost, you'll simply need to tidy the file up to combine the old and new NIC device entries. Alternatively, if your care factor is low then echo -n > /etc/udev/rules.d/70-persistent-net.rules, reboot, and let the file be rebuilt; of course the order of allocation of NICs to interface names might change.

Follow a similar process when using a VM and changing from emulating a NIC card to using the faster virtio adapter. Or when cloning a VM and assigning new random MAC addresses.

Profile

gdt: Kangaroo road sign (Default)
Glen Turner

September 2021

S M T W T F S
   1234
567891011
121314151617 18
19202122232425
2627282930  

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated 2025-12-31 21:58
Powered by Dreamwidth Studios