Ubuntu 18.04+ Server: Use MAC Address for DHCP

datallboy

datallboy
Server Admin
Fennec
Ruppell
Red
Member
Sometimes Ubuntu 18.04 server will not use the MAC address for DHCP connections. To enable this, you need to edit your netplan file located at /etc/netplan/xxx.yaml and add the dhcp-identifier: mac setting.

Example:
Code:
network:
  ethernets:
    eth0:
      dhcp4: true
      dhcp-identifier: mac
  version: 2
Then run sudo netplan apply to apply the new settings.

Source: Jim Mendenhall [https://www.starryhope.com/notes/ubuntu-18.04-server-use-mac-for-dhcp/]