Discussion:
[Dnsmasq-discuss] define IPv6 prefix for host-records
Carsten Spieß
2017-05-05 14:13:01 UTC
Permalink
Hello ,

i'm using dnsmasq to deliver IPv6 DNS entries.
The IPv6 prefix i get dynamicaly from my ISP after dialin (pppoe),
but this changes on every reconnect (which is at least once a day).

When the prefix changes every IPv6 host in /etc/hosts
dnsmasq.conf files has to be changed to cause dnsmasq to deliver
the IPv6 address containing the new prefix.
(I didn't find a posibility to configure dnsmasq to do this
automatically)

I would like to suggest to add an "constructor:<interface>" option to
--host-record like:
--host-record=<name>[,<name>....],[<IPv4-address>],[<IPv6-address>][,constructor:<interface>][,<TTL>]

Where [<IPv6-address>] contains only the host-/local-network part and
[constructor:<interface>] will add the prefix from <interface>

e.g.
--host-record=myhost,10.1.2.3,::0123:4567:89ab:cdef,constructor:eth1
for adding the /64 prefix of eth1

Regards
Carsten
Simon Kelley
2017-05-05 17:24:32 UTC
Permalink
How do your machines get their IPv6 addresses, and specifically, their
changed IPv6 addresses after the prefix changes.?If you're using DHCPv6
with dnsmasq as the server, then something like this is already
available: if you have a dhcp-range line which has the constructor:
keyword, then you can have IPv6 addresses in dhcp-host lines which have
zero network part, and the relevant prefix will be substituted in.

Cheers,

Simon.
Post by Carsten Spieß
Hello ,
i'm using dnsmasq to deliver IPv6 DNS entries.
The IPv6 prefix i get dynamicaly from my ISP after dialin (pppoe),
but this changes on every reconnect (which is at least once a day).
When the prefix changes every IPv6 host in /etc/hosts
dnsmasq.conf files has to be changed to cause dnsmasq to deliver
the IPv6 address containing the new prefix.
(I didn't find a posibility to configure dnsmasq to do this
automatically)
I would like to suggest to add an "constructor:<interface>" option to
--host-record=<name>[,<name>....],[<IPv4-address>],[<IPv6-address>][,constructor:<interface>][,<TTL>]
Where [<IPv6-address>] contains only the host-/local-network part and
[constructor:<interface>] will add the prefix from <interface>
e.g.
--host-record=myhost,10.1.2.3,::0123:4567:89ab:cdef,constructor:eth1
for adding the /64 prefix of eth1
Regards
Carsten
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Carsten Spieß
2017-05-06 15:10:02 UTC
Permalink
Hello Simon,
Post by Simon Kelley
How do your machines get their IPv6 addresses, and specifically, their
changed IPv6 addresses after the prefix changes.?
With RA/SLAAC, i have a dibbler client running receiving the prefix via
DHCPv6 and distributing it via RA.
Can dnsmasq be configured to run as DHCPv6 client too?
Post by Simon Kelley
If you're using DHCPv6 with dnsmasq as the server,
At the moment not, i'm using dnsmasq vor DHCPv4 and DNS
I have no DHCPv6 server running (neither dnsmasq or dibbler or
something else)
Post by Simon Kelley
then something like this is already available: if you have a dhcp-range line which
has the constructor: keyword, then you can have IPv6 addresses in
dhcp-host lines which have zero network part, and the relevant prefix
will be substituted in.
I've seen this which pointed me to the proposed syntax.

Regards
Carsten
--
Carsten Spieß
Lauterlech 39d
D-86152 Augsburg
Tel.: +49(821)51 78 65
mailto://***@carsten-spiess.de
Simon Kelley
2017-05-11 11:51:43 UTC
Permalink
You're trying to invent yet another way of solving the "naming IPv6
hosts" problem, made more difficult by the fact that they change
addresses as the delegated prefix changes.

There are a couple of other possibilities.

1) If you're using DHCP for IPv4, look at the dnsmasq "ra-names"
facility, which can make creating DNS entries for RA-allocated addresses
automatic.

2) Consider giving your hosts ULA addresses as well as addresses with
the prefix you get from you ISP. If you just want a DNS name that's
usable from the local net, then that gives you a stable address to
associate with the DNS name.

Cheers,

Simon.
Post by Carsten Spieß
Hello Simon,
Post by Simon Kelley
How do your machines get their IPv6 addresses, and specifically, their
changed IPv6 addresses after the prefix changes.?
With RA/SLAAC, i have a dibbler client running receiving the prefix via
DHCPv6 and distributing it via RA.
Can dnsmasq be configured to run as DHCPv6 client too?
Post by Simon Kelley
If you're using DHCPv6 with dnsmasq as the server,
At the moment not, i'm using dnsmasq vor DHCPv4 and DNS
I have no DHCPv6 server running (neither dnsmasq or dibbler or
something else)
Post by Simon Kelley
then something like this is already available: if you have a dhcp-range line which
has the constructor: keyword, then you can have IPv6 addresses in
dhcp-host lines which have zero network part, and the relevant prefix
will be substituted in.
I've seen this which pointed me to the proposed syntax.
Regards
Carsten
_______________________________________________
Dnsmasq-discuss mailing list
http://lists.thekelleys.org.uk/mailman/listinfo/dnsmasq-discuss
Carsten Spieß
2017-05-12 17:22:32 UTC
Permalink
Hello Simon,
Post by Simon Kelley
You're trying to invent yet another way of solving the "naming IPv6
hosts" problem,
yes ;)
Post by Simon Kelley
made more difficult by the fact that they change
addresses as the delegated prefix changes.
There are a couple of other possibilities.
1) If you're using DHCP for IPv4, look at the dnsmasq "ra-names"
facility, which can make creating DNS entries for RA-allocated
addresses automatic.
2) Consider giving your hosts ULA addresses as well as addresses with
the prefix you get from you ISP. If you just want a DNS name that's
usable from the local net, then that gives you a stable address to
associate with the DNS name.
That's _the_ good idea (why i didn't have it myself)!
It's like the NATed private IPv4 addresses i use locally.
The delegated prefix is only for outside connections.

That's it, thanks,
Carsten
--
Carsten Spieß
Lauterlech 39d
D-86152 Augsburg
Tel.: +49(821)51 78 65
mailto://***@carsten-spiess.de
Loading...