It turns out that the various Avahi daemons performing the magick between
whatever.local names and dotted-quad
192.168.1.101 addresses for Raspberry Pi descend into gibbering madness when confronted with:
- One name corresponding to multiple IP addresses
- One IP address used for multiple MAC addresses
- Multiple names for one IP address
- Multiple names for one MAC address
- Multiple IP addresses for one MAC address
- Multiple MAC addresses for one IP address
- Any and all combinations of the above at various times
The least of the confusion involved an incorrect IP address linked to a familiar name pulled from deep history by a baffled daemon doing the best it can with what it thinks it knows. Despite what I concluded, rather early in the process, there’s no real error, other than my performing what amounted to a self-inflicted fast-flux nameserver attack.
Anyhow, I devoted the better part of an afternoon to sorting out the mess, which involved labeling all the streaming radio players with their MAC addresses and rebooting them one-by-one to allow all the daemons time to recognize the current situation:
That label corresponds to the Pi 3’s on-board WiFi adapter.
For Pi 2 boxen, the MAC address travels with the WiFi adapter jammed into a USB port:
I didn’t label the (unused) Ethernet jacks, figuring I’d solve that problem after it trips me up.
6 thoughts on “Raspberry Pi vs. Avahi”
You did set different host names on all the Raspberry Pis, right?
Avahi weirdnesses did accidentally cause me to change the host name, password and install Fortran on the demonstrator’s Pi at a meetup last week, instead of on the Zero I had attached to my laptop as a USB gadget. Machines seemed to randomly swap the name raspberrypi.local on the network. Anyway, a machine without Fortran isn’t a machine worth owning, so I did him a favour.
Pummeling the daemon with a quick sequence of “same name, different MAC address” boxen produces peculiar results; setting up a trio of Pi 3 players went poorly until I caught on.
I now (try to) create the card image and edit the
hostnamebefore booting the Pi, which tends to reduce the carnage out there on the bitstream. Generally, I remember to do that…
I’m trying to think if there is any legitimate reason for one IP address to resolve to 2 or more mac addresses. All I can think of is link aggregation, but that’s not relevant to the PI.
There is a reason for a DNS name to resolve to more than one IP address – load balancing. And again, that’s not really relevant here, unless you’re listening to a lot of internet radio.
I should read up on Avahi. Sounds… entertaining. :-)
Although I can’t reproduce it at will, some folks apparently expose things with names like
streamer1.localto the Internet At Large, with the amusing result that I when I think I’m pinging one of my gadgets that happens to be down at the time, Avahi (etc,etc) fires the packets across the planet.
Comments are closed.