Some times dhcp do that if dhcp server is instructed to pass DNS address.
Some times dhcp do that if dhcp server is instructed to pass DNS address.
Pietro Pesci Feltri
PowerBook 15" G4 and
MacBook Pro 17" Intel Core 2 Duo
Intel I5 Desktop
Only write a file:
But check you interface:
Now check "Iface" if is "eth0" then write.Code:su -c '/sbin/route -n'
Write:Code:su -c 'nano /etc/dhclient-eth0.conf'
When "xxx.xxx.xxx.xxx" is your DNS of your IPS.Code:prepend domain-name-servers xxx.xx.xx.xxx;
Save and restart "NetworkManager"
Ready!Code:su -c '/sbin/service NetworkManager restart'![]()
This behavior is fixable.
If you are using the F10 version, u can right click the NM applet icon and choose "edit connections". From there, find your connection, and click the edit button. Go the the IPv4 tab and from the drop down called method, choose "Automatic (DHCP) Addresses Only". Now you can enter your custom DNS information and NM will no longer overwrite resolv.conf.
SOLUTION:
[root@localhost ~]# chkconfig | grep -i manager
[root@localhost ~]# chkconfig NetworkManager off
Reboot your host & check /etc/resolv.conf again
That's it
6 years down the road, NetworkManager-0.9.9.0-41.git20131003.fc20, the answer appears to be to add "dns=none" to the [main] section of /etc/NetworkManager/NetworkManager.conf.
Interesting that 8 years down the road, the same issue happens. In Fedora 24 at least, if one removes NetworkManager, /etc/resolv.conf becomes a broken symlink to a file in a NetworkManager subdirectory--I've already forgotten which, something like /var/lib/NetworkManager? One has to remove the file, recreate it, and put their DNS servers in there. I think you can also add it to your interface's file in /etc/sysconfig/network-scripts, but I usually don't.
You shouldn't have to manually edit it if your dhcp service is properly configured - for either Netw..M... or 'network' services.
No, you shouldn't. But, what happened at least twice was that after removing NetworkManager, when running dhclient on an interface, I was unable to reach sites by name. I looked at /etc/resolv.conf to find that it was a broken link to a NetworkManager file as mentioned, and had to manually edit it. (This is in Fedora 24, I don't believe I had it happen in F23, and I treat it the same way--F24 is beta at the moment, I believe.)
This was on a minimal install, NetworkManager removed, (not replaced with network, as I usually boot, then choose if I'll be wired or wireless), rebooting, running dhclient on the wired interface.
Ok, just checked with a fresh F24 install from server netinstall from 4/27.
Upon reboot, /etc/resolv.conf is a symlink to /var/run/NetworkManager/resolv.conf
So, removing NetworkManager (and not setting up anything else), breaks that link and it has to be removed and manually added.
Now, if I just disable, rather than remove NetworkManager, and enable network, it seems to do the same thing at this point,
resolve.conf becomes a broken link and it can't do name resolution. So, useful to know, though I don't know if this is simply a beta bug or the way they plan to go.