Discussion:
ip6addrctl(8) support (was Re: Retiring dhclient)
(too old to reply)
Takahiro Kambe
2011-11-15 23:03:31 UTC
Permalink
Hi.

In message <***@britannica.bec.de>
on Wed, 16 Nov 2011 03:10:53 +0100,
DHCPv6 support is a sore point in NetBSD for now and fixing that one way
or the other would be appreciated. Getting the support for the server is
It reminds me that NetBSD needs ip6addrctl(8) support as like FreeBSD
for supporting real world's IPv6 environment.

I think it isn't very difficult to add to NetBSD, dose anyone try it?

Best regards.
--
Takahiro Kambe <***@back-street.net>

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ted Lemon
2011-11-16 02:22:36 UTC
Permalink
Post by Takahiro Kambe
It reminds me that NetBSD needs ip6addrctl(8) support as like FreeBSD
for supporting real world's IPv6 environment.
What's that?


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Takahiro Kambe
2011-11-15 23:12:51 UTC
Permalink
In message <67B2746F-D105-47CB-92AE-***@fugue.com>
on Wed, 16 Nov 2011 10:22:36 +0800,
Post by Ted Lemon
Post by Takahiro Kambe
It reminds me that NetBSD needs ip6addrctl(8) support as like FreeBSD
for supporting real world's IPv6 environment.
What's that?
Here is output on FreeBSD 7.4-STABLE:

% /usr/sbin/ip6addrctl show
Prefix Prec Label Use
::1/128 50 0 0
::/0 40 1 0
2002::/16 30 2 479
::/96 20 3 0
::ffff:0.0.0.0/96 10 4 0


Quote from ipaddctl(8)

IP6ADDRCTL(8) FreeBSD System Manager's Manual IP6ADDRCTL(8)

NAME
ip6addrctl -- configure address selection policy for IPv6 and IPv4

SYNOPSIS
ip6addrctl [show]
ip6addrctl add prefix precedence label
ip6addrctl delete prefix
ip6addrctl flush
ip6addrctl install configfile

DESCRIPTION
The ip6addrctl utility manages the policy table of source and destination
address selection for outgoing IPv4 and IPv6 packets. When ip6addrctl is
invoked without an argument or with a single argument show, it prints the
content of the policy table currently installed in the kernel.

To modify the table, the following operations are available:


add prefix precedence label
Add a policy entry. The prefix argument is an IPv6 prefix, which
is a key for the entry. An IPv4 prefix should be specified with
an IPv6 prefix using an IPv4-mapped IPv6 address. The precedence
and label arguments are decimal numbers, which specify the prece-
dence and label values for the entry, respectively. This opera-
tion should be performed without an existing entry for the pre-
fix.

delete prefix
Delete a policy entry specified by prefix, which should be an
IPv6 prefix. A corresponding entry for the prefix should have
already been installed.

flush Delete all existing policy entries in the kernel.

install configfile
Install policy entries from a configuration file named

...
--
Takahiro Kambe <***@back-street.net>

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Ted Lemon
2011-11-16 02:31:39 UTC
Permalink
Post by Takahiro Kambe
ip6addrctl -- configure address selection policy for IPv6 and IPv4
Ah, source address selection. Thanks.

It might be worth considering leapfrogging the current state of the art rather than conforming to it.


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
David Young
2011-11-16 03:01:40 UTC
Permalink
Post by Ted Lemon
Post by Takahiro Kambe
ip6addrctl -- configure address selection policy for IPv6 and IPv4
Ah, source address selection. Thanks.
It might be worth considering leapfrogging the current state of the art rather than conforming to it.
Look at the approach I take in in_getifa(9). It is a more flexible way
to implement RFC3484 than ip6addrctl and the IPv6 stack currently use.

Dave
--
David Young
***@pobox.com Urbana, IL (217) 721-9981

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Takahiro Kambe
2011-11-16 03:28:48 UTC
Permalink
In message <***@pixotech.com>
on Tue, 15 Nov 2011 21:01:40 -0600,
Post by David Young
Post by Ted Lemon
Post by Takahiro Kambe
ip6addrctl -- configure address selection policy for IPv6 and IPv4
Ah, source address selection. Thanks.
It might be worth considering leapfrogging the current state of the art rather than conforming to it.
Look at the approach I take in in_getifa(9). It is a more flexible way
to implement RFC3484 than ip6addrctl and the IPv6 stack currently use.
ipaddctl(8) says not only source address selection but destination
address selection. Can in_getifa(9) take effect about destination
address selection?

Best regards.
--
Takahiro Kambe <***@back-street.net>

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Robert Elz
2011-11-16 03:57:18 UTC
Permalink
Date: Tue, 15 Nov 2011 21:01:40 -0600
From: David Young <***@pobox.com>
Message-ID: <***@pixotech.com>

| Look at the approach I take in in_getifa(9). It is a more flexible way
| to implement RFC3484 than ip6addrctl and the IPv6 stack currently use.

I had not noticed that before, it is definitely better than 3484, and
orders of magnitude better than the ip6addrctl (as described here), but
still not quite enough.

The one missing thing is a missing piece from NetBSD's interface configuration,
and as best I can tell, most other network configs - IPv6 addresses have
an address type, or class, and it isn't just "private/link-local/other",
we have temporary use addresses, and CGAs (well, we should... and can at
application level even if the kernel support is not there) and potentially
more (like we should have care of addresses and home addresses, and ...) - a
web browser probably should be requesting a temporary use care-of addr
(that is, rfc4941) for privacy, on the other hand, an e-mail client (MTA)
probably should not, to avoid grey-listing (and other anti-spam) nonsense,
it really needs to use a stable (DNS listed probably) permanent address
(or as permanent as they come these days), which might mean a home addr,
though e-mail clients don't really need that (if the node moves, the e-mail
transaction can just restart using a new care-of addr, mobile IP isn't really
needed for e-mail).

For this to be possible, we need to be able to configure the address type
when addresses are configured, and the address type needs to be a bitmap,
not a value, as each capability either exists, or does not, more or less
independently of others, so applications (and the global policy) can
indicate what kind of address to use, if available, or what kind of address
is required, and not do that by attempting to guess which prefix, or which
local part, if of which type. It is a simple addition (this part was
working fine in the work my students did - though it was never integrated
into ifconfig which would be a requirement for real life use). I think
it also adds a missing piece needed to correctly handle the IPv6 interface
or addressing (or some) MIB.

Of course, source address selection needs more than just the address type
but without it, we can never do a good job.

kre


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Michael van Elst
2011-11-16 07:06:44 UTC
Permalink
Post by Takahiro Kambe
ipaddctl(8) says not only source address selection but destination
address selection. Can in_getifa(9) take effect about destination
address selection?
What is 'destination address selection' ? Hinting getaddrinfo() ?
--
--
Michael van Elst
Internet: ***@serpens.de
"A potential Snark may lurk in every tree."

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Takahiro Kambe
2011-11-16 07:35:31 UTC
Permalink
In message <j9vne4$5o$***@serpens.de>
on Wed, 16 Nov 2011 07:06:44 +0000 (UTC),
Post by Michael van Elst
Post by Takahiro Kambe
ipaddctl(8) says not only source address selection but destination
address selection. Can in_getifa(9) take effect about destination
address selection?
What is 'destination address selection' ? Hinting getaddrinfo() ?
Yes. There are some code getting policy set by ipaddrctl(8) in kernel
at lib/libc/net/getaddrinfo.c and lib/libc/net/name6.c. (FreeBSD)

It reorders address in getaddrinfo() and getipnodebyname().
--
Takahiro Kambe <***@back-street.net>

--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Robert Elz
2011-11-16 03:40:36 UTC
Permalink
Frankly, that's disgusting, and other than being at least an attempt at
source address selection (which makes it better than nothing, perhaps)
it is truly ugly, and the man page is even worse (given it gives no
clue at all just what the "label" and "preference" actually do, given
the name "preference" one assumes it implies some amount of goodness,
and it appears that it expects (but doesn't actually say) integers,
but doesn't bother to say whether bigger integers or smaller integers are
better (and which are worse) in terms of the overall goodness.
(Of course, that's just the man page).

There has to be a better way for source addr selection than that, and
better than 3484 (which is truly ancient these days really).

I had some students do a version (that used sysctl for config, rather
than yet another magic ioctl and magic program to use it) a year or
two ago - unfortunately they never quite finished it to the stage where
it could be usefully used (or distributed) and they graduated and went
away, so ... But it was both simpler, and more general, than 3484
(particularly in allowing applications to select preferred address types,
not just based upon prefix, which is mostly a truly ugly way to attempt
to select source addresses.)

kre


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
dieter roelants
2011-11-26 16:03:58 UTC
Permalink
On Wed, 16 Nov 2011 10:40:36 +0700
Post by Robert Elz
There has to be a better way for source addr selection than that, and
better than 3484 (which is truly ancient these days really).
Until we have such a better way, would anyone be opposed to adding the
net.inet6.ip6.prefer_tempaddr from Kame? Or is there another way to use
temporary addresses that I failed to find?
Post by Robert Elz
I had some students do a version (that used sysctl for config, rather
than yet another magic ioctl and magic program to use it) a year or
two ago - unfortunately they never quite finished it to the stage where
it could be usefully used (or distributed) and they graduated and went
away, so ... But it was both simpler, and more general, than 3484
(particularly in allowing applications to select preferred address types,
not just based upon prefix, which is mostly a truly ugly way to attempt
to select source addresses.)
Myabe it should be on the NetBSD projects page?

kind regards
dieter
Post by Robert Elz
kre
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Loading...