[Dnsmasq-discuss] How to add AAAA record for host with dynamic prefix?
Simon Kelley
simon at thekelleys.org.uk
Thu Feb 18 23:23:58 UTC 2021
On 13/02/2021 19:22, Fred F wrote:
> Dear all,
>
> I'd like to bump this question. Isn't there anybody who is using
> dnsmasq in IPv6 networks with dynamic prefixes?
>
> Regards,
> Frederik
>
> On Sat, 10 Oct 2020 at 16:59, Fred F <frederik.vogelsang at gmail.com> wrote:
>>
>> Hi,
>>
>> I am using dnsmasq in an environment with a dynamic IPv6 prefix. On a
>> few of my servers I am using statically assigned IP addresses for IPv4
>> and static interface tokens for IPv6 (through systemd-networkd). This
>> way the machines will always have predictable v4 and v6 addresses
>> without DHCP or SLAAC in the following format:
>>
>> v4: 192:168.1.1
>> v6: dead::beef:192:168:1:1 (where dead::beef if the current IPv6 prefix).
>>
>> Now I'd like to add AAAA records for these hostnames in dnsmasq. When
>> defining DHCP/SLAAC ranges in dnsmasq there is the
>> "constructor:infname" syntax which automagically uses the interface's
>> current IPv6 prefix. Is there something like that for host records?
>>
>> Something like this would be super cool, but I cannot get it to work:
>>
>> host-record=laptop,laptop.thekelleys.org,192.168.1.1,::192.168.1.1,constructor:eth0
>>
>> Is there any other way to do what I am doing? I know about the
>> "ra-names" feature but unfortunately it's not compatible with IPv6
>> interface tokens other than the MAC address (a.k.a. default SLAAC).
>>
>>
>
There's a way to do this with DHCPv6-assigned addresses, bit not
arbitrary DNS records setup using --host-record.
If it was me, I'd use ULA to have an unchanging IPv6 address for each
host, as well as the dynamically assigned prefix.
Cheers,
SImon.
More information about the Dnsmasq-discuss
mailing list