Community discussions

MikroTik App
 
quicky2g
just joined
Topic Author
Posts: 14
Joined: Wed Dec 26, 2012 7:00 am

Mikrotik DNS Server - "A" Record Lookups Not Working

Tue Oct 08, 2013 8:31 pm

I'm using my Mikrotik router (Model: 2011UAS-2HnD Software: v6.4) as a DNS server. I added some static entries. The PTR records work fine for resolution from clients, but the A records do not. Both records seem to be there but only the PTR records are responding to DNS requests. Any ideas?

PTR records from the Mikrotik:
[admin@MikroTik] /ip dns cache all> print where name ~ ".0.168.10"
Flags: S - static, N - negative
 #   NAME                                     TYPE  DATA                              TTL
21 S 1.0.168.10.in-addr.arpa            PTR    mikrotik                           1d
23 S 2.0.168.10.in-addr.arpa            PTR    avaya-switch                   1d
25 S 3.0.168.10.in-addr.arpa            PTR    netgear-switch                 1d
27 S 5.0.168.10.in-addr.arpa            PTR    ip-power-bedroom             1d
29 S 6.0.168.10.in-addr.arpa            PTR    avocent-console-server      1d
A records from the Mikrotik (Seem to be automatically generated when I add a PTR record in "/ip/dns/static"):
[admin@MikroTik] /ip dns cache all> print where data ~ "10.168.0."
Flags: S - static, N - negative
 #   NAME                                     TYPE  DATA           TTL
20 S mikrotik                                 A       10.168.0.1    1d
22 S avaya-switch                         A       10.168.0.2    1d
24 S netgear-switch                       A       10.168.0.3    1d
26 S ip-power-bedroom                   A       10.168.0.5    1d
28 S avocent-console-server           A       10.168.0.6    1d
PTR record query from my laptop:
c:\>nslookup
Default Server:  mikrotik
Address:  10.168.0.1

> 10.168.0.1
Server:  mikrotik
Address:  10.168.0.1

Name:    mikrotik
Address:  10.168.0.1

> 10.168.0.3
Server:  mikrotik
Address:  10.168.0.1

Name:    netgear-switch
Address:  10.168.0.3
A record query from my laptop:
c:\>nslookup
Default Server:  mikrotik
Address:  10.168.0.1

> mikrotik
Server:  mikrotik
Address:  10.168.0.1

*** mikrotik can't find mikrotik: Non-existent domain
> netgear-switch
Server:  mikrotik
Address:  10.168.0.1

*** mikrotik can't find netgear-switch: Non-existent domain
 
User avatar
pcunite
Forum Guru
Forum Guru
Posts: 1347
Joined: Sat May 25, 2013 5:13 am
Location: USA

Re: Mikrotik DNS Server - "A" Record Lookups Not Working

Tue Oct 08, 2013 8:39 pm

I'm not able to get ping replies on static entries from workstations.
 
quicky2g
just joined
Topic Author
Posts: 14
Joined: Wed Dec 26, 2012 7:00 am

Re: Mikrotik DNS Server - "A" Record Lookups Not Working

Mon Feb 17, 2014 9:18 pm

Anyone else have a chance to look at this? Seeing the same results???
 
Sob
Forum Guru
Forum Guru
Posts: 9188
Joined: Mon Apr 20, 2009 9:11 pm

Re: Mikrotik DNS Server - "A" Record Lookups Not Working

Mon Feb 17, 2014 11:07 pm

I just tested it and the problem is not with RouterOS, but with nslookup/Windows. Ask nslookup for "mikrotik." (with trailing dot, to make sure it's FQDN) and you'll get correct answer. Omit the dot and get (in most cases) non-existent domain. What happens is that domain suffix is appended automatically to query, so it becomes e.g. "mikrotik.somenet.local." and you have no record for that. It's probably some optimization, it assumes that without any dots, you surely don't mean the input as FQDN, which in most cases is probably true.
 
quicky2g
just joined
Topic Author
Posts: 14
Joined: Wed Dec 26, 2012 7:00 am

Re: Mikrotik DNS Server - "A" Record Lookups Not Working

Tue Apr 22, 2014 7:46 pm

Thanks for the tip on the dot after the name!

I'm using a work laptop at home (Without VPN turned on) and joined to a domain with a DNS suffix "company.pri". I did a wireshark capture while doing nslookup for "mikrotik" and noticed the query was sent as "mikrotik.company.pri".

I did a little digging in my adapter settings. Go here:

Right click on adapter -> select "Internet Protocol Version 4 (TCP/IPv4)" -> click Properties -> click "Advanced..." -> select DNS tab

The default is to append primary and connection specific DNS suffixes. Looks like the primary is based on domain membership and my connection specific DNS suffix "quicky2g.local" wasn't considered at all. Since I added static entries without any DNS suffix, I need to use just a single dot like you mentioned.

I changed my adapter settings to this:

Image

Now everything works. I can use the static entries I created for file shares, http, ftp, etc.
 
sashavl
Frequent Visitor
Frequent Visitor
Posts: 56
Joined: Mon Nov 01, 2010 8:19 pm
Contact:

Re: Mikrotik DNS Server - "A" Record Lookups Not Working

Tue Apr 22, 2014 9:51 pm

Sometimes it needs to pass some time before static DNS entries start to reply.