PDA

View Full Version : DNS lost after every reboot


ludfic
2nd March 2009, 08:29 PM
Hi

I have entered my primary and secondary DNS addresses through Network Configuration tool (system-config-network). But whenever I reboot the system it loses the DNS addresses. Following another thread, I tried changing the PEERDNS=no in ifcfg-wlan0; but it didn't work. I also put both DNS addresses in the ifcfg file, but that didn't work either.

Does anyone know a solution to this?

$ uname -a
Linux fedoralinux 2.6.27.15-170.2.24.fc10.i686 #1 SMP Wed Feb 11 23:58:12 EST 2009 i686 i686 i386 GNU/Linux

Thanks.

stefan1975
2nd March 2009, 08:35 PM
is networkmanager running? Networkmanager overrules all statically configured settings through config files or system-config-network. By default in KDE and Gnome the GTK networkmanager app is used to autmagically configure networking, which works fine most of the time except when you want something not default. I ended up configuring DNS servers in my DHCP server and switch to a DHCP reservation with my fedora pc's on DHCP.

Stefan

ludfic
3rd March 2009, 07:05 PM

How can I find out if Network Manager is running? Also, is using a DHCP server the only way around it?

stefan1975
3rd March 2009, 09:14 PM
[stefan@enterprise ~]$ ps -ef|grep -i netw
root 1965 1 0 Feb21 ? 00:00:00 NetworkManager --pid-file=/var/run/NetworkManager/NetworkManager.pid
root 1981 1 0 Feb21 ? 00:00:00 /usr/sbin/nm-system-settings --config /etc/NetworkManager/nm-system-settings.conf


if it is, you could disable it and set up networking with system-config-network statically.

s.

marcrblevins
4th March 2009, 03:01 AM
Should try it with:

su -
chkconfig --list | grep [Nn]etwork

That would tell you which network thingy you are using.

ludfic
4th March 2009, 05:29 PM
Thanks, Stefan1975.

I disabled Network Manager through system-config-services and set up my wireless connection manually through system-config-network. Now the DNS IPs are retained, but the problem is that I have to manually start my connection through system-config-network after every bootup. I have checked the options of starting the device when computer starts and also allowed all users to enable/disable device in system-config-network. The network is setup as DHCP.

Do you know why this might be happening?
Thanks

stefan1975
4th March 2009, 06:08 PM
chkconfig NetworkManager off
chkconfig network on

ludfic
4th March 2009, 07:30 PM
I did that and I am losing the DNS IPs again in system-config-network. After every reboot or network restart, the primary DNS gets set to 0.0.0.0

ludfic
4th March 2009, 07:52 PM
After a couple of reboots and manually entering DNS, it seems to be working at the moment!

marcrblevins
4th March 2009, 10:03 PM
While you were in the system-config-network dialog. When you activated your network device.

Did you select File and then Save it?

stefan1975
4th March 2009, 10:12 PM
you could check/edit this the old-school way by opening /etc/sysconfig/network-scripts/ifcfg-eth{X}

ludfic
6th March 2009, 10:20 AM
Yes, I always do File -> Save after making a change in system-config-network.

It has been working since my last post, so I'll leave it to that.

Thanks ever so much for you help.