Ad Code

Responsive Advertisement

Ticker

6/recent/ticker-posts

Use MAC Address for DHCP on Ubuntu 18.04

Ubuntu 18.04 server will not use the MAC address for DHCP connections. To enable this, you need to edit your netplan file localted at /etc/netplan/xxx.yaml and add the dhcp-identifier: mac setting.


network:
  ethernets:
    eth0:
      dhcp4: true
      dhcp-identifier: mac
  version: 2

Then run sudo netplan apply to apply the new settings.

Reference: 

1. https://www.starryhope.com/notes/ubuntu-18.04-server-use-mac-for-dhcp/

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