Well, the problems I had happened about 1.5 years ago with Ubuntu 22.04
and a Huawei fiber router with DHCP, but without local DNS zone, and I
recall all details, just the fact that only Ubuntu machines had
problems, while other Linux-based machines didn't, and after several
days of working I just gave up and bought an OpenWRT router to put
between just to get Ubuntu machines running.


As far as I remember the main problem was, that I usually put my clients and 
services in LXD, docker and podman containers, and I was not able to get mdns 
running within these containers since they do not receive those mdns packages. 
I found no way to redistribute them into all containers, and one of the problem 
is that the containers do have IP addresses from different ranges. 

Another problem was that container machines like LXD and docker enforce
to either forward DNS requests to either 127.0.0.53:53 (=resolved) or
the router (=Huawei fiber), but there is no DNS service to forward mDNS
requests to.

I got some success by not telling the machines in the container anything
at all about mdns, just let them forward all requests, including to the
.local. domain, to the container mechanism, i.e. to resolved runnin g on
the host. This works for querying, but is highly unreliable. Sometimes
it took more than 10 Minutes to finally resolve a machine. resolved's
mdns implementation seems somewhat broken and to suffer from some bugs.

The other problem is that resolved does not advertise anything other
than its own host name.

So this runs into two contradicting requirements:

1. To resolve mdns queries from within a container, you need to ignore
mdns inside the container and let the container environment do the job,
i.e. forward to resolved (which mdns settings enabled).

2. To advertise services or virtual machines (such as the containers),
you need avahi, because resolved can't. Resolved just performs very
simple client tasks, even those unreliably.


But not both resolved and avahid can have the mdns, and you can't tell resolved 
to use mdns, but not to occupy the port. 


I do remember that I had used mdns with Ubuntu around 2007, and it was working 
perfectly then. 


Now the problem seems to be, that on one hand systemd+resolved is enforced and 
so deeply implanted, that you can't avoid it and container environments like 
LXD, docker enforce to forward DNS queries from within the container to the 
hosts's resolved, but resolved's implementation is incomplete and broken. 


Actual example: I usually have a virtual machine running on LXD called
"install", which offers services like a puppet server, docker cache,
debian/ubuntu cache, gem server. I'm using this method for years. But I
simply was not able to get this running and to install LXD containers on
other machines in a network managed by this Huawei router with DHCP, but
without a DNS zone reflecting DHCP assignments. I would have had to
assign all IP addresses statically and enter them in to /etc/hosts.

I ended up with buying an additional router with proper DNS, just to get
the Ubuntu machines up and running, since the cannot properly deal with
mdns.

 
I had hoped that things were getting better with 24.04, but there seems to be 
no difference. 

There is simply no plan about how mdns should work on Ubuntu. resolved
doesn't work properly, but you can't get rid of resolved, and can't have
both, resolved and avahi, either.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2062927

Title:
  Ambiguity in mdns configuration

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/avahi/+bug/2062927/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to