I usually keep a note of any changes I make but unfortunately didn’t on this one.
Following one of the threads I did a google search to clarify something and found an old post mentioning not enabling mDNS unless needed. I promptly disabled it and my recollection is that the file contained an mDNS entry. I do need it now (avahi) but can’t remember the file name.
If I search the subject again I can’t find the thread and all seem to refer to host.conf which currently has **multi off **in it. The threads can be found via google with
opensuse mdns host.conf site:forums.opensuse.org
However before restricting the search to the forum I found this
The key configuration file is /etc/nsswitch.conf and the following entry
hosts: files mdns4_minimal [NOTFOUND=return] dns
ensures that mdns4_minimal module handles queries for .local hosts only, and is processed before regular DNS occurs.
From the nss-mdns package, there is a good README
cat /usr/share/doc/packages/nss-mdns/README
which explains the various nsswitch modules available.
:’(I need some clarification. Where was mDNS, how to ensure it is working and the minimal aspect mentioned in the bug. multi in host.conf too.
John
The multi on option in /etc/host.conf is for muti-homing, and allows a host to have multiple IP addresses (eg for a gateway server). Nothing to do with mDNS.
I managed to establish that it was running with wireshark. Confused by various posts on the other aspects.
There is some mention in places of it not running consistently. The command gave this output
linux-448o:/home/john # systemctl status avahi-daemon.service
avahi-daemon.service - Avahi mDNS/DNS-SD Stack
Loaded: loaded (/usr/lib/systemd/system/avahi-daemon.service; enabled)
Active: active (running) since Sun, 2013-10-06 13:35:18 BST; 7h ago
Main PID: 633 (avahi-daemon)
Status: "Server startup complete. Host name is linux-448o.local. Local service cookie is 2244602786."
CGroup: name=systemd:/system/avahi-daemon.service
└ 633 avahi-daemon: running [linux-448o.local]
Oct 06 13:35:18 linux-448o.site avahi-daemon[633]: Network interface enumeration completed.
Oct 06 13:35:18 linux-448o.site avahi-daemon[633]: Registering HINFO record with values 'X86_64'/'LINUX'.
Oct 06 13:35:18 linux-448o.site avahi-daemon[633]: Server startup complete. Host name is linux-448o.local. Local service cookie is 2244602786.
Oct 06 13:35:18 linux-448o.site avahi-daemon[633]: Service "linux-448o" (/etc/avahi/services/ssh.service) successfully established.
Oct 06 13:35:18 linux-448o.site avahi-daemon[633]: Service "linux-448o" (/etc/avahi/services/sftp-ssh.service) successfully established.
Oct 06 13:35:18 linux-448o.site avahi-daemon[633]: Service "AirPrint CLX-3185 @ linux-448o" (/etc/avahi/services/AirPrint-CLX-3185.service...lished.
Oct 06 13:35:18 linux-448o.site systemd[1]: Started Avahi mDNS/DNS-SD Stack.
Oct 06 13:35:24 linux-448o.site avahi-daemon[633]: Joining mDNS multicast group on interface eth0.IPv4 with address 192.168.10.102.
Oct 06 13:35:24 linux-448o.site avahi-daemon[633]: New relevant interface eth0.IPv4 for mDNS.
Oct 06 13:35:24 linux-448o.site avahi-daemon[633]: Registering new address record for 192.168.10.102 on eth0.IPv4.
The run time is short because I altered the config file to prevent it from using IPV6 earlier today. My main reason for running this is to provide a printer for iPads. It’s noticeable that they sometimes fail to find it but generally do immediately after I have played around with the daemon. There are some reports of a bug causing this but I wonder if it is a setting issue? The avahi service browser always shows it even when iPads can’t find it.
Thanks for the link to the readme. If I understand that correctly, doubtful sometimes in this area, this will resolve names for me on my local machine? In this case I do not need to do that only provide the AirPrint CLX-3185 for others that are using iPads. Locally I drive the same printer directly via cups.
I might add that after I disabled IPV6 on avahi I had an error message when I restarted it. I then restarted it again without any error. This suggests that it had stopped running.
The run time is short because I altered the config file to prevent it from using IPV6 earlier today. My main reason for running this is to provide a printer for iPads. It’s noticeable that they sometimes fail to find it but generally do immediately after I have played around with the daemon. There are some reports of a bug causing this but I wonder if it is a setting issue? The avahi service browser always shows it even when iPads can’t find it.
That might have something to do with the length of the discovery period (with the iPads) following their query perhaps. You’d need to investigate that further with wireshark. Maybe you’ll be able to capture what is failing.
Thanks for the link to the readme. If I understand that correctly, doubtful sometimes in this area, this will resolve names for me on my local machine? In this case I do not need to do that only provide the AirPrint CLX-3185 for others that are using iPads. Locally I drive the same printer directly via cups.
Ah, that’s right. You’re just publishing a service (airprint) for other clients to access the printer.
No thoughts on the mDNS aspect?
John
Not quite sure what you mean here. Are you referring to resolving latency, network chatter, or security issues perhaps?
The mDNS aspect relates to my 1st post. I am sure I have tampered with a file that had this in it following comments in an old thread - best disabled if not needed. Can’t remember the file name. Fairly sure it contained mDNS in that fashion.
I don’t think the concerns in one of the links is very fair really. Just like dns it’s user triggered. Big difference one leads to the outside world then any web page and avahi doesn’t. it’s local network only. What it appears to lack is the ability to restrict what is published. (Jargon - services that are available) The hole in dns-webpage is that some site then has a users ip address and if there are any security holes can find them. Sometimes common holes are known. A route may pass through several servers. One may even be hijacking. There is a site called grc.com that can check a number of security aspects. The same problems relate to downloads and even emails.
There are some avahi security comments here SecurityConsiderations – Avahi - probably made before wide spread use of wi fi as far as network overload is concerned. In terms of the traffic a single service request generates it’s very low. My printer generates more updating toner etc life. It doesn’t do that very often either. An iPad only uses it when a printer is selected. I does do periodic broadcasts aimed at finding other airdrop servers but the load is negligible. I don’t think it could be less.
There is plenty of info on avahi here, mostly man web page style - I often wish man was web page based along with a brief synopsis of what things do at the top level. I have to do task orientated web searches.
There is this comment in a blog about iPad’s loosing the printer
*NOTE: I noticed with some avahi version there is problem discovering printers: printer is shown in your iOS device just for a couple of minute and then you cannot see it anymore. To fix this problem I just added in crontab (run every minute):
I know that is not a really cool solution, but I didn’t found anything better. Actually on my Fedora the problem with amahi seems fixed, but “remember the touch” if you have problems - See more at: Linux as AirPrint server | Simply Me*
And a comment that firewall blocking is down to the need to do this but if on wireshark it has got past local and router firewalls. Its always shown in the avahi browser as well.
I seem to have miss understood not being able to limit the services avahi publishes. It looks to be a simple matter of going to /etc/avahi/serviices and removing or adding the ones that are needed.