Re: SLA bitfield or integer added to base prefix?
Harald Albrecht
Tue May 30 21:24:20 2017
Roy,
thank you very much for your clear and concise answer! That helps me
alot, since I don't need to worry about handling SLAs as
integers/offsets, but instead know that I simply need to tack on the
SLA/subnet bits. That makes things easier for me.
Best regards,
Harald
Am 30.05.2017 um 22:09 schrieb Roy Marples:
Hi
On 30/05/17 21:01, Harald Albrecht wrote:
Hi,
anothwr discussion here reminded me of a question I alsways had in my
mind about assigning prefixes from a delegated prefix block: is the
"SLA" a bitfield that gets added to the delegated prefix or is it an
integer that gets added to the prefix (base)?
It's a bitmask. Code here:
https://dev.marples.name/source/dhcpcd/browse/master/src/ipv6.c;f58a7db77fd3dfec7f0d5c3630ecf906f300e9c1$484
For example, let's ask for a /63 prefix delegation, and the
delegating router hands out 2001:db8:0:ff ... for whatever reason,
that where it has space for two prefixes. Or is this already an
invalid assumption, so delegating routers never allocate on
"unaligned" boundaries?
It's an invalid assumption, because anything beyond the prefix mask is
ours to play with as we choose.
Would then the second prefix 2001:db8:0:ff::PLUS 0:0:0:1:: or is this
wrong, because the prefix block needs to be 2001:db8:0:fe:: OR 0:0:0:1?
Because it's /63 you were really delegated 2001:db8:0:fe
Hope this helps
Roy
Archive administrator: postmaster@marples.name