This script is handy for setting up an ad-hoc DHCP server for instance when starting up a Raspberry PI for the first time.
dnsmasq
will output when it has given a client an address:
dnsmasq-dhcp: DHCPACK(enp0s25) 192.169.1.109 b8:27:eb:86:2f:ed nixos