Subject: RE: Application software needs to be "zeroconf-aware"?

From: "Christian Huitema" <[email-masked]>
Date: Sat, 28 Dec 2002 11:48:06 -0800

>>> I think your point here is that zeroconf on disconnected networks is all
>>> well and good (enabling various applications to work where they otherwise
>>> couldn't), but introducing it on connected networks that already have
>>> wider scope addressing schemes in place might cause existing applications
>>> to fail, due to attempting to use link-local addresses to communicate
>>> between links. Is that correct?
>>
>> Yes.   (though there are other reasons that v4LL can cause problems than
>> attempts by apps to use v4LL addresses from outside of their scope)
>
>And that can be handled by any number of methods before applications see it,
>enough that it would be silly to enumerate them all in the spec. It's a
>spec, not a howto. And any addressing method used outside of it's scope is
>going to fail.

Introducing scoped addresses does indeed change the programming model. We have had multiple examples of that when porting applications to use IPv6, and IPv4 LL will have the same issue. The classic socket programming model  is more or less the following:
 
1) Application obtains name of peer,
2) Application resolves name, obtains address of peer, and copies it in a sockaddr structure,
3) Application tries to "connect()" to the peer.
 
The problem is that the "copy to sockaddr" operation normally only copies the address, not the link id. The stack can compensate when there is only one link, and assume that any reference to a link local address goes to this link. But if the host is multi-homed, there is no solution that works really well. For link local addresses to work reliably, the application must be able to indicate the link identifier to the stack; this is done by copying a link id in the sockaddr in IPv6. With IPv4, you have to use something else, e.g. explicitly bind the socket to an interface. In short, Keith is correct: to work reliably, the application must be aware of the scope of the addresses.
 
-- Christian Huitema

---

From: Keith Moore <[email-masked]>
Date: Sat, 28 Dec 2002 15:57:05 -0500

> In short, Keith is correct: to work reliably, the application must be aware of the scope of 
> the addresses.

The other piece of this is that when scoped addresses are potentially used by other nodes, 
there is no way for the application to be aware of the scope of the address.  There is not
even a good way of naming such scopes.  (On a single machine, you can use the interface
name as a scope name, but these scope names are local to the host). 

So it is not just as simple as expecting the app or the kernel to keep track of scope - 
that only solves the problem on the local machine.

In short: scoped addresses are not generally applicable; they need to be used sparingly.

Keith