No nameserver addresses in resolv.conf when connecting to Wi-Fi network with no gateway

Bug #271542 reported by Michael Flaig
16
This bug affects 2 people
Affects Status Importance Assigned to Milestone
network-manager (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Intrepid by Gert van Dijk

Bug Description

Binary package hint: network-manager

When connecting to LAN nameserver gets set correctly, when using WIFI no nameserver is set in resolv.conf
dhcp provides a dns server - nm-tool output:
- Device: wlan0 ----------------------------------------------------------------
  Type: 802.11 WiFi
  Driver: iwlagn
  State: connected
  Default: no
[... truncated ...]

  IPv4 Settings:
    Address: 10.30.50.110
    Prefix: 24 (255.255.255.0)
    Gateway: 0.0.0.0

    DNS: 10.30.49.10

But: No entry in resolv.conf (resolvconf package is installed)
# 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

ii network-manager 0.7~~svn20080908t183521+eni0-0ubuntu3 network management framework daemon
ii resolvconf 1.42ubuntu2 name server information handler

I know that not setting a default gateway in this setup does not make immediate sense, except that I use openvpn and in previous network-manager-openvpn version the nameserver of wifi got set correctly but the supplied one of the vpn server does not. So I chose to deliver the dns server via dhcp.
This output is without the vpn started, btw!

Revision history for this message
Gert van Dijk (gertvdijk) wrote : Re: [intrepid] nameserver is not set (using wifi)

Same problem here, with updated packages as of 2008-10-23. This seems the problem only for local networks. When connecting to my 802.1x university's network I get an external IP (130.x) and resolv.conf is updated fine. When connecting to local networks it will not and my resolv.conf is empty, despite NM shows clearly it's given the the addresses on dhcp!

syslog output when connecting to local network, shows three nameservers available.
Oct 23 16:24:31 gert-laptop NetworkManager: <info> nameserver '172.20.8.71'
Oct 23 16:24:31 gert-laptop NetworkManager: <info> nameserver '172.20.8.72'
Oct 23 16:24:31 gert-laptop NetworkManager: <info> nameserver '172.20.8.73'
Oct 23 16:24:31 gert-laptop NetworkManager: <info> domain name 'BalPol.Local'

resolv.conf file after connect shows only the line it's managed by Networkmanager. It does not matter if resolvconf is installed or not. If it is, the resolv.conf file will only show it's managed by resolvconf.

Additionally, when entering the nameservers manually in NM it won't appear in resolv.conf even then!

FYI: I have disabled avahi-daemon for (proper) use of the local network and it has worked well in Hardy.

Revision history for this message
Gert van Dijk (gertvdijk) wrote :

I think I might have found the issue here. As with Michael Flaig (the bug reporter) it's a local network without a gateway (it is set as 0.0.0.0 so it won't give you internet access obviously). When I set a fake gateway the resolv.conf file is updated!

Question arises: Is it by design that nameservers of IPv4 configs without a gateway will not be passed to resolvconf (or NM will not write it to the resolv.conf file)?

This is behaviour I didn't expect and is quite different than in Hardy and previous releases. I would assume that this bug or design brakes lots of network configurations.

Revision history for this message
Gert van Dijk (gertvdijk) wrote :

This is definately a bug. You can have DNS service in a network without a gateway.

Changed in network-manager:
status: New → Confirmed
Revision history for this message
Zeus (jason-engelsman) wrote :

I can confirm this is for sure an issue.

Resolv.conf keeps on being set back to the settings for namserver and searchdomain that my work LAN is using.

Obviously it is fixable but very irritating.

Thanks

Revision history for this message
Gert van Dijk (gertvdijk) wrote :

Good news. I'm not experiencing this bug anymore in Jaunty RC, so it seems to be fixed.

Revision history for this message
Alexander Sack (asac) wrote :

this issue happens when the resolvconf/dnsmasq state becomes out of sync somehow. Let me know if this is really fixed for anyone on jaunty.

Changed in network-manager (Ubuntu):
status: Confirmed → Triaged
Revision history for this message
Thomas Hood (jdthood) wrote :

Is this still a problem in Precise?

Revision history for this message
Thomas Hood (jdthood) wrote :

NM no longer writes directly to /etc/resolv.conf so that part of the report is no longer relevant.

summary: - [intrepid] nameserver is not set (using wifi)
+ No nameserver addresses in resolv.conf when connecting to Wi-Fi network
+ with no gateway
Thomas Hood (jdthood)
Changed in network-manager (Ubuntu):
status: Triaged → Fix Released
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.