[avahi] Strange MDNS response from Axis cameras
lennart at poettering.net
Wed Feb 15 08:06:54 PST 2006
On Wed, 15.02.06 16:45, Iván Sánchez Ortega (i.sanchez at mirame.net) wrote:
> > 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'd call the AXIS cameras broken if they really configure themselves
to the same static ip address, without user intervention.
I think it is more common to expect that static IP addresses are
assigned carefully and without conflicts. How many people do you know
that have an AXIS camera? And how many people do you know which have a
network with 192.168.x.x, 10.x.x.x or 127.16.x.x addresses? I am
pretty sure the latter is by far the larger group!
> > 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 220.127.116.11/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 18.104.22.168 address exists)
> return that address, quit
> use whatever address is left
I still prefer to favour static ip addresses over IPv4ll ones. Static
addresses are usually assigned manually and the user probably had a
good reason to do so. In addition they are don't change that often. In
contrast to IPv4ll addresses, which the user might not even know of,
and which might change on every reboot (or even more often!).
It ight make sense to favour 10.x.x.x, 192.168.x.x and 172.16.x.x over
public IP addresses, though. Therefore I conclude the following algorith:
1. if a locally reachable AND private address exists, use it, quit
2. if a locally reachable AND IPv4LL address exists, use it, quit
2. if a private address exists, use it, quit
3. otherwise use what is left
"locally reachable" means "has a route without gateway"
"private" means "in range 10., 172.16. or 192.168."
"IPv4LL" means "in range 169.254."
Any objections? (Besides that you prefer IPv4LL over private
addresses, which I don't, see above)
> > > 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?
I don't have that. I assigned them myself, and I am not an idiot ;-)
Lennart Poettering; lennart [at] poettering [dot] net
ICQ# 11060553; GPG 0x1A015CC4; http://0pointer.net/lennart/
More information about the avahi