Discussion:
[clug] How can I make changes in resolv.conf permanent in RHEL6.3
rusking
2014-09-27 18:29:02 UTC
Permalink
Hi,everyone. When I added DOMAIN entry to /etc/resolv.conf, after a reboot or
restart the network, the changes might revert to the original settings,and
the entry of "domain iamtest.com" is missing.
========resolv.conf==========
# Generated by NetworkManager
domain iamtest.com //this entry lost after I reboot the machine or restart
the network.
search iamtest.com
nameserver 192.168.1.110
==========================
Here is the file of /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
PEERDNS=no //even I changed No to Yes,It's not work.
BOOTPROTO=static
ONBOOT=yes
TYPE=Ethernet
DEFROUTE=yes
IPADDR=192.168.1.120
GATEWAY=192.168.1.100
DOMAIN="iamtest.com" //I removed this entry or changed to
"DOMAIN=iamtest.com",It's not ok.
DNS1=192.168.1.200
==========================
The service of dhcpd is stopped.
Is there a way to make changes permanently.
Any help is much appreciated.



--
View this message in context: http://samba.2283325.n4.nabble.com/How-can-I-make-changes-in-resolv-conf-permanent-in-RHEL6-3-tp4673298.html
Sent from the Samba - linux mailing list archive at Nabble.com.
Brett Worth
2014-09-28 04:11:22 UTC
Permalink
Post by rusking
Hi,everyone. When I added DOMAIN entry to /etc/resolv.conf, after a reboot or
restart the network, the changes might revert to the original settings,and
the entry of "domain iamtest.com" is missing.
I have seen this in that past. I think the key is a /etc/resolv.conf.SOMETHING file.
Perhaps it's "local". You need to make sure that NetworkManager is not running and that
the /etc/resolv.conf.local (?) file is removed.

Brett
--
/) _ _ _/_/ / / / _ _//
/_)/</= / / (_(_/()/< ///
rusking
2014-09-28 13:13:53 UTC
Permalink
Hi, Brett ?thanks very much. the /etc/resolv.conf.local is not exist. but I
stopped the NetworkManager, and it's OK now.



--
View this message in context: http://samba.2283325.n4.nabble.com/How-can-I-make-changes-in-resolv-conf-permanent-in-RHEL6-3-tp4673298p4673307.html
Sent from the Samba - linux mailing list archive at Nabble.com.
George
2014-10-04 16:48:26 UTC
Permalink
Rusking,

Are you using Static IP configuration ?? Do you switch between WiFi
and Wired networks ?

Not knowing your environment, and not knowing everything about
networking I did not offer any suggested solutions.

For my laptops I use NetworkManager as it provides automatic network
configuration using DHCP.? That is DHCP handles the different network
IP ranges, while NetworkManager nicely handles switching between WiFi
or Wired connections.

For any of the Linux Servers that I run (or Desktops that will not be
moving networks) I usually set static IP and static DNS, hostnames,
DNS servers, and then stop and uninstall NetworkManager completely as
I have never managed to successfully configure NetworkManager for
Static IP and not have it do odd things with the network
configuration.

George.

At Sunday, 28-09-2014 on 23:13 rusking wrote:


Hi, Brett ?thanks very much. the /etc/resolv.conf.local is not
exist. but??I
stopped the NetworkManager, and it's OK now.



--
View this message in context:
http://samba.2283325.n4.nabble.com/How-can-I-make-changes-in-resolv-conf-permanent-in-RHEL6-3-tp4673298p4673307.html
Sent from the Samba - linux mailing list archive at Nabble.com.
--
linux mailing list
linux at lists.samba.org
https://lists.samba.org/mailman/listinfo/linux
rusking
2014-10-04 18:15:34 UTC
Permalink
Hi,George.thanks for your reply. My machine is a PC-server with RHEL6.3, so
I am using static IP,DNS configuration. I am not very clear about the
problem, when I stopped the NetworkManager, everything is fine.



--
View this message in context: http://samba.2283325.n4.nabble.com/How-can-I-make-changes-in-resolv-conf-permanent-in-RHEL6-3-tp4673298p4673738.html
Sent from the Samba - linux mailing list archive at Nabble.com.

Loading...