DNS Issue

I want to do something simple, yet for some reason it’s not working the way I expected.

I want to be able to resolve “SQLServer” to an IP address. So I added it in my Static DNS entries in RouterOS.

When I ping SQLServer, it doesn’t respond with an IP address. If I add a domain to it, e.g. SQLServer.com, then it resolves.

How can I make it ping the name instead of having to add a domain extension to it?

Windows always append connection’s DNS suffix when you enter bare hostname without any dot. You can use “sqlserver.”, but it’s almost guaranteed that you’ll be forgetting that, if you type it manually and don’t have it saved somewhere. There’s option in IPv4 properties where you can put DNS suffixes that Windows should use, including “.” (but it’s just local config). There’s also DHCP option for that, but I never tried if it can contain “.”. Even if it can’t, you coulc use something else and append it to static record. Only problem with that is that it will result in sending tons of nonsense queries to upstream resolvers.

Some info: http://forum.mikrotik.com/t/dchp-option-119-domain-search/70060/5

Edit: Actually, it seems that Windows don’t support this DHCP option. But they should use domain from “/ip dhcp-server network”.

As stated, this is a Windows peculiarity, not MikroTik limitation. Another option is that you can just invent your own local TLD (e.g., .icarus) and define all your local devices that way; then you would resolve “sqlserver.icarus” with no problems.

Alright I understand. Thank you for the responses. I figured that it was something similar to this.

Well if you just want to resolve “sqlserver” to an ip address from a few computers, you can edit the hosts file directly. Otherwise macsrwe’s suggestion is probably what you need to do.