[avahi] Resolve multiple IP4 Addresses
lennart at poettering.net
Thu May 7 10:57:37 PDT 2009
On Thu, 07.05.09 13:09, Mark Gollahon (mgollahon at exacq.com) wrote:
> In my case, we are connecting to Axis cameras. Some models of Axis
> cameras report their configured IP address first; others report their
> link-local address first. Now, because of certain other design
> limitations and requirements that would take too much time to go into
> here, we have to store the camera's IP address when that camera is
> configured in our system. So, if during our camera detection phase,
> Avahi hands back the link-local address, then we're totally sunk when
> the link-local address changes (which does at the most inopportune time
> - when the camera reboots and we're trying to reconnect).
I am sorry, but if you use IP addresses like this it is not more than
an ugly hack.
IP addresses are not useful for identifying machines. IP adress can
change. IP addresses can be assigned to multiple machines. One
machine, even one network interface can have multiple IP addresses. IP
addresses are only unique and suitable for identification in a very
specific context, which is when you talk about network interfaces for
the use of routing on a specific network in a specific time frame.
> Furthermore, trying to explain what that "169.x.x.x" address is or why a
> user doesn't see the address they configured into the camera to a user
> not versed in IP addressing is a complete non-starter.
Yes, IP addresses should generally not exposed to the user. That's why
host names have been invented.
> Therefore, saying that scenarios where an mDNS recipient needs all
> addresses for a given DNS name is a misuse of mDNS really is
> disingenuous. There really are times when we need all of the reported
> addresses we can get.
No. This is a hack. An ugly one. And a misuse of mDNS/DNS-SD.
This is precisely the reason why I chose not mimic the Bonjour API in
this aspect: people start to misuse the technology for things it
wasn't designed for.
Lennart Poettering Red Hat, Inc.
lennart [at] poettering [dot] net
http://0pointer.net/lennart/ GnuPG 0x1A015CC4
More information about the avahi