refactor dns and dhcpd