Background: I set an static DNS entry, like:
name: test.local
ip: 192.168.0.50
Problem: I try to ping router.local and returns: “ping: unknown host router.local”
However, if I lookup for that host directly to the router (192.168.0.1), it returns the correct IP.
I’m testing directly with a Perl script, using: Net::DNS::Resolver->search, but my guess is that any other method will work as well.
In my client, DNS is manually set, and confirmed with: nmcli dev show | grep DNS.
Any insight on how can the DNS works as expected? Is this a RouterOS or a Linux related problem?
This is my client:
Linux (Ubuntu 16.04)
These are my settings:
Servers: 199.85.126.30,199.85.127.30 (Norton DNS)
Dynamic Servers: (fixed by my ISP)
Allow Remote Requests: ON
Max UDP Packet Size: 4096
Query Server Timeout: 2.000
Query Total Timeout: 10.000
Cache Size: 2048
Cache Max TTL: 7d 00:00:00
Cache Used: 133
If i understood correctly, your Linux host is using DNS servers that are not Mikrotik itself. Thats why your router knows where are specific hosts, but your Linux host doesn’t. Set mikrotiks IP as DNS server on Linux host and it should be good.
I’m sorry, I think I didn’t explain it clearly.
My client computer (Linux) has the Mikrotik router as the only DNS server.
That is confirmed with the command:
I encountered same problem recently on current Debian. I already forgot exact details, but by default there’s this thing called Avahi and it takes over .local TLD. It’s supposed to somehow inteligently resolve it without DNS, and it effectively blocks any .local records you might have in DNS. Get rid of it and everything should start to work ok.