Subject: | rfc compliant dhcpv6 prefix length |
Date: | Wed, 16 Feb 2011 00:42:53 +0100 |
To: | dhcp-suggest@isc.org |
From: | Hannes Frederic Sowa <hannes@stressinduktion.org> |
Hello!
Some time ago (last year) we had a thread on linux-net about handling prefix
lengths in dhcpv6. David Hankins idea [1] was to use a custom prefix-length
option in the VSIO space. I like this idea a lot, especially because you can
deploy networks without being dependent on router advertisments.
In the case where such an option is missing from a dhcp-offer one could fall
back to the following solution (I also posted it as a reply [2]):
Scan the routingtable via libnl or rtnetlink and apply the prefix-length of
the route with the longest-matching prefix marked with RTF_ADDRCONF |
RTF_PREFIX_RT (this is of couse a linux-only solution, solaris and freebsd
should have proper apis to query prefix-length information from router
advertisments).
I haven't tried it if the flags are correclty exported to userspace. But if
you are interested in such a fall-back solution I would be happy to test this
case at the weekend in my testbed.
Btw: I have seen setups where they currently use dibbler-dhcp to advertise
/96-prefixes, as the "upstream" has only received a /64 itself. So non-/64
length prefixes will be an issue in near future, I think (I know it is so
wrong).
Greetings from Germany,
Hannes
[1] http://article.gmane.org/gmane.linux.network.general/14099
[2] http://article.gmane.org/gmane.linux.network.general/14572