Community discussions

MikroTik App
 
User avatar
1Icarus2
just joined
Topic Author
Posts: 4
Joined: Mon Mar 19, 2018 9:46 am

DNS Issue

Sun Mar 29, 2020 4:55 pm

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?

Image

Image
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: DNS Issue

Sun Mar 29, 2020 8:26 pm

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: viewtopic.php?p=650676#p650676

Edit: Actually, it seems that Windows don't support this DHCP option. But they should use domain from "/ip dhcp-server network".
 
User avatar
macsrwe
Forum Guru
Forum Guru
Posts: 1011
Joined: Mon Apr 02, 2007 5:43 am
Location: Arizona, USA
Contact:

Re: DNS Issue

Mon Mar 30, 2020 3:37 am

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.
 
User avatar
1Icarus2
just joined
Topic Author
Posts: 4
Joined: Mon Mar 19, 2018 9:46 am

Re: DNS Issue

Mon Mar 30, 2020 10:16 am

Alright I understand. Thank you for the responses. I figured that it was something similar to this.
 
FPnut
just joined
Posts: 12
Joined: Mon Nov 18, 2019 9:09 am

Re: DNS Issue

Mon Mar 30, 2020 5:52 pm

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.

Who is online

Users browsing this forum: itimo01, nillyhan and 23 guests