DHCP fix

* protect against IP addresses with the same domain
* tests