PDA

View Full Version : Can't change DNS servers


pkands
10th April 2011, 04:55 PM
Using Network Manager I've selected wireless Addresses only DHCP and entered the desired DNS servers
but it doesn't' take effet. resolv.conf shows the correct servers and the NM dialog shows the correct servers but it just doesn't change what is actually being used.

This process works fine with F14.

hen770
10th April 2011, 05:36 PM
Probably you get dns adresses with the dhcp, so you should find the.config file to tell the system to use the manually configuried dns and not the dhcp ones.

Thanks.
Hanan.

pkands
10th April 2011, 06:01 PM
Which config file would that be?

foottuns
10th April 2011, 06:21 PM
use the setup option, and also did you check the /etc/resolv.conf file?

pkands
10th April 2011, 06:36 PM
If you mean the network manager UI, I used that. If I open it now, it shows the desired DNS servers are configured but they are not what is actually being used. Resolv.conf also shows the desired servers BUT they are not what is being used. What is being used are the DHCP configured servers and my attempts to change this don't work.

foottuns
10th April 2011, 06:38 PM
I meant the setup command from terminal... try that... and go to network option...

pkands
10th April 2011, 07:05 PM
Setup shows the correct servers.
Everything except the "network settings" connection information shows the desired servers.

I don't know how to confirm what DNS server is actually being used by the system.

jvillain
11th April 2011, 11:57 PM
If you mean the network manager UI, I used that. If I open it now, it shows the desired DNS servers are configured but they are not what is actually being used. Resolv.conf also shows the desired servers BUT they are not what is being used. What is being used are the DHCP configured servers and my attempts to change this don't work.

I am curious as to how you know the wrong server is being accessed? I assume you are getting an incorrect record back. Is it possible that it is some thing in your hosts file that gets accessed before the DNS resolution?

Have you used dig to confirm the information is correct on the server you are using? eg
dig www.mcdonalds.com @mydns1.com

The way it works is the system accesses /etc/nsswitch.conf first to see what order it should access the info in. For example files and then dns are the default in nsswitch. Then the libraries will look in your /etc/resolv.conf to see which dns servers to look at. If the information in /etc/resolv.conf is correct then those are the servers you should be accessing.

The usual problem is populating your resolv.conf. If your nic is set to manually configure then it should pull the information from the /etc/sysconfig/network-scripts/ifcfg-* file. But if you then bring up an interface that is DHC then it will over write what is in the resolv.conf. Keep in mind that you are only supposed to have 2 dns servers listed in the resolv.conf. If you have more it may ignore them.

Wanxian Travel Photos - Limpio Photos - Keelung Travel Photos