[Dnsmasq-discuss] update on dnsmasq and IPV6 networks
Simon Kelley
simon at thekelleys.org.uk
Sun Sep 16 21:40:22 BST 2012
On 16/09/12 20:05, Gene Czarcinski wrote:
> As stated in other email, I am interested in using dnsmasq to support
> dhcp and even more important dns services on an IPv6 network. To support
> this, I am doing a bunch of testing using qemu/kvm/libvirt
> virtualization with three virtual guests and two virtual networks defined.
>
> The first network is a regular "nat" network connected to the outside
> world and only guest1 is connected to it. The second network is a
> "private" network [no forwarding], has both IPv4 and IPv6 networks
> defined, and is connected to all three guests.
>
> I am running this on Fedora 17 and using NetworkManager which certainly
> adds some complexity.
>
> The two testing guests (guest2 and guest3) depend on guest1 for dhcp (or
> ra) and dns services.
>
> Guest1 is running dnsmasq configured to support both IPv4 and IPv6 with
> dhcp and dns services. The dhcp6 parameters are changed to test
> different tests/configurations. Although there are a number of different
> ways of configuring dnsmasq, I am interested in primarily two: ra-names
> and no mode specified which appears to mean that dnsmasq should act as a
> real dhcp6 server.
>
> 1. ra-names ... it works. Guest2/guest3 initialize IPv4 with dhcp and
> use something (slaac I believe) to get an IPv6 address [NetworkManage
> "automatic" mode for IPv6]. Then dnsmasq goes through its dance to to
> add the IPv6 address under the FQDN of the same system with the IPv4
> address. Note: for IPv4 dhcp, NetworkManager does a "send host-name" so
> that dnsmasq has something to work with.
>
> 2. dhcp6 ... The dnsmasq configuration is set with no "enable-ra" and no
> mode specified on the dhcp-range specification (just IPv6 start/end
> addresses and a prefix). Does not work ... well, it sort of does ... the
> IPv6 address as defined to dnsmasq is assigned to the guest (which is in
> NetworkManager IPv6 dhcp only mode). However, the dns is not updated.
> Running wireshark on guest1, I do not see guest2/guest3 supplying any
> names in their DHCPV6 chatter.
>
> I did some testing and proved (to my satisfaction) that the reason
> dnsmasq does not update the dns is that NetworkManager is not send the
> info. I stopped NetworkManager, changed the ifup-eth network script
> slightly [for dhclient -6 change the "-H" to "-F"] and did a "ifup
> eth0". Wireshark now showed the system sending fqdn.fqdn info and is I
> did host I got both IPv4 and IPv6 address for the system.
>
> Looking at the lease file I see:
> -----------------
> lease6 {
> interface "eth0";
> ia-na 00:d1:4f:88 {
> starts 1347810642;
> renew 1800;
> rebind 3150;
> iaaddr fd00:dead:beef:4::14e {
> starts 1347810642;
> preferred-life 3600;
> max-life 3600;
> }
> option dhcp6.status-code success "Oh hai from dnsmasq";
> }
> option fqdn.encoded true;
> option fqdn.server-update true;
> option fqdn.no-client-update true;
> option fqdn.fqdn "test4.privnet6";
> option fqdn.hostname "test4";
> option fqdn.domainname ".privnet6";
> option dhcp6.client-id 0:1:0:1:17:e8:b1:d1:52:54:0:d1:4f:88;
> option dhcp6.server-id 0:1:0:1:17:e5:df:c2:52:54:0:6c:9a:51;
> option dhcp6.name-servers fe00:dead:beef:4::91;
> }
> -----------------
>
> According the the dhcp-options man-page, the fqdn.fqdn (at least for
> IPv6) can be specified as eather a plain name to be filled out by the
> dhcp server or a real fully qualified domain name wit the string ending
> in a period ".". The way I had "dhclient -6" sending a plain name with
> the "-F".
>
I've just read through this thread and it looks like you've got to the
truth for what needs to provided. Good. Sorry I missed out on helping
earlier.
> Now the really interesting thing is that once I had sent the fqdn info
> is that this system continued to have the dhcp6 address and an IPv6
> entry in the dns. I deleted the leases on the client and restarted
> dnsmasq but it continues.
The name will continue to be associated with the lease by dnsmasq until
the lease expires or the client releases it.
Simon.
More information about the Dnsmasq-discuss
mailing list