Re: DHCPv6, IPv6 net tools

From: David W. Hankins
Date: Tue Feb 06 2007 - 19:12:06 EST


I'd like to thank you both of you for your replies. Between the
two I have a pretty detailed picture I think.

On Mon, Feb 05, 2007 at 10:56:36PM +0000, Jeroen Massar wrote:
> The address which is the 'most preferred' will be used when creating a
> new outbound connection when the application didn't forcefully bind to a
> specific address.
>
> When an address becomes deprecated it just keeps on being used by the
> application. No transition to another address is done. Only thing is
> that it won't be used for creating new connections.

My vague signalling question was more how I, as a DHCPv6 client
implementor, might communicate the status of these addresses to
the kernel.

In looking at /sbin/ip, I see that it has an idea of preferred and
valid lifetimes, but there doesn't seem to be a way to set these,
at least not on the command line.

Obviously there's a mechanism to add an address...but no way to set
an address' flags (to set deprecated, say). Even if there were, there
is no way to 'update' an address, so I gather I would have to
delete and re-add any address I wanted to change.

> Afaik there is indeed no signaling for this yet. But it is tricky anyway
> to have new-interface/address detection in a unix-wide way. One tends to
> end up listening to routing messages of the kernel interface; which
> IMHO is a bit much to ask from applications.
>
> From that perspective, for C, there should have been a layer between the
> normal BSD socket calls and the application user ages ago which handled
> these scenarios.

For this part of signalling I'm not so concerned.

For most applications, the current behaviour on their socket
operations is good enough.

For others, there is for example the NetworkManager applet down in
the gnome area building off of dBus and HAL provide a good enough
mechanism to communicate events like this. Good enough at least
for gaim, which constantly annoys me by stealing focus every time
my wireless network reconnects...it gets an event from the NM
applet and knows to reconnect. This shouldn't be hard to extend
to advice non-preference of addresses ("reconnect if you're using
this address").

Jason vas Dias has done some awesome work integrating ISC dhclient
with NetworkManager. I've been meaning to build upon it, and now
with this DHCPv6 project I may just get my chance
(/sbin/dhclient-script is still something we have to do, but it
grows more and more unwieldy).

--
David W. Hankins "If you don't do it right the first time,
Software Engineer you'll just have to do it again."
Internet Systems Consortium, Inc. -- Jack T. Hankins

Attachment: pgp00000.pgp
Description: PGP signature