Closed tagno25 closed 1 year ago
Well, yes... The idea is not bad. 😉 I will have to take a look and think about how to integrate.
We would have to find the matching network by address, no? Something like:
:put [ /ip/dhcp-server/network/get ([ find where 10.0.0.50 in address]->0) domain ];
example.com
Given a domain is found... How to handle this? Should extra info (identity, prefix, dhcp server name) go into the DNS name?
I think about making this configurable with the network's comment, something like...
/ip/dhcp-server/network/add ... domain=example.com comment="dhcp-to-dns, identity=yes, prefix=no, server-name=yes";
... and drop $Domain
, $HostNameInZone
, $PrefixInZone
and $ServerNameInZone
completely.
Implemented with ee94024dcaa59333f03d90f342e550a5f3ab40f2... See the documentation on how to use the optional configuration.
It would be nice if the script would pull the domain from "/ip/dhcp-server/network" using the appropriate "domain" value.