[avahi] Strange MDNS response from Axis cameras
Iván Sánchez Ortega
i.sanchez at mirame.net
Wed Feb 15 07:45:22 PST 2006
-----BEGIN PGP SIGNED MESSAGE-----
El Miércoles 15 de Febrero de 2006 16:23, Lennart Poettering escribió:
> > - - Discard non locally routable addresses.
> This is not an option, since it's fine to refer to external IP
> addresses with local host names. (such as creating a local name
> "debian.local" pointing to your local Debian mirror, like
I really meant "Discard non locally routable link-local addresses".
As the 169.254.0.0/16 IP addresses are reserverd by the ICANN for use with RFC
3927, we can be absolutely sure that such an address will never be from a
server outside our network (or, at least, we can safely assume so).
> The way to go is probably just to favor local IP addresses over non-locals
> if both are available.
Remember the scenario we were discussind in this thread: 50 Axis cameras in
the same network, with mDNS (RFC 3927-compliant) and the *same* static IP
address. Always preferring local (10.0.0.0/172.16.0.0/192.168.0.0) addresses
over local-link (169.254.0.0) addresses is wrong.
> I guess I will implement something like this:
> 1. if a local/non-IPv4LL address exists, use it, quit
> 2. if a local/IPv4LL address exists, use it, quit
> 3. otherwise use what is left
IMHO the way to to is something like:
if (a 22.214.171.124/16 address exists), then
if (my computer can route such addresses without going through a gateway)
return the 169.254.0.0/16 address, quit
else if (a 10.0.0.0, 172.16.0.0 or a 126.96.36.199 address exists)
return that address, quit
use whatever address is left
> If I understand you correctly this algorithm is compatible with those
> AXIS cameras you were talking of, right?
> > I agree with Marc: link-local addresses (169.254.0.0) are preferible than
> > static addresses.
> I don't think so. In my LAN I use IP addresses from the range
> 192.168.50.x and would prefer I they are used instead of the
> 169.254.x.x addresses.
But if your computer can route link-local traffic, and by any chance you have
got two devices in the same static IP (due to hard resets to the factory
default, for example), what should happen?
The key is to prefer link-local addresses, but *only* if your computer knows
that link-local addresses are directly routable.
Let's say that I have a device with two addresses: 192.168.2.5 and
If my computer has zeroconf installed (or has a entry in the routing table
according to http://developer.apple.com/qa/qa2004/qa1357.html ), then prefer
the link-local address over local addresses over remote addresses.
If my computer has no zeroconf (and no such entry in the route table), then
prefer local addresses over remote addresses over link-local addresses.
> If you want compliance with RFC 3927, you're probably better off
> installing an IPv4ll implemntation, such as Anand Kumrias "zeroconf"
> package. (yes, that package has a stupid name!)
> apt-get install zeroconf
Been there, done that, seems like a good solution to me.
Iván Sánchez Ortega <ivansanchez at escomposlinux.org> <i.sanchez at mirame.net>
Proudly running Debian Linux with 2.6.12-1-686 kernel, KDE3.5.0, and PHP
5.1.2-1 generating this signature.
Uptime: 16:26:42 up 4:31, 1 user, load average: 0.32, 0.45, 0.49
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (GNU/Linux)
-----END PGP SIGNATURE-----
More information about the avahi