I have a small LAN with a MikroTik v6.4 box providing DHCP and DNS services. However, Windows 7 clients are unable to ping the MikroTik via its hostname or each other via their hostnames. They can only get ping replies by specifying the actual IP address.
In the DNS cache window I see the attempts to ping showing up negative with a hostname.home (home is my local domain suffix) 0.0.0.0 value. This is true for clients that are given dynamic DHCP leases or static ones too.
Naturally, for DNS static entries I could add the .home suffix and it resolves, however, how to do this for all the DHCP clients? This should happen automatically and it’s not.
MikroTik does not automatically add entries for DHCP to the static list. Also I don’t think you want 192.168.0.1 in your list of DNS servers for the DNS server config itself. As he said… you need to use a script to do it.
Should is relative. I agree it should be an option, but you can do it easily with scripts.
If you want more DNS/DHCP functionality you could also run a raspberry pi or something else with linux and use bind/DHCPd/DNSMasq/etc.... Not saying its necessary, but its an option.
But yeah. None of that is actually built into RouterOS.
Here is the script I use. It either will add the entries by hostname or by the comment field if you add "+hostname" to the end of your comment. It sets the TTL to all entries it adds and marks all of the "Dynamic" entries with a specific comment so it can remove them later. You can use it as a starting point..
#.* by RouterOS
So I re-wrote the script to be run as a lease script.... NOTE: I HAVE NOT TESTED THIS YET. It is theoretical. It works the same way as the one above, e.g. by comment or by hostname, except that it is designed to be run by the DHCP server as a lease script.