Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have a LAN of IPv6 enabled hosts. I would like to setup a ubuntu as DNSv6 server for the local LAN addresses (there is no internet/tunneling stuff).

I could manually edit the etc/hosts file for each host, but I think a local DNSv6 server would be more efficent. Any suggestion?

EDIT: I found that dnsmasq solves brilliantly my problem; however since by default is running with a lot o paramenters including -no-resolv (this is probabily because the host IPv4 configuration), I need to stop and restart it manually. Can this be avoided?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

First: you don't need to run a separate DNS server on IPv6. Your DNS server doesn't even have to listen to requests over IPv6 to answer with AAAA records. So you can even use DNS and make IPv6 connections while doing all DNS resolving over IPv4. It's not more or less efficient.

Of course, actually doing everything including resolving over IPv6 is much cooler :-)

Making BIND listen to queries on IPv6 is easy (and other DNS servers will be similar):

options {
    listen-on-v6 {
        any;
    };
};

Then you will have to let your clients know that they can do DNS resolving over IPv6. Usually you do this with DHCPv6, but you can also include the information in the Router Advertisements. What your client will use depends on the operating system they run.

DHCPv6 can be used in two ways: stateful and stateless. The stateless setup gives all clients extra information like DNS resolvers etc. without actually doing all the difficult work like assigning addresses and maintaining a leases database. An example configuration for the dibbler DHCPv6 server (again, other DHCP servers will be similar):

iface eth0 {
    stateless
    option dns-server 2001:db8:0:1::53
    option domain example.com, test1.example.com
}

Then you need to let your clients know that there is a stateless DHCPv6 server available on the network. We also include the DNS information for clients that want it this way instead of through DHCPv6 (yes, it's annoying there are two ways to set the same settings, but that's the way it is). I use RAdvD here:

interface eth0 {
    AdvSendAdvert on;
    AdvDefaultPreference high;
    AdvManagedFlag off;
    AdvOtherConfigFlag on;
    prefix 2001:db8:0:1::/64 {};
    RDNSS 2001:db8:0:1::53 {};
    DNSSL example.com test1.example.com {};
};

Now the RA tells the client the DNS settings (if it can understand them here) and it tells the client that there is a stateless DHCPv6 server present (managed off, other-config on) and the DHCPv6 server provides the DNS settings as well (for clients that expect them here). The DNS server listens to both IPv4 and IPv6 and can answer all requests via either protocol. The answers (A and/or AAAA records) tell the client what they can use to connect. Most clients will prefer IPv6 (the AAAA answer) when they can.

PS: Replace 2001:db8:0:1::53 with the real IPv6 address of your DNS server of course.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.