LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to configure RHEL4 to obtain DNS server automattically (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-configure-rhel4-to-obtain-dns-server-automattically-745253/)

gaur.ankit2007@gmail.com 08-05-2009 06:03 AM

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.

jhcaiced 08-05-2009 07:14 AM

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.


All times are GMT -5. The time now is 09:36 AM.