LinuxQuestions.org
Register a domain and help support LQ
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 01-12-2011, 05:21 PM   #1
malickhat
Member
 
Registered: Jun 2009
Posts: 106

Rep: Reputation: 15
Reslove.conf changes automatically


i've a static ip configuration in my eth0 ,and i've added my nameserver in resolve.conf,but every time after the service network restart my resolve.conf changes to default and at the reboot time i'm not getting my ip assigned automatically
Code:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=xx.xx.xx.x
NETMASK=xx.xx.xx.x
GATEWAY=xx.xx.xx.x
TYPE=Ethernet
after the restart my eth0 changes to
Code:
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=none
IPADDR=xx.xx.xx.x
NETMASK=xx.xx.xx.x
GATEWAY=xx.xx.xx.x
TYPE=Ethernet
PREDNS=yes
i'm using fc9 and my machine is a VPN connected so the ip has to assign automatically of every boot
 
Old 01-12-2011, 06:41 PM   #2
Snark1994
Senior Member
 
Registered: Sep 2010
Location: Wales, UK
Distribution: Arch
Posts: 1,632
Blog Entries: 3

Rep: Reputation: 345Reputation: 345Reputation: 345Reputation: 345
What exactly do you mean by "the ip has to assign automatically"? 'cos that's something I would normally associate with DHCP (getting the IP from your DHCP server). Do you mean it has to connect to the network automatically?
 
Old 01-12-2011, 07:01 PM   #3
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
If you don't want dhcpcd to overwrite your /etc/resolv.conf, you'll have to configure /etc/dhcpcd.conf with "nohook resolv.conf". This will prevent dhcpcd from overwriting the nameserver.

Markus
 
Old 01-12-2011, 08:52 PM   #4
malickhat
Member
 
Registered: Jun 2009
Posts: 106

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Snark1994 View Post
What exactly do you mean by "the ip has to assign automatically"? 'cos that's something I would normally associate with DHCP (getting the IP from your DHCP server). Do you mean it has to connect to the network automatically?
i meant if i assaign my ip as static in eth0 every time i'll get the same ip after my reboot but that's not hapenning
 
Old 01-12-2011, 08:53 PM   #5
malickhat
Member
 
Registered: Jun 2009
Posts: 106

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by markush View Post
If you don't want dhcpcd to overwrite your /etc/resolv.conf, you'll have to configure /etc/dhcpcd.conf with "nohook resolv.conf". This will prevent dhcpcd from overwriting the nameserver.

Markus
I'm not using dhcpd here so this file doesn't exist in my machine
 
Old 01-12-2011, 09:05 PM   #6
Azmeen
Senior Member
 
Registered: May 2003
Location: Malaysia
Distribution: Slackware, LFS, CentOS
Posts: 1,307

Rep: Reputation: 46
Perhaps you could try adjusting your IP address using the netconfig command. From my experience this method makes IP setting changes stick all the time.
 
Old 01-13-2011, 12:49 PM   #7
malickhat
Member
 
Registered: Jun 2009
Posts: 106

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Azmeen View Post
Perhaps you could try adjusting your IP address using the netconfig command. From my experience this method makes IP setting changes stick all the time.
I'm not able to find the netconfig command in my fc9
 
Old 01-13-2011, 01:50 PM   #8
markush
Senior Member
 
Registered: Apr 2007
Location: Germany
Distribution: Slackware
Posts: 3,979

Rep: Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850Reputation: 850
mh, if you mean you're running Fedora 9, it seems to be an outdated system. As far as I know the recent version is 14.

Maybe it's easier to solve your problem with a more recent version. As you know, most people here are running current systems and it would be easier to help you if you also had an up-to-date system.

Markus
 
Old 01-13-2011, 03:11 PM   #9
zer0signal
Member
 
Registered: Oct 2010
Location: Cleveland
Distribution: Slackware, Fedora, RHEL (4,5), LFS 6.7, CentOS
Posts: 258

Rep: Reputation: 29
try

system-config-network

works the same as netconfig
 
  


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
resolv.conf changes automatically in Ubuntu ahmed_as8 Linux - Newbie 3 05-08-2009 08:00 AM
/etc/reslove.conf farooqhussain Linux - Networking 2 09-16-2008 09:34 AM
/etc/resolv.conf getting automatically written over....HELP PLEASE! cbradlea Linux - Newbie 7 10-09-2007 09:02 PM
resolv.conf is not updated automatically metalyric Linux - Networking 9 06-04-2004 06:51 AM
grub.conf doesn't load automatically Bear Linux - General 3 12-16-2002 06:48 AM


All times are GMT -5. The time now is 04:39 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