View previous topic :: View next topic |
Author |
Message |
Ridrok Tux's lil' helper
Joined: 26 Jan 2014 Posts: 86 Location: France
|
Posted: Sun Jan 26, 2014 3:35 pm Post subject: Some problem with resolv.conf nameserver ordering ipv4+ipv6 |
|
|
Hello,
I have a small problem on my Gentoo desktop.
My network setup is very very simple: I have a single network card which is eth0 and I get my IP addresses using dhcpcd.
So /etc/conf.d/net is
Code: | dns_domain_lo="mydomain.local"
config_eth0="dhcp" |
My Internet provider provides me with IPv4 and IPv6 connectivity and my router (a Gentoo too) use DNSMasq to provide IPv4 DHCP, IPV6 RA and DNS information using DHCPv6 for Windows hosts.
The problem I have on my gentoo desktop is the DNS order in /etc/resolv.conf. It always put the IPv4 DNS before the IPv6 one and I want to use the IPv6 one by default.
The Generated /etc/resolv.conf is:
Code: | # Generated by dhcpcd from eth0, eth0:dhcp6, eth0:ra
# /etc/resolv.conf.head can replace this line
domain mydomain.local
nameserver 192.168.10.254
nameserver 2a03:x:y:z::1
# /etc/resolv.conf.tail can replace this line |
(I did protect my IPv6 address by changing real values by "x:y:z")
As fas as I understood dhcpcd generates and uses the files in /run/dhcpcd/resolv.conf/
Code: | Vangogh ~ # ll /run/dhcpcd/resolv.conf/
total 12K
-rw-r--r-- 1 root root 81 26 janv. 15:21 eth0
-rw-r--r-- 1 root root 89 26 janv. 15:22 eth0:dhcp6
-rw-r--r-- 1 root root 86 26 janv. 15:41 eth0:ra |
Can someone point me to a solution? How can I make dhcpcd to use the RA or DHCPv6 DNS information before using the IPv4 one so that the resolv.conf has 2a03:x:y:z::1 listed before 192.168.10.254?
Many thanks,
Ridrok |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Ridrok Tux's lil' helper
Joined: 26 Jan 2014 Posts: 86 Location: France
|
Posted: Mon Jan 27, 2014 2:51 pm Post subject: |
|
|
Thank you very much.
It works just fine |
|
Back to top |
|
|
|