Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Some problem with resolv.conf nameserver ordering ipv4+ipv6
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Ridrok
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jan 2014
Posts: 86
Location: France

PostPosted: Sun Jan 26, 2014 3:35 pm    Post subject: Some problem with resolv.conf nameserver ordering ipv4+ipv6 Reply with quote

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
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Jan 27, 2014 11:47 am    Post subject: Reply with quote

Install openresolv and set this in /etc/resolvconf.conf

Code:
interface_order="lo lo[0-9]* eth0:dhcp6 eth0:ra"

_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
Ridrok
Tux's lil' helper
Tux's lil' helper


Joined: 26 Jan 2014
Posts: 86
Location: France

PostPosted: Mon Jan 27, 2014 2:51 pm    Post subject: Reply with quote

Thank you very much.

It works just fine :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum