GNOME Bugzilla – Bug 579378
Wireless network configured with no DNS/routes clears resolv.conf
Last modified: 2012-07-24 16:34:16 UTC
The situation is this: I have a laptop with a modem plugged in. The laptop has an established route and resolv.conf entries from pppd. I configure a wireless link to an AP with IPV4 settings set to "Automatic (DHCP) addresses only" and leave the routing and DNS entries blank, since pppd already sorts those out for me. NetworkManager then clears resolv.conf although, iirc, my routes remained intact. Sorry if this isn't logged against the correct component -- I'm not too sure what to log it against. Steps to reproduce: 1) start with no networking (wireless disabled) 2) bring up ppp connection with usepeerdns and defaultroute enabled 3) surf teh intarwebs 4) connect to wireless network via nm-applet, having configured the AP that it picked up to use "Automatic (DHCP) addresses only" in IPV4 settings 5) can't surf teh intarwebs -- no hostnames will be resolved (since resolv.conf is cleared by NetworkManager)
Since you primary internet connection in this case (PPP) isn't being managed by NetworkManager, of course it's not going to write the correct nameservers to /etc/resolv.conf. Is there some reason you can't let NM manage your modem? Since you chose "Automatic (DHCP) addresses only", there's no DNS information from connections managed by NM to write out to /etc/resolv.conf, and you're left with nothing. NetworkManager only has as much information as you give it, and since it's not managing the PPP connection, it doesn't have any of that information. Is this a 3G modem? or a 56k old-school modem?
The only reason that the ppp link isn't configured in NM is that I can't seem to see a way that I can actually configure a ppp link in NM, especially considering that I need to (a) set the tty device (in this case, a usbserial device, but the approach would be the same for a serial modem (ala 'old-school' modem). Many 3G modems are usb, so the setup would be identical from the modem's POV. Since my provider is also quite broken (having a non-standard chat session, which can be overcome by simply not expecting any response before starting the dial, ie, remove the first expected OK from the chatscript), I not only need a way to specify the usb modem device (which I can't see in NM, unless I'm missing something way obvious), I also need to be able to tweak the chat script as I used to in gnome-ppp aeons ago. It would be well neat if NM could pick up other recognisable inet devices, especially if the option to configure ppp dialout in full is not to be provided via NM It would also be neat to be able to specify that a network adapter configured for DHCP (address only) does as the label suggests, only setting up the address via dhcp. If NM can ignore the route/dns info from the dhcp server, surely it can also just leave the system settings alone? A logical (from my POV) solution would be that if the user doesn't specify dns/route information, then don't set the system dns/route information -- perhaps the user left those blank for a reason, and, if she didn't, then it's quite likely that an incomplete network setup should ensue, ie the user should expect problems if she was to fill in that information but didn't. The real annoyance is that "since there's no DNS information from connections managed by NM to write out to /etc/resolv.conf", NM just decides to nuke whatever is in there. In the absence of information, filling in absent information isn't all that useful. Again, just my opinion -- perhaps there's a GNOME usability tip about this.
This is a very old bug report that includes several different feature requests that are worth considering. If still interested, please file new ehnancement requests for an individual feature.