DHclient

    /etc/network/interfaces

    allow-hotplug enp0s31f6
    iface enp0s31f6 inet dhcp
    

    then start process to get ip:

    /sbin/dhclient -4 -v -i -pf /run/dhclient.enp0s31f6.pid -lf /var/lib/dhcp/dhclient.enp0s31f6.leases -I -df /var/lib/dhcp/dhclient6.enp0s31f6.leases enp0s31f6
    

    Note: replace by the right iface enp0s31f6

    Add nameserver unprovided by DHCP server

    /etc/resolvconf/resolv.conf.d/head

    nameserver 127.0.0.1
    

    Note: useful for a dns server to use itself

    source