Results 1 to 6 of 6
I hav got RHEL 5 installed on my system. i have two nic cards in my system. one of the ethernet card is connected to internet provider and another nic ...
- 05-29-2011 #1Just Joined!
- Join Date
- May 2011
- Posts
- 12
DNS changes on Reboot
I hav got RHEL 5 installed on my system. i have two nic cards in my system. one of the ethernet card is connected to internet provider and another nic to another system in lan. I have configured one of the nics to get ip automatically from internet service provider and another nic has got static address. on reboot the static dns and dns search path assigned on second ethernet is also changing, may be coz i hav configured dynamic ip on another nic. in this situation am able to get internet but am not able to communicate with other system in lan. can we not have two different setting as we can hav in windows. plz help.
- 05-29-2011 #2Just Joined!
- Join Date
- May 2011
- Location
- Southern California, US
- Posts
- 24
Please post the contents of the file /etc/resolv.conf and the results of the command route. Thanks
Tom
- 05-31-2011 #3
Since you are using DHCP to get an ip address form your provider your resolv.conf will always be over-written. There is no stopping this.
However there is a way to get around this.
1. Create a resolv.conf.wrk file with the correct settings that you want.
2. Create a script that copies resolv.conf.wrk to resolv.conf
3. Have this script run after your internet scripts run to over-write what you are receiving from the ISP's DHCP server
Problem solved.
- 05-31-2011 #4Just Joined!
- Join Date
- May 2011
- Location
- Southern California, US
- Posts
- 24
Try this link: How To: Make Sure /etc/resolv.conf Never Get Updated By DHCP Client
Option #3 is the coolest way to do it. Just include the DNS server(s) from your ISP, then your local DNS server.
- 06-01-2011 #5Just Joined!
- Join Date
- May 2011
- Posts
- 12
thanks guys. i shall try n get back
- 06-01-2011 #6Linux Guru
- Join Date
- May 2011
- Posts
- 1,843
as Peter suggests in tboland's link, the best way to do this to add:
PEERDNS=no
to the appropriate ifcfg-ethN file. that's what i do anyway, and it works for me.


Reply With Quote