LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
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 08-05-2009, 07:03 AM   #1
gaur.ankit2007@gmail.com
Member
 
Registered: Dec 2008
Posts: 34

Rep: Reputation: 16
How to configure RHEL4 to obtain DNS server automattically


Hi

My problem is that i have a broadband connection and it supports DHCP. For this i need to update the resolv.conf file with the DNS server names.
Earlier i used to do it manually. Can we do something so that the resolv.conf file gets updated itself and we do not have to go there and update evrytime.

i saw the following some where :-

we update /etc/sysconfig/network-scripts/ifcfg-eth0 with :-

PEERDNS=<answer>, where <answer> is one of the following:
yes — Modify /etc/resolv.conf with information from the server. If using DHCP, then yes is the default.
no — Do not modify /etc/resolv.conf.

Please explain the above to me. also tell me does it work ? Is there a way to do it via a GUI.
 
Old 08-05-2009, 08:14 AM   #2
jhcaiced
Member
 
Registered: Mar 2009
Distribution: CentOS - Ubuntu - Debian
Posts: 83

Rep: Reputation: 27
Hi,

Then answer is simple, you should use the PEERDNS=yes parameter in
you ifcfg.ethXXX file that way when you get the IP of your machine
via DHCP the /etc/resolv.conf file should be updated.

In order to check if your resolv.conf file is updated correctly, the
first line in that file should be:
; generated by /sbin/dhclient-script

Also check that BOOTPROOT=dhcp is set in your network configuration
file.

Best regards.
 
  


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
How to configure DNS Server & DNS Client in RHEL4 chanakkya Linux - Networking 1 07-05-2009 02:41 PM
How to configure IPv6 DNS server in RHEL4 update 4 ? sunnyanthony Linux - Server 3 06-05-2008 05:13 AM
how to configure another dns server to combine use with primary current dns server. hocheetiong Linux - Newbie 1 05-29-2008 07:57 PM
how to configure dns in rhel4 Deepak Gusain Linux - Enterprise 4 01-11-2008 07:38 AM
obtain dns server address automatically mspier Linux - Networking 10 01-11-2004 01:33 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:11 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration