PDA

View Full Version : [SOLVED] IPv6: RDNSSD not adding DNS servers to resolv.conf



Stolen
August 24th, 2010, 09:46 PM
Thinking I should get around to using RDNSS working in my network at home I configured this on my router (an Ubuntu 10.04 server) in /etc/radvd.conf:


RDNSS 2001:470:81e5::1
{
AdvRDNSSPreference 8;
AdvRDNSSOpen off;
};

And radvd started passing out DNS info (from my desktop):


$ rdisc6 eth2
Soliciting ff02::2 (ff02::2) on eth2...

Hop limit : 64 ( 0x40)
Stateful address conf. : No
Stateful other conf. : No
Router preference : high
Router lifetime : 1800 (0x00000708) seconds
Reachable time : unspecified (0x00000000)
Retransmit time : unspecified (0x00000000)
Prefix : 2001:470:81e5::/64
Valid time : 86400 (0x00015180) seconds
Pref. time : 14400 (0x00003840) seconds
Recursive DNS server : 2001:470:81e5::1
DNS server lifetime : 600 (0x00000258) seconds
Source link-layer address: 00:22:3F:F6:2C:33
from fe80::222:3fff:fef6:2c33

However, on my Ubuntu 10.04 desktop, no info filled my resolv.conf, so I wasn't actually using this new info.
After a bit of scouring the web, I found this blog post:
http://www.ipsidixit.net/2010/04/02/243/
Which pointed me in the right direction. I needed to install rdnssd.
I did so, started it up, and still no new entries in resolv.conf.

rdnssd uses a script for adding the entries to resolv.conf:
/etc/rdnssd/merge-hook
Which contains close to reference code for using /sbin/resolvconf to update /etc/resolv.conf:


PATH=/sbin:/bin
INPUT="/var/run/rdnssd/resolv.conf"

if [ -x /sbin/resolvconf ]; then
/sbin/resolvconf -a 000.rdnssd < "$INPUT"
else
cat -- "$INPUT" > "/etc/resolv.conf"
fi

The input file is what contains the entry:


$ cat /var/run/rdnssd/resolv.conf
nameserver 2001:470:81e5::1

So far, so good!
Reading the docs for resolvconf shows that the script seems to be doing things correctly, so I tried an experiment. I edited /var/run/rdnssd/resolv.conf to have an IPv4 address, and ran the script to update the resolv.conf, but still no joy.
The entry goes into the interface under /etc/resolvconf/run/interface:


$ cat /etc/resolvconf/run/interface/000.rdnssd
nameserver 192.168.0.2

But not into my resolv.conf.

So now I'm stuck.

Any ideas on what's going wrong here?

Stolen
August 29th, 2010, 12:16 AM
hah! fixed.
the file /etc/resolvconf/interface-order had the following in it:


# interface-order(5)
lo.inet*
lo.dnsmasq
lo.pdnsd
lo.!(pdns|pdns-recursor)
lo
tun*
tap*
hso*
eth*
ath*
wlan*
ppp*
*

I added:
*.rdnssd to the first line:


# interface-order(5)
*.rdnssd
lo.inet*
lo.dnsmasq
lo.pdnsd
lo.!(pdns|pdns-recursor)
lo
tun*
tap*
hso*
eth*
ath*
wlan*
ppp*
*

and presto:


# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 2001:470:81e5::1
nameserver 192.168.0.1
nameserver 64.59.135.143
search cg.shawcable.net

Which is weird, I'd have thought the final "*" in the interface-order file would have allowed the interface to be added. Guess not.

Stolen
August 31st, 2010, 02:29 AM
So it looks like the real problem was that I had 3 dns servers in my config already. resolvconf only puts in a maximum of 3. I removed one of my dns servers from my ipv4 dhcp server, and the ipv6 dns server now shows up (albeit last.)


# cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 192.168.0.1
nameserver 64.59.135.143
nameserver 2001:470:81e5::1
search cg.shawcable.net