Im trying to get my Mikrot Router to act as the default DNS server if it can’t resolve LAN traffic DNS requests the Use Peer DNS.
When I request a Local Domain like ‘mcon’ from the router it resolves OK
When I request a Local Domain from my Ubuntu machine it Fails.
When I request a Extenral domain like ‘google.com’ it resolves the IP OK.
What am I doing wrong, any suggestions would be very appreciated.
As per RFC 1034 domain names are either absolute and are composed from multiple (that’s 2 or more) parts, delimited with a dot “.” … or relative which doesn’t contain a dot, and, when used, software needs to append domain name. Each DNS entry should be terminated with final dot, but it seems that most systems do it automatically when they encounter FQDN but not when they encounter name without domain (i.e. without a dot as used by user).
In short: don’t use names without dots as FQDN, this is not the standard way and breaks different systems in different ways.
A hint: try configuring named with trailing dots, e.g. “mobilesvr.” … but you’d probably have to do it both in MT DNS setup and on dig cmdline. I’m pretty sure you can’t go around this problem in DHCP server config though.
Maybe you have fallen into the wellknown trap of “let me configure a number of DNS servers, a local one that does what I want to do, and a fallback of e.g. 8.8.8.8 in case it does not work”.
That is NOT possible with DNS! There is NO way to configure it like “when one server replies with an error, let’s try another one”. And in most environments it is NOT possible to specify a hardwired sequence of DNS servers to try in a fixed order.
So when you type “host mobilesrv” or “dig -t A mobilesrv” in your Ubuntu box (when it has more than one DNS server) there is no way to make that work all the time. That can only work when the mikrotik is the only DNS resolver the Ubuntu box will query.