[Dnsmasq-discuss] Additional feature requested for stateful DHCHv6 together with a 6RD-tunnel to the ISP

Simon Kelley simon at thekelleys.org.uk
Fri Jan 11 14:59:20 GMT 2013


On 11/01/13 11:09, Vladislav Grishenko wrote:
> Hi Simon,
> 
> constructor:<ifname> stuff works well, and is useful not only for 6RD, but
> for 6to4, upstream DHCPv6_PD also, and even for simplifying static addresses
> configuration without dnsmasq restart. Great.

It's good to get people looking at this and thinking about it. It's new
functionality with everything up in the air at the moment, so now is the
time to get it right.

> There's still some thought about:
> 
> 1. DHCP stateless with dhcp-range=::1,constructor:br0,ra-stateless,64
> Works with unneeded (in case of no DHCPv6 stateful) full address in log
> 	dnsmasq-dhcp[9636]: DHCPv6 stateless on ::1 
> 	dnsmasq-dhcp[9636]: router advertisement on ::1, template for br0
> 	dnsmasq-dhcp[9636]: DHCPv6 stateless on xxxx:xxxx:xxxx::1
> 	dnsmasq-dhcp[9636]: router advertisement on xxxx:xxxx:xxxx::,
> constructed for br0
> For dhcp stateless, only prefix should be used/shown, imho
> 
> 2. DHCP stateless with dhcp-range=::,constructor:br0,ra-stateless,64
> I.e empty prefix before construction, this is not working at all. Neither
> with 64 prefix, nor without (it's 64 by default, and resetting to 0, if
> prefix is empty in options.c)


The host-identifier (ie the ::1) matters in both these situations
because the template is only used when an address that matches the
host-identifier appears on the interface.

1234::1 will generate RA, but
1234::2 will not.

The first implementation just looked for at the prefix, but there's a
problem with this. It's quite easy, once router advertisements start,
for the server interface to get a SLAAC address allocated. If any
address on the prefix is enough to maintain the constructed dhcp-range,
then the SLAAC address will stop it from ever being deleted. So we
changed to a single specified address for RA and the first address in
the range for stateful DHCPv6.

This logging is wrong though:

dnsmasq-dhcp[9636]: DHCPv6 stateless on ::1

it should include the template interface.

> 
> 3. Only new addresses on interface trigger recalculation.
> This works for scenarios:
> 	1. Del old address from interface
> 	2. Add new address on interface => only new is announced now
> And this is not work well with backorder scenario:
> 	1. Add new address on interface => both addresses are announced
> 	2. Del old address from interface => nothing happens

Good point. That should be easy to fix, by adding the relevent event to
the netlink mask.

> If address is deleted, shouldn't it became deprecated for announcing (ra)?
> Haven't played with address deprecation instead of deletion yet.

Interesting question. For constructed RA prefixes, the valid and
preferred times on the address on the server are used in the calculation
of the advertised times. No prefix will be advertised for longer than
the corresponding time for the server address so setting preferred time
on the server to zero effectively deprecates the prefix in subsequent
advertisements. The plan is that the DHCP-PD client or 6RD client, or
whatever should manage this. It would be possible for dnsmasq to at
least emit an adertisement deprecating a prefix if the address just
disappears without warning.


> 
> 4. syntax constructor:<ifname> can be done in constructor[:<ifname>] way,
> with usage of interface= data minus dhcp excluded interfaces.

Sorry, I don't understand what you're suggesting here.



Cheers,

Simon.





More information about the Dnsmasq-discuss mailing list