[SOLVED] DNS cache issues

“Can’t flush static DNS entries” issue is still present in 6.25, please fix it in 6.26.
Details here: http://forum.mikrotik.com/t/cant-flush-static-dns-entries/68909/1
Thanks!

DMK
do you know precise steps how to repeat the particular issue?

I have tried to apply steps mentioned in original post, after static entry is disabled, it is removed from my DNS cache.

Ok, lets try to assign static ip address 192.168.100.1 to test.com (for example). Everything is ok, computer connected to router and mikrotik both able to ping test.com as 192.168.100.1. Next step is to change test.com to 192.168.100.100, so i disable and remove static ip (or just remove, it does not matter) from mikrotik and flush dns in mikrotik (see correct 192.168.100.100 in cache) and computer, and try to ping test.com. Computer receive reply from correct 192.168.100.100, but mikrotik still trying to ping old 192.168.100.1 regardless it has correct ip in cache. After rebooting it will ping correct address.

DMK, please make sure that your host does not have DNS cache itself (try to reboot host instead of router, and confirm the same issue is not present).
I have tried the same procedure as you described, but after entry is removed, router gives correct address for test.com

This issue deals only with router, not with host computer. Have you tried to ping test.com from mikrotik ping utility after assigning new 192.168.100.100? While mikrotik cache has static record 192.168.100.100 mikrotik ping utility pings test.com as 192.168.100.1 until reboot.

Yes, I have tried to ping this address from MikroTik, and MikroTik used correct IP address, when it was disabled/removed from the cache.

I see quite different picture: 192.168.100.101 in cache, but mikrotik pings 192.168.100.100
Please find screenshot: https://yadi.sk/i/cythsmiHeGQpK

According to your screenshot, you specify IP address (192.168.100.100) in the ping utility window, not FQDN (test.com). You ask to ping 192.168.100.100, and it pings 192.168.100.100. What do you complain about?

:slight_smile:
Have you tried to ping FQDN name in mikrotik ever?
I ask mikrotik to ping test.com, and mikrotik immediately resolves FQDN name to ip and then ping ip address.
On the picture you can see the result of resolving, just before screenshot was made there was test.com name in Ping To:

Try it this way (from command line):
[andrew@MikroTik] > ping address=test.com
HOST SIZE TTL TIME STATUS
23.91.14.101 56 42 214ms
23.91.14.101 56 42 207ms
23.91.14.101 56 42 220ms
23.91.14.101 56 42 192ms
sent=4 received=4 packet-loss=0% min-rtt=192ms avg-rtt=208ms
max-rtt=220msIf this works, then the original problem must be a Winbox bug, not RouterOS itself.

DMK, winbox ping uses computer’s DNS cache to resolve addresses. On your computer test.com points to 192.168.100.100.
Reboot your router or flush DNS cache on your router, then ping will work fine.

P.S. Console uses /ip dns cache from a router itself.

Nope, Flushing DNS does not help, only rebooting. Computer DNS points to correct address, but mikrotik not, even after flushing.
But i think that is not how it was designed? Rebooting router for flushing DNS is not bug? It is a feature?

Nope, Flushing DNS does not help, only rebooting

Reboot your computer, connect to your device by Winbox and try to ping.
It should work fine.

Ok, tried both combinations: rebooting computer or router.
Yes, it helps, but until you start another process of changing static adresses.
Then it will require to reboot router or computer regardless flushing dns on both devices.
Its a very strange behaviour of WInbox… I think that is not normal to reboot router to change static adresses.
I can make a video capture to show what i see if you need.

I believe you don’t have to reboot anything. Not checked it myself (yet), but I’m quite confident the following sequence should work:

  1. Close Winbox.
  2. Flush DNS cache on your computer (run “ipconfig /flushdns” as an administrator).
  3. Start Winbox and try pinging again.

Do not ping test.com from your computer.
Start the same test, but run pings from router only. Let us know what you see after entry is removed.

Yes, i tried also closing and re-opening Winbox without flushdns on computer. It helps, and mikrotik starts to ping correct address.
It means that Winbox loads dns cache from host computer only once during start and ignores changes to it while Mikrotik continues to give correct ip to computer.
It is a very strange feature IMHO.

I too find this behavior strange. Winbox should not be pulling any DNS from the host computer, except for the initial connection to the routerboard. Once connected, it should always use DNS/Data/etc from the routerboard, and not the host computer.

I have noticed this issue in the past by accident, and I’m aware of its existence. It’s not a “bug” exactly, but it is illogical behavior.