LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 09-06-2006, 08:27 AM   #1
zeeple
Member
 
Registered: Sep 2006
Distribution: Fedora 8, RHEL 5
Posts: 62

Rep: Reputation: 15
netconfig doesn't change nameserver??


Hello all I am running into the most curious of problems on the boxes I build. One of the last things I do is to run netconfig to set the tcp/ip props according to the customers wishes. This works fine for all items _except_ the nameserver! The really odd thing is this: if I run netconfig a second time then the nameserver change will stick. Very irritating to say the least. Any ideas on why this might be occuring?
 
Old 09-07-2006, 02:36 AM   #2
zamri
Member
 
Registered: May 2004
Location: Malaysia
Distribution: Mandrake,Slackware,RedHat
Posts: 157

Rep: Reputation: 30
What distro r u running? Slackware? I have no problem with netconfig. I have even tried it through ssh. All ok. Were u setting up the machine to use dhcp?
 
Old 09-07-2006, 07:34 AM   #3
zeeple
Member
 
Registered: Sep 2006
Distribution: Fedora 8, RHEL 5
Posts: 62

Original Poster
Rep: Reputation: 15
The distro is Fedora Core 4. Usually I am setting up the unit to use static, and I am moving away from DHCP.
 
Old 09-07-2006, 11:45 AM   #4
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
i have netconfig on slackware
for fedora core 4 go to root konsol

# setup > network configuration > ethernet > configure

edit /etc/resolv.conf by hand add your isp nameserver or any as u wish

for my isp i use this

[root@nc rou]# cat /etc/resolv.conf
nameserver 202.188.0.132
 
Old 09-07-2006, 12:14 PM   #5
zeeple
Member
 
Registered: Sep 2006
Distribution: Fedora 8, RHEL 5
Posts: 62

Original Poster
Rep: Reputation: 15
Thanks routers, I will try editing the resolv.conf file directly, but my understanding is that the netconfig utility is supposed to be able to do all that for you. And it DOES do it for you the second time around. Why doesn't it work the first time? Does it have something to do with the fact that the previous nameserver ip was gotten via dhcp, and is thus more resistant to change somehow?
 
Old 09-07-2006, 01:50 PM   #6
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
from my experience its not change the resolv.conf if you first starting using
dhcp , this one i not sure why, but since i can edit resolv.conf directly
so i have no big deal for this issue
 
Old 09-08-2006, 09:53 AM   #7
zeeple
Member
 
Registered: Sep 2006
Distribution: Fedora 8, RHEL 5
Posts: 62

Original Poster
Rep: Reputation: 15
today I ran another test where I built a linux box to use dhcp:

$ more /etc/resolv.conf
search domainname.com
nameserver 192.168.1.1

I run netconfig, changing all settings to static:

10.0.0.10
255.0.0.0
10.255.255.254
10.0.01 (namesever)

I immediately run:

$ more /etc/resolv.conf
nameserver 10.0.0.1

which shows that netconfig did indeed change the nameserver there as it is supposed to. I then rebooted, and did another more /etc/resolv.conf, and guess what? This is what I get:

$ more /etc/resolv.conf
search domainname.com
nameserver 192.168.1.1

Why is the nameserver reverting back to it's previous dhcp settings after a reboot?
 
Old 09-09-2006, 01:57 AM   #8
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
so use whichever work for you

/etc/resolv.conf sould contain your isp name nameserver

if u getting whatever router/gateway ip just comment it
 
Old 09-09-2006, 08:07 AM   #9
zeeple
Member
 
Registered: Sep 2006
Distribution: Fedora 8, RHEL 5
Posts: 62

Original Poster
Rep: Reputation: 15
That is not a solution. I am trying to discover why the nameserver is reverting back to it's DHCP settings after a reboot.
 
Old 09-09-2006, 11:42 AM   #10
routers
Member
 
Registered: Aug 2005
Location: Malaysia - KULMY / CNXTH
Distribution: Slackware, Fedora, FreeBSD, Sun O/S 5.10, CentOS
Posts: 787
Blog Entries: 6

Rep: Reputation: 75
looks like you have two (2) devices in your network (LAN) which is distribute dhcp
maybe one router and one AP which is connected to the same network
you need to check it
 
Old 09-09-2006, 11:48 AM   #11
zeeple
Member
 
Registered: Sep 2006
Distribution: Fedora 8, RHEL 5
Posts: 62

Original Poster
Rep: Reputation: 15
Thanks for the suggestion, but as it happens I only have one device handing out IP addresses via DHCP. But even if I had one hundred devices running DHCP, if I tell an interface not to use DHCP, but rather to use static info, then it should not matter how many DHCP services I have running on my network, right?

In this instance, the linux box is built from scratch with DHCP configured eth0, then once I am done with the system and need to assign static info, I use netconfig to do so, in effect telling the interface I am configuring not to use DHCP assigned info anymore. Then on reboot only the nameserver reverts to it's previous DHCP setting, not the rest.

I think this has to be a bug in netconfig, or maybe a bug in fedora core 4.
 
Old 09-09-2006, 11:50 AM   #12
zeeple
Member
 
Registered: Sep 2006
Distribution: Fedora 8, RHEL 5
Posts: 62

Original Poster
Rep: Reputation: 15
Who are the maintainers of netconfig? I am running netconfig-0.8.22-1 and according to yum there is not update for it at all. So it would seem this is the latest version. Perhaps the maintainers of that package would have some insight.
 
  


Reply



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
which is my nameserver. bruse Linux - Networking 3 07-16-2005 01:45 AM
change nameserver in suse8.2 AgedNoob Linux - Networking 1 03-14-2004 12:41 PM
change nameserver domain on ssh ? maxboost Linux - Networking 1 10-07-2003 11:57 PM
How to Setup a Nameserver dcdjservices Linux - Networking 1 08-01-2003 04:42 PM
How do I setup a nameserver? dcdjservices Linux - Newbie 1 08-01-2003 04:39 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:04 AM.

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
Open Source Consulting | Domain Registration