From LedHed's Wiki
Jump to: navigation, search
(Created page with "== 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 a...")
 
 
Line 2: Line 2:
 
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.
 
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 ==
+
 
 +
== Solution 2 (old) ==
 
  echo "send dhcp-client-identifier = hardware;" >>/etc/dhcp/dhclient.conf
 
  echo "send dhcp-client-identifier = hardware;" >>/etc/dhcp/dhclient.conf
 
  rm /var/lib/dhcp/*
 
  rm /var/lib/dhcp/*
Line 11: Line 15:
  
 
== References ==
 
== 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
 
https://superuser.com/questions/1553094/force-to-use-mac-address-as-dhcp-client-id-on-debian-buster
  
  
 
[[Category:Linux]][[Category:Ubuntu]]
 
[[Category:Linux]][[Category:Ubuntu]]

Latest revision as of 10:47, 1 June 2022

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