Bugzilla – Bug 169858
Network configuration ignores DNS info when using DHCP and Network Manager
Last modified: 2006-05-05 08:53:48 UTC
I use Network Manager and DHCP for IP address. I specify the nameservers and hostname to use in Yast. After configuration is complete (selecting OK in the Hostname and Name Server Configuration window), the resolve.conf file correctly shows the specified nameservers (see attachment resolve.conf.1st). However, once the network configuration is written and the network service restarted, the resolve.conf file has overwritten the correct results with incorrect results obtained from the DHCP server (see attachment resolve.conf.2nd).
Created attachment 80350 [details] Correct DNS configuration obtained prior to writing configuration in Yast
Created attachment 80351 [details] Incorrect resolve.conf configuration after writing system configuration in Yast
Created attachment 80352 [details] /var/log/YaST2 archive
it sounds like MODIFY_RESOLV_CONF_DYNAMICALLY is not set to "no" in /etc/sysconfig/network/config , not sure how to do this in yast.
Nod. Reporter, can you edit /etc/sysconfig/network/config and set MODIFY_RESOLV_CONF_DYNAMICALLY to "no", restart NM (or just reboot), and confirm if that makes the behavior work as you expect?
Yes, that corrects the behavior...
Alright. The intended behavior is the original behavior -- we allow it to be changed by this option, but its not the default.
No, I don't think this is right. Yast should change the variable in /etc/sysconfig/network/config, not the user. This bug is because Yast has an option where the DNS configuration is specified, but then the variable in /etc/sysconfig/network/config is not properly changed, so the Yast setting does not good.
Martin, your call.
Oh joy, we have TWO variables that control the behavior. /etc/sysconfig/network/config:MODIFY_RESOLV_CONF_DYNAMICALLY and /etc/sysconfig/network/dhcp:DHCLIENT_MODIFY_RESOLV_CONF. NM uses the former (bug 147703), YaST uses the latter. I am not if we can fix the mess properly now. But a quick fix would be to have both programs agree on one variable. Since NM uses it read-only, I suggest changing NM to use /etc/sysconfig/network/dhcp:DHCLIENT_MODIFY_RESOLV_CONF. Robert, what do you think? Christian, please mention the other variable in network/config too please.
Martin: I have no problem making the change. Christian, is this change correct in your eyes? What is the other variable?
Created attachment 81810 [details] /etc/resolv.conf and Connection Information
Another annoyance here is wrong Connection Information from NM when you set MODIFY_RESOLV_CONF_DYNAMICALLY to "no". Look at the attached screenshot. Real primary DNS is not shown, secondary DNS is displayed as primary, third DNS is displayed as second, etc.
MODIFY_RESOLV_CONF_DYNAMICALLY is used by modify_resolvconf. It is not restricted to the dhcp case, but also for modem, isdn and whatever else calls modify_resolvconf. This is the global switch. DHCLIENT_MODIFY_RESOLV_CONF is an extra variable for dhcp. Since NM uses dhcp it should better use this variable.
Alright. Committed to CVS and submitted to autobuild. We now use DHCLIENT_MODIFY_RESOLV_CONF. Martin: Bug should be resolved. Feel free to close.
*** Bug 171124 has been marked as a duplicate of this bug. ***
Closing per comment 15. Robert Vojta, please do not mix separate problems into one report. Open another bug for rml for comment 13.