You directly edit the /etc/hosts file, the /etc/resolv.conf file, or the /etc/sysconfig/network-scripts/ifcfg-* files. After a few minutes or a reboot, your changes are lost and the files revert to a previous form.
The Red Hat Enterprise Linux (RHEL) distributions include the NetworkManager RPM package. This provides a daemon which monitors the networking setup and automatically attempts to “do the right thing” to keep network connectivity for the system. Intended mainly for mobile applications, such as laptops, which are used at work, in public hotspots, and at home, the NetworkManager permits differing network configuration profiles to be defined.
Anaconda, the installer, enables NetworkManager if any network interface uses dynamically-assigned addresses. For hosts with only fixed network addresses, network reconfiguration must be performed manually.
One profile named default is always created. Additional profiles may be created using the system-config-network tool. A profile is essentially a stored copy of a collection of files:
$ pwd /etc/sysconfig/networking/profiles/default $ ls hosts ifcfg-eth0 network resolv.conf
Periodically the NetworkManager utility refreshes the real files from these stored copies. While the usefulness of this capability in a static server environment is debatable, the NetworkManager package is nonetheless part of the default RHEL install set.
Disabling the NetworkManager
To avoid the problem discussed above, consider disabling the NetworkManager service:
# chkconfig NetworkManager off # service NetworkManager stop
Then, any stored files in /etc/sysconfig/networking/profile will be ignored. Alternatively, use the system-config-network GUI tool to make the changes permanently.