What is the correct & consistent network setup for OSMC?
I’ve seen many threads discussing the same topic, but I still don´t know the correct answer. First I’ll summarize what I do believe:
- Hostname is set within /etc/hostname - without domainname.
- /etc/hosts contains the local hostname, too - also without domainname.
- connman is creating /etc/resolv.conf to contain
# Generated by Connection Manager
nameserver ::1
nameserver 127.0.0.1 - My router - an AVM fritzbox - provides automatic local DNS with fixed domainname fritz.box
- avahi-daemon provides mDNS with default domainname local
- RFC 8375 recommends to use home.arpa as private, local domainname.
- I’ve set domainname manually to fritz.box using the command domainname.
DNS name resolving works fine, e.g. calling “host google.com” immediately returns the correct answer. The same is true for local addresses like “host purzel.fritz.box”. I also get a correct answer for local hosts if I omit its domainname like “host purzel“, but it takes some seconds.
If I manually change /etc/resolv.conf to point directly to my router, DNS resolving works fine, too. Now there is no time delay when resolving local hosts without domainname.
Now I’m trying to do the same with avahi-resolve, e.g. “avahi-resolve -4 -n purzel.fritz.box“. Sadly no response. But using purzel.local gives the correct address. Clear, local is the default domain for avahi.
domainname and nisdomainname both return fritz.box, but that information is probably not used at all.
“hostname –fqdn” returns only the hostname without fritz.box, “hostname -y” returns fritz.box, “hostname - d“ returns nothing. Running the same commands on a Linux box (tumbleweed) return the domainname as expected (BTW the command “domainname” returns none). Also avahi-resolve “knows” domain fritz.box under tumbleweed.
Thus from my perspective, I should change “something” within network setup of my OSMC raspberry, but I have no idea what.
But why do I look into those problems at all - name resolving works fine? I do see spurious errors from mDNS within my local network. and I’m hunting for mDNS setup problems. And my first discovery is this inconsisteny w.r.t. domainname under OSMC.
Regards, Michael