-
Notifications
You must be signed in to change notification settings - Fork 284
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: dhcp-to-dns - use Access List comment and/or ignore if already in DNS #39
Comments
Actually, since the comment from the access list is already being brought over to the DHCP Leases, perhaps things could simplified and just have an option to use the comment from DHCP. |
Comments from Telegram Chat, in case it has some more important details:
|
Well, all the DHCP leases and DNS static records stuff is kind of tricky. I am happy that it kind of works currently. 😜 There are some issues with this:
However I do agree that it is inconsistent to have the mac address for some and host name (if available) for other records. So I am preparing some changes now. The plan is to always have an So wondering if you could just create another |
Also could you give some more detail on the issue with blocky dns proxy and the statistics thing that shows one or the other? Or is that solved by using |
Could an option be created that would do a CNAME record that is pointing to the A record if the hostname OR a comment is available? I would imagine you could make an option switch in the global-config that would let you ask a preference of which one. Either hostname OR comment, or prefer comment over hostname or something along those lines.
Not certain why this does this. I would have to look further into way blocky operates. |
The issues from above would still apply, no? |
I suppose it isn't that complicated from my perspective as my access list comments are pretty simple. I set the comment to the hostname or purpose. For example, my kids laptop is named link, so i just comment it as "link" (big zelda fans here :D). My doorbell is simply "camera-doorbell". My backdoor camera is simply "camera-backdoor", cellphone is simply "dads-cellphone". This carries over to the dhcp server comments. The option would be nice to allow that comment to be placed in as the dns entry as well. With that said, based on MY personal use case, my suggestion would be to have the MAC address as the A record, a CNAME with the hostname if available, but allow an override to allow the DHCP comment as the A record or CNAME, if that option is defined in config and it is available. I personally do not like the idea of MAC address as a dns record, but i can see the desire to have SOMETHING that is consistent and that is one thing that would be consistent. I will make an attempt to mock something up and submit a patch to see if you find it usable for your scripts. |
You should not spread the discussion over at least three places... Let's keep it here. I gave it some more thought and came up with 7d5c839... It does not use plain comment, but would require you to set Also note that this requires a second execution of the script with the default order of lease scripts if the comment comes from access list. |
No worries @eworm-de. My intention of messaging you over the Telegram chat was not to fragment the conversation. I had some questions about scripting under routeros, and I assumed that would be a quicker way to chat. My intention was to share my work here. I rather like your solution. I can just put `hostname=link" in the access list and it would eventually carry over, it looks like. Here is what I came up with today. You can use the modified dhcp-to-dns.rsc below by setting the following in global-config-overlay
How this will work is it will first use a comment from the dhcp server, if available. If not it will use the hostname and lastly if neither is available it will create an A record with the mac address. Setting that will also forego the creation of the CNAME. This is just a quick hack to demonstrate the functionality that I had in mind. dns-to-dhcp;
|
Having a name based on the mac address is the most reliable we can have here, and we should not dismiss this. Let's use a So no, I will not accept your changes. But I think d700dbc comes pretty close to what you requested and should serve you well. |
Hello,
I would like to request 2 features for the dhcp-to-dns script.
Thank you
The text was updated successfully, but these errors were encountered: