On 8 June 2017 at 11:53, Chris Green cl@isbd.net wrote:
Is that as much as you need?
Thanks for that but it would appear that my problem is similar but sufficiently different for that not to help....
I'll hijack your thread since yours is resolved (pun intended!):
I have a DNS server in my office and it will give me an IP for (say) host1.msl-office.co.uk or just host1:
$dig @192.168.1.5 host1.msl-office.co.uk .. host1.msl-office.co.uk. 0 IN A 192.168.1.140
$dig @192.168.1.5 host1 .. host1. 0 IN A 192.168.1.140
However, if I don't specify the DNS server then only the FQDN form works: $dig host1.msl-office.co.uk .. host1.msl-office.co.uk. 0 IN A 192.168.1.140
$dig host1 .. host1. 0 IN A
Consequently, I cannot (for example) use ssh mark@host1, but have to use ssh mark@host1.msl-office.co.uk (or use the IP).
Following your method I assumed (hoped?) that the msl-office.co.uk suffix would get added automatically and fix this, but it doesn't; in any case the issue is really that systemd-resolve should be sending the request for host1 to the configured DNS (which will give the correct response if it does), but it doesn't do that. (Getting it to add the domain on the end first would be a workaround rather than a proper fix, but I'd settle for that.)
As an aside: My DNS server will also resolve *.host1 to the correct IP, and that is working via the default configuration as well: $dig anything.host1 .. anything.host1. 0 IN A 192.168.1.140
It is *only* the hostname on its own that is failing me.