[avahi] IP updates in avahi-browse

Michael Krummsdorf michael.krummsdorf at ew.tq-group.com
Fri Feb 3 10:40:23 UTC 2023


Hello,

I am using avahi-daemon to publish my host's IP address and a custom service
across my network.
I wish to inform any clients on the network about changes of the IP address.
On the clients I use 'avahi-browse' to detect address and services.

But avahi-browse does not report address updates after the host was assigned
a new IP.

Output before IP address change:
$ avahi-browse -r _http._tcp
+  ens37 IPv4 20230123                                      Web Site
local
=  ens37 IPv4 20230123                                      Web Site
local
   hostname = [HOST-20230123.local]
   address = [172.168.135.187]
   port = [80]
   txt = ["serial=20230123" "txtvers=1"]

** DHCP Lease ceases, host gets assigned 172.168.135.190 ** Output of
avahi-daemon:
Apr 30 18:58:44 HOST-20230123.local avahi-daemon[1888]: Withdrawing address
record for 172.168.135.187 on br0.
Apr 30 18:58:44 HOST-20230123.local avahi-daemon[1888]: Leaving mDNS
multicast group on interface br0.IPv4 with address 172.168.135.187.
Apr 30 18:58:44 HOST-20230123.local avahi-daemon[1888]: Interface br0.IPv4
no longer relevant for mDNS.
Apr 30 18:58:45 HOST-20230123.local avahi-daemon[1888]: Joining mDNS
multicast group on interface br0.IPv4 with address 172.168.135.190.
Apr 30 18:58:45 HOST-20230123.local avahi-daemon[1888]: New relevant
interface br0.IPv4 for mDNS.
Apr 30 18:58:45 HOST-20230123.local avahi-daemon[1888]: Registering new
address record for 172.168.135.190 on br0.IPv4.


There is no update on the IP address in the still-running avahi-browse
process at the client.

If I restart avahi-browse now, the output contains the new IP.
When I call 'ping HOST-20230123.local' it does resolve the old and new IP
correctly for the ping.

I also see that RFC6762
(https://datatracker.ietf.org/doc/html/rfc6762#section-8.4) covers IP
address changes in Section 8.4. "Updating" so I expected avahi to publish
address changes automatically.

Is my expectation wrong? Should I be able to see IP updates in avahi-browse
at all?
If not, how can the client get informed about IP updates?

Thanks,
Michael





More information about the avahi mailing list