Score:0

Avahi found IP changes after a few seconds

us flag

I use avahi to find machines on the local network. It's been acting up recently, causing a machine to hand out the wrong IP. I ssh'd into a different machine to debug the issue.

Confirming the currently resolved IP is wrong:

$ getent hosts evan-woodtower.local
172.17.0.1   evan-woodtower.local

Restarting the avahi daemon seems to fix the issue:

$ sudo avahi-daemon -k
$ getent hosts evan-woodtower.local
10.88.111.9   evan-woodtower.local

But only for a few seconds, then it goes back to the old, wrong IP

$ getent hosts evan-woodtower.local
172.17.0.1   evan-woodtower.local

What's going on? I've tested across multiple machines on my network, this seems to be the only lookup that goes wrong. Any machine I've accessed seems to have the same issue with this, and only this, host.

Score:0
us flag

So, this turned out to be a problem of avahi-daemon changing which network interface it was attaching to the .local name. I had expected it to use br0, but it was sometimes switching to a docker virtual interface instead.

docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 172.17.255.255
        ether 02:42:8a:98:79:93  txqueuelen 0  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 2  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The solution was to edit /etc/avahi/avahi-daemon.conf to force avahi to only look at the br0 interface:

 allow-interfaces=br0
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.