LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-12-2003, 11:29 AM   #1
ShakyJake
Member
 
Registered: Apr 2003
Location: USA
Distribution: Gentoo
Posts: 55

Rep: Reputation: 15
Remembering DNS settings


I am a total Linux newbie, however I use to be real good with a DOS prompt.

Anyhoo, how does one make Linux keep network settings? For example, I will run NETCONF and enter the DNS address that I need to access DSL. However, upon reboot the DNS address is gone and reset back to whatever was there before.

Thanks!!

Oh, by the way, I'm using Mandrake 9.1 if that makes a difference.

Last edited by ShakyJake; 04-12-2003 at 02:54 PM.
 
Old 04-12-2003, 12:16 PM   #2
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
You might have it setup to use DHCP which will automatically remove all entries in /etc/resolv.conf upon reboot. If your ISP's DHCP server isn't sending the DNS info at the same time of IP resolution, you can probably either try:

1. Putting something like:
echo "nameserver 1.2.3.4" >> /etc/resolv.conf
echo "nameserver 5.6.7.8" >> /etc/resolv.conf

And so on, replacing 1.2.3.4 with the IP of the DNS server.

You can place that in /etc/rc.local and then upon startup I think it will place those entries in the appropriate file (/etc/resolv.conf).

There is probably an easier way, this is just 1 idea.

Also, tell us how you get an IP (dynamic host configuration protocol - DHCP or PPP or what).

Cool
 
Old 04-12-2003, 02:58 PM   #3
ShakyJake
Member
 
Registered: Apr 2003
Location: USA
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
Yes, it's DHCP. For the Windows machines in the office I have to plug in the DNS address in order to gain internet access.

I tried what you suggested, although I suspect I may be doing something wrong. The output of the "echo" generated NAMESERVER <address>. I placed that in the rc.local file, but the system still doesn't keep the DNS address. It looks like it defaults to some values that Mandrake put in some configuration file.

Any other ideas? Isn't there a network config file around somewhere that can be edited to accept this DNS address as the default?

Thanks.
 
Old 04-13-2003, 01:39 AM   #4
MasterC
LQ Guru
 
Registered: Mar 2002
Location: Salt Lake City, UT - USA
Distribution: Gentoo ; LFS ; Kubuntu
Posts: 12,612

Rep: Reputation: 64
I'm not quite sure if I was clear.

Open up (in a text editor) your /etc/rc.local file and add the following (replacing 1.2.3.4 with actual IP and such):
echo "nameserver 1.2.3.4" >> /etc/resolv.conf
echo "nameserver 5.6.7.8" >> /etc/resolv.conf

Save and exit. Now, during bootup it should echo those 'nameserver 1.2.3.4' entries into the /etc/resolv.conf file making the DNS servers already there (no need to run netconf each time).

Other ideas might include checking out the network configurator in the Mandrake Control Center, however I think that if you have to plug these values in manually (regardless of OS) then the echo is going to be along the lines of "your best shot" for now. If I am mistaken, and in win you just boot up using DHCP and the values for DNS are already there, then please let me know.

Cool
 
Old 04-13-2003, 11:07 AM   #5
ShakyJake
Member
 
Registered: Apr 2003
Location: USA
Distribution: Gentoo
Posts: 55

Original Poster
Rep: Reputation: 15
Thanks for the reply, but still doesn't work. I placed the echo statement in the rc.local file, but Linux is still overwriting resolv.conf with it's own settings. I've even tried setting resolv.conf as read-only and it STILL gets blown away.

It appears that Linux is obtaining these DNS addresses from the DHCP but the thing is, the addresses obtained are WRONG. I need to manually enter the correct address and have it stick and not be changed next time I reboot.

I'm a bit confused because in Windows this is an extremely simple thing to do. I/we have got to be missing something.

Thanks for your time.
 
Old 04-13-2003, 10:48 PM   #6
sopiaz57
Member
 
Registered: Apr 2003
Distribution: RH 8
Posts: 246

Rep: Reputation: 30
sounds like a problem i would goto the ISP with. Shouldnt they be sending the correct DNS?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
K3b settings help, file previer and remembering last iso Whiskers Linux - Software 0 11-26-2004 05:32 PM
Remembering window settings in OpenBox LavaDevil94 Linux - Software 0 11-21-2004 12:33 PM
xfce sound mixer not remembering settings killerbob Slackware 5 10-30-2004 04:22 PM
Remembering Passwords 4hp Mandriva 5 09-03-2003 12:05 PM
Red Hat 9 having difficulty remembering its internet settings. flapjackboy Linux - Networking 6 08-11-2003 01:16 PM


All times are GMT -5. The time now is 12:40 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration