Network setup - domainname - fritzbox router

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:

  1. Hostname is set within /etc/hostname - without domainname.
  2. /etc/hosts contains the local hostname, too - also without domainname.
  3. connman is creating /etc/resolv.conf to contain
    # Generated by Connection Manager
    nameserver ::1
    nameserver 127.0.0.1
  4. My router - an AVM fritzbox - provides automatic local DNS with fixed domainname fritz.box
  5. avahi-daemon provides mDNS with default domainname local
  6. RFC 8375 recommends to use home.arpa as private, local domainname.
  7. 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

One new discovery: To “discover” mDNS under tumbleweed one has to allow the mdns service within firewall: Yast→security→firewall zone public, add service mdns.

Now “avahi-browse -arp” does report many entries.

Hi, if you want to configure avahi-resolve to allow access to fritz.box in addition to the special .local domain, you need to use the /etc/mdns.allow file and add the following entries:


.local
.fritz.box

However, I’m not sure if this is just a side issue. The Avahi mDNS/DNS-SD daemon implements Apple’s Zeroconf architecture (also known as “Rendezvous” or “Bonjour”). Per definition avahi-resolve just uses and requires the .local name but you can influence it that way.

Please tell us more about your real problem:

Thanks for your explanation. New to me is that the domain .local is more or less mandatory.

My “real“ problem is, that as a consequence from any discovery attempt I do see some dozen error (~100) messages within ha-bridge

PTR record of class: CLASS_IN index 1, there was a problem reading the service name of the answer for domain: _services._dns-sd._udp.local.

I assume that some (which?) device sends ill formed mDNS replies. Today I’ll try to identify the problematic device by deactivating parts of my home network. But maybe I do see simply a bug within the outdated ha-bridge itself.

Thus my problem is NOT related with osmc, even kodi is not running. But I’ve seen those inconsistencies w.r.r. domainname on osmc’s linux.

Regards, Michael