2

According to the link. https://www.howtoinstall.me/ubuntu/18-04/avahi-daemon/

The method it provides for installing mDNS consists of just two lines of command:

sudo apt update
sudo apt install avahi-daemon

According to the link: What is mDNS? Is it possible to make mDNS query without mdns service running?

One friend replied:

Ubuntu systems just need avahi-daemon and libnss-mdns installed.

So the first question is :

What is the standard method for installing mDNS on ubuntu 18.04?

The second question is:

After installing mDNS, how should I configure mDNS?

The third question is:

How can I verify the functionality of mDNS?

Andrew
  • 155
  • 1
  • 2
  • 6
  • The installation method looks correct. I don’t think there is any configuration to do. Just check avahi-daemon is running “systemctl status avahi-daemon”. If not enable and start it. If you have a firewall UDP port 5353 needs to be open. Then check other devices can see this machine as hostname.local using the machines hostname – PonJar May 04 '21 at 08:11
  • Thanks, @PonJar ,you say: Then check other devices can see this machine as hostname.local using the machines hostname . Do you mean that I should ping the hostname of this machine with mDNS installed on another machine? – Andrew May 04 '21 at 08:44
  • Yes, that would prove it’s working. If you have an apple device you don’t have to install anything. They use mDNS, not sure about Android. – PonJar May 04 '21 at 08:51
  • @PonJar , I currently have two machines with mDNS installed. I run “systemctl status avahi-daemon”, it's Active: active (running) . One machine hostname is k8s-master. The other hostname is it51. When I ping it51 on the k8s-master machine, I can't ping through, but pinging the ip of it51 this machine can ping through, what is the reason for this? Is there a configuration file that needs to be changed? – Andrew May 04 '21 at 09:02
  • There is no configuration if you want .local to work. I’ve had this work intermittently in the past. I assumed it was something to do with my router but never proved that. When you say you are pinging the ip what exactly do you mean? mDNS enables “ping k8s-master.local” rather than “ping 192.168.0.66” for example. I guess the real question is what do you want mDNS to do for you and does that work? – PonJar May 04 '21 at 09:36
  • @PonJar , I want mdns function to be able to ping through the hostname it51 on the k8s-master machine , ping through the hostname k8s-master on the it51 machine. Currently I have DNS Server configured on both virtual machines, should I remove the DNS Server configuration and then verifying the functionality of mdns? – Andrew May 04 '21 at 09:45
  • You shouldn’t need to touch DNS. If they are virtual machines you need to consider if their network configuration is such that the IP address of each machine is visible to the other across the network you are using. I’m not an expert in this. – PonJar May 04 '21 at 09:58
  • 1
    the information provided here https://unix.stackexchange.com/questions/459991/how-to-configure-systemd-resolved-for-mdns-multicast-dns-on-local-network helped me to get the mDNS working on Lubuntu 18.04. – dadude17 Dec 07 '21 at 13:24
  • Andrew Have you tried @dadude17 suggestion, as things seems moving away from nss to systemd. – user.dz Jan 01 '22 at 11:06

0 Answers0