From LedHed's Wiki
Jump to: navigation, search

Overview

Current versions of Linux distros are obtaining DHCP leases with Randomized MAC addresses which I find aggravating when trying to track down a host by MAC. It also blows up a DHCP reservation if you re-install an OS on the same Hardware/VM.

Solution 1

echo "      dhcp-identifier: mac" >>/etc/netplan/xxx.yaml
netplan apply


Solution 2 (old)

echo "send dhcp-client-identifier = hardware;" >>/etc/dhcp/dhclient.conf
rm /var/lib/dhcp/*
systemctl restart networking


References

https://superuser.com/questions/1338510/wrong-ip-address-from-dhcp-client-on-ubuntu-18-04

https://superuser.com/questions/1553094/force-to-use-mac-address-as-dhcp-client-id-on-debian-buster