Maybe provide them with pcap files, it does seem odd that the entry is unknown, and you clear the cache and it comes back as unknown…
The second time (after clearing the cache, but before readding the same DNS server), did it even make a request, the pcap will show…
littlebill, you should use the nslookup command with an argument explicitly telling it to make the query to the IP address of the Mikrotik device you had the Winbox shown. This will avoid the usage of the local Windows cache and will provide a more precise demonstration of the problem.
To query another name server directly, use the server or lserver commands to switch to that name server. The lserver command uses the local server to get the address of the server to switch to, while the server command uses the current default server to get the address.
Just watched your videos. In short- your Mikrotik devices behave as expected (i.e. absolutely correctly).
Long answer:
You have three parent DNS servers specified on your Mikrotik device: two dynamic ones (you’re probably getting them from your ISP via DHCP, PPPoE, or similar) and the single static one that you specify explicitly (10.0.1.1). The host name you’re querying is only known to your static DNS parent (i.e. 10.0.1.1), where it is configured as a static DNS entry. I’m almost sure the dynamic servers does not know anything about mom.lb. What Mikrotik DNS server does is it forwards the request to one of the parent DNS servers. It’s quite likely your mom.lb request is forwarded to one of your dynamic parents, which return NXDOMAIN causing your Mikrotik device to cache that entry as unknown for some time.
Hope that help to understand what’s going on. Stop blaming Mikrotik, what it does in your situation is absolutely correct.
The easiest solution would be to remove dynamic parent DNS servers from your configuration altogether. A more elaborate solution will involve setting up an external DNS server like BIND, since Mikrotik DNS server is very simple and does not allow configuring different forwarders for different zones.
It’s not necessarily round-robin. It might be random or anything.
It does not. If one forwarder timeouts or fails in some other way, RouterOS will ask another one. However if the forwarder returns NXDOMAIN (non-existent domain, which is not a failure, bat rather a negative answer) it won’t (and should not) ask any other forwarder.
Your first Mikrotik forwards DNS requests to the 10.0.1.1, which in turn may still be capable of resolving google and others for you (by forwarding your requests to its own forwarders).
If you think about it that is what you doing when you add a dns server to “/ip dns”. Your forwarding any dns requests that the mikrotik does not have in its local cache (assuming you have “Allow Remote Requests” checked and your firewall allows input on udp port 53).
So what you need to do is create a(some) local authoritative dns server(s) something like Bind, PowerDNS, NSD… (I think windows server has authoritative DNS but…).
In your new local authoritative dns server(s) add the domains that you want to host locally, also add those public DNS servers that you were getting from dhcp as forwarders in your authoritative DNS servers.
Then in the mikrotik in “/ip dns” add JUST your local authoritative dns servers. Also make sure “Use Peer DNS” is NOT checked on all dhcp-clients.
That way any requests going to the mikrotik that it does not already have in its cache will go to your local authoritative DNS. If that DNS query is in you local zone(s) it will answer back. If that query does not exist in your local zone(s) the authoritative server will forward to its forwarders until it gets a response eventually getting the correct lookup back to your mikrotik to cache locally until the ttl of that lookup expires(or the mikrotik cache fills to full capacity).
The trick is to realize that mikrotik’s DNS is simply a caching DNS server and any DNS servers you add in “/ip dns” are your forwarders.
The REAL trick is to understand that if a domain does not exist on whatever random dns server mikrotik decides to pick, that it will not check other ones, even though it will work for about an hour.lol
that being said, windows dns server will do what is needed, but mikrotik technically only forwarders once, using windows it works perfect as long as there are different zones.
Mikrotik will use the DNS server that responds the fastest. It will periodically check to see how fast the servers in “/ip dns” are responding and use the fastest one.
Its not really random but it is kinda hidden functionality.