[Dnsmasq-discuss] [QUESTION] Why constructor in ipv6 range not work as expected?

Simon Kelley simon at thekelleys.org.uk
Thu May 30 17:19:45 BST 2013


On 30/05/13 15:09, zhiqiang wang wrote:
> Hello all.
>      in my dnsmasq.conf,I put a dhcp-range as follows:
> dhcp-range=tag:br0,::10,::ffff,constructor:br0,ra-names,1440m
> br0 ipv6 address is:a:b:c:d::1/64
>
> I wish dnsmasq will do router advertise on a:b:c:d::, however, dnsmasq
> detected ra prefix ::10 and never send ra message on br0.
>
> However, if I change dhcp range to
> tag:br0,::1,::ffff,constructor:br0,ra-names,1440m
> everything works fine. dnsmasq log shows dnsmasq-dhcp[10809]:
> RTR-ADVERT(br0) a:b:c:d:: and my client can setup it's ip address
> a:b:c:d:1:2:3:4
>
> any ideas?
> thanks.
>
>

The first address of the DHCP has to match the address on the interface. 
This is to stop prefixes existing forever because a SLAAC address is 
assigned to the interface from the router advertisement.

An example:

tag:br0,::1,::ffff,constructor:br0

br0 has address 1234::1 then the range

1234::1 to 1234::ffff is created.


tag:br0,::10,::ffff,constructor:br0

doesn't work because

::10 doesn't match 1234::1, the interface address would have to be 
1234::10 instead.


This is becoming a FAQ, and needs at least a FAQ entry, and possibly 
changing to make it less confusing, that's still work in progress.

Cheers,

Simon.




More information about the Dnsmasq-discuss mailing list