By default in Red Hat Enterprise Linux 7.3 (the version which this article was written) the default network service is done by NetworkManager which is a Linux daemon which is responsible to configure the network components of the system. Although the traditional ifcfg configuration files are supported the recommendation is to take advantage of NetworkManager service to configure IP, aliases, static routes, DNS and VPN connections.
The NetworkManager has a command line interface (nmcli) and a simple text user interface (nmtui), as well graphical user interface support.
If you are an old school administrator, you will use /etc/resolv.conf to configure your DNS settings on the system. However, if we do that on RHEL 7.0, we will notice that there is comment that the information there was generated by our friendly daemon NetworkManager.
Using Graphical User Interface (GUI)…
If you are using the graphical user interface, click on the network icon on the right-upper side and then click on Wired Settings.
In the new window, all current IPv4 and IPv6 will be displayed, as well MAC, default gateway and DNS. Click on Settings button to change the current settings.
Click on IPv4 and we can add a new DNS or perform any desired changes to the interface. We can always turn the interface on and off to refresh the settings like DNS.
Using text user interface (TUI)
We can use nmtui command to start the NetworkManager TUI where the administrator can click on Edit a connection. The administrator can use some shortcuts to save the trouble of selecting the first option that is being shown on the image below. For example nmtui edit eth0 goes straight to the configuration of eth0 interface.
Select the interface, in our case eth0 and click on Edit…
Perform the desired changes, such as DNS Server changes and confirm.
What is going on NetworkManager daemon?
We can use the command below to get an overview of the NetworkManager daemon to see what is going on and the latest activities.
systemctl status NetworkManager –l