IPv4 DNS preferred over IPv6 ones

Bug #1002454 reported by Francesco Crippa
32
This bug affects 6 people
Affects Status Importance Assigned to Milestone
NetworkManager
Confirmed
Medium
network-manager (Ubuntu)
Confirmed
Medium
Unassigned

Bug Description

The Network Manager always prefers IPv4 DNS over IPv6 ones. The issue occurs both when DNSs are statically configured and when they're acquired via DHCPv4/DHCPv6.

Network Manager puts IPv4 DNSs before IPv6 ones in the /var/run/nm-dns-dnsmasq.conf so Dnsmasq resolves names using IPv4 DNSs before using IPv6 ones.

If I disable Dnsmasq, DNS servers are put in the wrong way in /etc/resolv.conf file.

The system shoud prefer IPv6 DNSs in any case.

ProblemType: Bug
DistroRelease: Ubuntu 12.04
Package: network-manager-gnome 0.9.4.1-0ubuntu2
ProcVersionSignature: Ubuntu 3.2.0-24.38-generic 3.2.16
Uname: Linux 3.2.0-24-generic x86_64
NonfreeKernelModules: nvidia
ApportVersion: 2.0.1-0ubuntu7
Architecture: amd64
CRDA: Error: command ['iw', 'reg', 'get'] failed with exit code 1: nl80211 not found.
Date: Mon May 21 21:05:59 2012
ExecutablePath: /usr/bin/nm-connection-editor
IfupdownConfig:
 auto lo
 iface lo inet loopback
InstallationMedia: Ubuntu 11.10 "Oneiric Ocelot" - Release amd64 (20111012)
IpRoute:
 default via 192.168.0.1 dev eth0 proto static
 169.254.0.0/16 dev eth0 scope link metric 1000
 192.168.0.0/24 dev eth0 proto kernel scope link src 192.168.0.217 metric 1
 192.168.36.0/24 dev vmnet1 proto kernel scope link src 192.168.36.1
 192.168.70.0/24 dev vmnet8 proto kernel scope link src 192.168.70.1
NetworkManager.state:
 [main]
 NetworkingEnabled=true
 WirelessEnabled=true
 WWANEnabled=true
 WimaxEnabled=true
PciNetwork:

RfKill:

SourcePackage: network-manager-applet
UpgradeStatus: Upgraded to precise on 2012-05-02 (18 days ago)
nmcli-con:
 NAME UUID TYPE TIMESTAMP TIMESTAMP-REAL AUTOCONNECT READONLY DBUS-PATH
 eth0-Static 0bcb2b9f-a2c0-46f9-a6b1-59f66e383264 802-3-ethernet 1337627018 lun 21 mag 2012 21:03:38 CEST yes no /org/freedesktop/NetworkManager/Settings/0
nmcli-dev:
 DEVICE TYPE STATE DBUS-PATH
 eth1 802-3-ethernet unavailable /org/freedesktop/NetworkManager/Devices/1
 eth0 802-3-ethernet connected /org/freedesktop/NetworkManager/Devices/0
nmcli-nm:
 RUNNING VERSION STATE NET-ENABLED WIFI-HARDWARE WIFI WWAN-HARDWARE WWAN
 running 0.9.4.0 connected enabled enabled enabled enabled disabled

Revision history for this message
Francesco Crippa (francesco87) wrote :
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in network-manager (Ubuntu):
status: New → Confirmed
Revision history for this message
Halvor Lyche Strandvoll (halvors) wrote :

I'm experiencing this too, this is a serious issue. Why have IPv6 when Ubuntu always prefer IPv4? :P

Revision history for this message
Halvor Lyche Strandvoll (halvors) wrote :

Is a fix on it's way?

Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

I can't reproduce this here; in all cases IPv6 DNS entries are preferred, and that's indeed something we fixed prior to release as far as I know.

If you're still running into this issue; please attach /run/nm-dns-dnsmasq.conf and make sure you include full logs for NetworkManager (see http://wiki.ubuntu.com/DebuggingNetworkManager).

Changed in network-manager (Ubuntu):
status: Confirmed → Incomplete
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for network-manager (Ubuntu) because there has been no activity for 60 days.]

Changed in network-manager (Ubuntu):
status: Incomplete → Expired
Revision history for this message
robled (robled) wrote :

I'm able to reproduce this on Ubuntu 12.04. tcpdump shows that the DNS queries are going out via IPv4.

Revision history for this message
robled (robled) wrote :
Revision history for this message
Kevin Otte (nivex) wrote :

NetworkManager is still handing the information to resolvconf in the wrong order.

root@daedalus:~# lsb_release -d
Description: Ubuntu 14.04.1 LTS

root@daedalus:~# cat /run/resolvconf/interface/NetworkManager
domain home.nivex.net
search nivex.lan. home.nivex.net home.nivex.net.
nameserver 172.31.3.4
nameserver 2001:470:8:64f::4
nameserver 2606:a000:aa20:2200::4

Changed in network-manager (Ubuntu):
status: Expired → Confirmed
Changed in network-manager:
importance: Unknown → Medium
status: Unknown → Confirmed
Revision history for this message
Kevin Otte (nivex) wrote :

I've submitted a patch to the upstream bug tracker to get this resolved, but there has been no further activity.

Revision history for this message
Solarus (solarus) wrote :

This bug is still present in Ubuntu 16.04.

Wireshark's captures show that IPv4 resolvers are preferred to IPv6 resolvers.
It also show the local machine sometimes directly contacting the root server's, that's weird.

Revision history for this message
Kevin Otte (nivex) wrote :

There was a response to the upstream bug indicating the method I used in my patch would be insufficient. I don't have the skill to whip it into shape to get it accepted, sadly. If someone who is a developer could look at the bug in the GNOME bugtracker and rework the patch a bit they will probably take it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.