Feature request:
Extend dhcp-to-dns to support:
- Per-VLAN domain (configurable via VLAN comment with optional placeholders filled from
Global Configruation).
- Scope option to process all IPs or only active VLANs (opt-in flag in comment).
- static IP to dns by reading ARP table (for devices without DHCP lease).
- CSV mapping of MAC → custom to resolve ambiguous hostnames.
Background
For example, high-value smart switches such as those from Dingz do not allow the hostname to be changed, resulting in DNS entries such as dingz-C52834.local.net.
As VLANs are used by users without direct relations, it should be possible to allow them to have one main domain per VLAN, which would improve the user experience and perhaps make the DNS entries easier to group.
Additionally, devices such as MikroTik networking devices use static IP addresses and do not appear in DHCP leases; however, they should still be included in DNS for the sake of completeness.
I would like to extend the existing routeros-scripts/dhcp-to-dns.rsc at main · eworm-de/routeros-scripts and few additional scripts (pushed to routeros-scripts/mod at main · eworm-de/routeros-scripts).
Proposal
- adapt routeros-scripts/dhcp-to-dns.rsc at main · eworm-de/routeros-scripts
- to respect VLAN specific domains
- Scope control (only creates DNS entries for IPs in the defined VLAN and/or IP range
- use custom hostnames
- create script
arp-to-dns to
- create DNS entries for hosts with known IP but without DHCP lease. Only do this for hosts that are seen/alive.
- In general, this script should behave as routeros-scripts/dhcp-to-dns.rsc at main · eworm-de/routeros-scripts
- create script
CSV-to-HostnameTable
- is looked up by the previously defined scripts to check if there is a MAC match. If so, it takes the host name defined there.
- The file can be located anywhere; it will be pulled by
fetch. URL(s) are defined in Global Configruation.
- The CSV file contains two columns: MAC and hostname.
Workflow
To implement this, I plan to create several PRs:
Scripts to be touched
Feature request:
Extend dhcp-to-dns to support:
Global Configruation).Background
For example, high-value smart switches such as those from Dingz do not allow the hostname to be changed, resulting in DNS entries such as
dingz-C52834.local.net.As VLANs are used by users without direct relations, it should be possible to allow them to have one main domain per VLAN, which would improve the user experience and perhaps make the DNS entries easier to group.
Additionally, devices such as MikroTik networking devices use static IP addresses and do not appear in DHCP leases; however, they should still be included in DNS for the sake of completeness.
I would like to extend the existing routeros-scripts/dhcp-to-dns.rsc at main · eworm-de/routeros-scripts and few additional scripts (pushed to routeros-scripts/mod at main · eworm-de/routeros-scripts).
Proposal
arp-to-dnstoCSV-to-HostnameTablefetch. URL(s) are defined inGlobal Configruation.Workflow
To implement this, I plan to create several PRs:
Scripts to be touched
-routeros-scripts/global-config.rsc at main · eworm-de/routeros-scripts