Raspberry Pi vs. Avahi

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:

Raspberry Pi 3 - WiFi MAC address

Raspberry Pi 3 – WiFi MAC address

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:

SunFounder WiFi Adapter - MAC address

SunFounder WiFi Adapter – MAC address

I didn’t label the (unused) Ethernet jacks, figuring I’d solve that problem after it trips me up.

Advertisements

,

  1. #1 by scruss2 on 2017-01-18 - 18:30

    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.

    • #2 by Ed on 2017-01-18 - 19:03

      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 hosts and hostname before booting the Pi, which tends to reduce the carnage out there on the bitstream. Generally, I remember to do that…

  2. #3 by eriklscott on 2017-01-19 - 17:19

    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. :-)

    • #4 by Ed on 2017-01-19 - 18:59

      Although I can’t reproduce it at will, some folks apparently expose things with names like streamer1.local to 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.

      Hilarity ensues…

  1. WWVB Receiver: First Light! | The Smell of Molten Projects in the Morning
  2. Raspberry Pi Boot vs. Avahi vs. DHCP | The Smell of Molten Projects in the Morning

Spam comments vanish. Comment moderation may cause a delay.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s