<br><font size=2 face="sans-serif">You can use the &quot;--force-bind&quot;
option to force avahi-autoipd to ignore other interface configuration (for
example, configuration by DHCP client) and go ahead and assign a link-local
address no matter what.</font>
<br>
<br><font size=2 face="sans-serif">Hopefully your network admin is a bit
more on-the-ball than to allow a bunch of uncoordinated DHCP servers on
the network. &nbsp;But, if you're building consumer electronics products,
it's probably a good idea to be ready for such a thing, if possible. &nbsp;Of
course, there's only so much we can do to deal with a network mis-configuration
like that, and we must be very careful not to make the problem worse with
our workarounds.</font>
<br>
<br><font size=2 face="sans-serif">Cheers.</font>
<br>
<br><font size=2 face="sans-serif">--Jen</font>
<br>
<br>
<br>
<br>
<table width=100%>
<tr valign=top>
<td>
<td><font size=1 face="sans-serif"><b>Linus Lüssing &lt;linus.luessing@web.de&gt;</b></font>
<br><font size=1 face="sans-serif">Sent by: avahi-bounces@lists.freedesktop.org</font>
<p><font size=1 face="sans-serif">02/12/2010 06:54 PM</font>
<br><font size=1 face="sans-serif">Please respond to Avahi ML</font>
<td><font size=1 face="Arial">&nbsp; &nbsp; &nbsp; &nbsp; </font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; To:
&nbsp; &nbsp; &nbsp; &nbsp;Avahi ML &lt;avahi@lists.freedesktop.org&gt;</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; cc:
&nbsp; &nbsp; &nbsp; &nbsp;(bcc: Jen Chitty/ENG/VTNCAN/VTECH)</font>
<br><font size=1 face="sans-serif">&nbsp; &nbsp; &nbsp; &nbsp; Subject:
&nbsp; &nbsp; &nbsp; &nbsp;Re: [avahi] General Avahi usage questions</font></table>
<br>
<br>
<br><font size=2><tt>Moin moin, Lennart,<br>
Hi Jen,<br>
<br>
thanks a lot for your detailed explanations so far.<br>
<br>
On Wed, Feb 10, 2010 at 11:26:36PM +0100, Lennart Poettering wrote:<br>
&gt; On Sat, 06.02.10 18:46, Linus Lüssing (linus.luessing@web.de) wrote:<br>
&gt; <br>
&gt; &gt; hi guys. I was looking for a way to get pidgin/libpurple working<br>
&gt; &gt; with avahi+ipv6. but then I realised, that I'm lacking some basic<br>
&gt; &gt; knowledge about avahi :)<br>
&gt; &gt; <br>
&gt; &gt; first question: I think I remember having the avahi-daemon running<br>
&gt; &gt; which assigned an ipv4 address on a new alias interface. when
does<br>
&gt; &gt; this happen, when not?<br>
&gt; <br>
&gt; avahi-autoipd is usually used as a fallback for dhcp.<br>
I see. In the beginning I more had the impression that avahi would utilise<br>
dedicated subnets only. But sounds plausible as at least for IPv4<br>
IP collisions are a lot less when using dhcp. Hmm, but also... if<br>
I intend to use a network without a dhcp server and all clients<br>
rely on just using the link local ones, then one host that left its dhcp<br>
server on by mistake could cause quite a lot of trouble couldn't<br>
it? Or even if there were two dhcp serves on by mistake with two<br>
different subnets... hell, that would split everything in two to<br>
three clouds! I couldn't find an option to enforce link-local<br>
addresses for avahi anywhere, is there something like this?<br>
&gt; <br>
&gt; &gt; I also found this avahi-ipauto thingy, but it does not seem to
be<br>
&gt; &gt; running for this avahi-ip4ll stuff to assign a 169.254.0.0/16<br>
&gt; &gt; adress<br>
&gt; &gt; -169.254.0.0/24 and 169.254.254.0/24 (if I remember right)<br>
&gt; <br>
&gt; uh? avahi-autoipd will assign one of those addresses if no other<br>
&gt; address is configured via dhcp or so.<br>
Ah, okay. I had to play a little with dhcp client and avahi to<br>
see when and how avahi-autoipd is actually determening this state.<br>
On my Debian system it also looks like, that additionally I have<br>
to set the according interface to static, dhcp or NetworkManager<br>
in /etc/network/interfaces, right? (according to<br>
/etc/avahi/avahi-autoipd.action)<br>
<br>
&gt; &gt; 2nd question: how can I look up the ip addresses that are assigned<br>
&gt; &gt; to mylaptop.local (mylaptop should just be the local host name
in<br>
&gt; &gt; /etc/hosts on 127.0.1.1 on a debian system, right?)<br>
&gt; <br>
&gt; getent hosts mylaptop.local<br>
Hmm, that did not seem to work, I'm just getting the local ip<br>
addresses specified in /etc/hosts. But hey, the mdns-scan did at<br>
least find the other machine in my network.<br>
&gt; <br>
&gt; (you need nss-mdns installed for that)<br>
Ehm, and there's only the libnss-mdns available in Debian<br>
unstable (and it is installed here).<br>
<br>
&gt; <br>
&gt; Avahi will always announce the &quot;best&quot; address it can find
on each<br>
&gt; interface. Meaning that global addresses are generally preferred over<br>
&gt; link-local ones.<br>
So like global -&gt; organisation -&gt; site -&gt; link -&gt; host? (Is
the<br>
ipv6 multicast scopes list the one that can be used as a<br>
reference? Or is there something more complete?)<br>
Another question that comes in my mind here: What happens, if two<br>
computers have two different subnets configured which can't reach<br>
each other over this one but could reach each other over their<br>
ipv6 link local address as being on the same ethernet link.<br>
Shouldn't avahi announce this link local address as well so that<br>
those two hosts could communicate with each other anyway?<br>
Is there a reason why avahi is not announcing all ip addresses<br>
available on an interface (with adding its prefered priorities so<br>
that the another host could choose the interface with the highest<br>
priority stated and reachable as well)?<br>
<br>
And I guess, avahi is announcing both the &quot;best&quot; ipv6 and ipv4<br>
address letting the other hosts decide which type they are<br>
capable connecting to, right?<br>
&gt; <br>
&gt; &gt; 3rd question: when exactly is avahi-dnsconfd needed and why?
Is my<br>
&gt; &gt; assupmtion right, that I need this thing, if I want to use<br>
&gt; &gt; applications that are not utilising avahi (for instance a normal<br>
&gt; &gt; ping tool) and I want to reach mylaptop.local with that?<br>
&gt; <br>
&gt; It's useful when unicast-DNS server adresses are stored in multicast<br>
&gt; DNS. it could be used to configure unicast DNS servers in a non-dhcp<br>
&gt; environment. It is a more exotic feature and hence not installed by<br>
&gt; default on most distros.<br>
&gt; <br>
&gt; &gt; 4th question: so an application that uses the libavahi can tell<br>
&gt; &gt; the avahi-daemon to announce a certain service with the specified<br>
&gt; &gt; port. which ip addresses would/should the avahi-daemon be<br>
&gt; &gt; announcing then?<br>
&gt; <br>
&gt; as mentioned above avahi uses the &quot;best&quot; ip adress of each
respective<br>
&gt; iface, and treat every iface seperately.<br>
&gt; <br>
&gt; &gt; 5th question: what has to be kept in mind when using avahi with<br>
&gt; &gt; ipv4+ipv6 or ipv6 only? read this article in the german linux<br>
&gt; &gt; maganzine &nbsp;03/06. at the end it is saying that for ipv6
stateless<br>
&gt; &gt; autoconfiguration, avahi-dnsconfd is necessary. sounds plausible<br>
&gt; &gt; because of the lack of a dhcp server. but why is this not the
case<br>
&gt; &gt; for avahi with ipv4?<br>
&gt; <br>
&gt; Some awesome dude wrote that article. He is really brainy and smart.
I<br>
&gt; am a great admirer of his ;-)<br>
&gt; That said, I cannot remember I wrote &quot;necessary&quot; in that<br>
&gt; article. useful, yes. But necessary, no. In IPv4 if you do automatic<br>
&gt; configuration of routable IP adresses you use DHCP. And DHCP allows<br>
&gt; configuration of unicast DNS servers anyway. That's why the<br>
&gt; avahi-dnsconfd stuff is not really that useful there.<br>
&gt; <br>
&gt; Lennart<br>
&gt;<br>
Okay, and then I'd have some more questions about how applications<br>
that utilise the libavahi stuff should react. Sorry in advance,<br>
didn't find the time to look at it yet, but will definitely do<br>
that in two weeks the latest.<br>
Should applications only allow connections from other hosts that<br>
had previously announced themselves via avahi or should they accept<br>
any connection (which might be a security issue?). But the first<br>
thing could cause some trouble if the kernel would decide to use<br>
source address differing from the one announced by avahi...<br>
And again for IPv6, generally an application should try connecting<br>
to the host's announced IPv6 address first and retry the IPv4 one<br>
after a timeout?<br>
<br>
Cheers, Linus<br>
_______________________________________________<br>
avahi mailing list<br>
avahi@lists.freedesktop.org<br>
http://lists.freedesktop.org/mailman/listinfo/avahi<br>
</tt></font>
<br>