manually configure network in OEL 7, CentOS 7

manually configure network in OEL 7, CentOS 7

Spread the love

When you install CentOS, RHEL, or OEL with graphical Interface, it comes with NetworkManager. The NetworkManager daemon maks networking configuration and operation easy and automatic as possible by managing network interfaces, either Ethernet, WiFi, or Mobile Broadband devices. Besides, NetworkManager provides a rich API to control network settings and operations. However, when configuring servers It’s preferable to have their networking settings to be consistent. therefore, This article explains how to disable NetworkManager, hence, configure the network and set IP ethernet manually.

The following steps are suitable for versions 6 and 7 of RHEL, OEL, and CentOS.

Firstly, Identify which card you want to configure by executing the ifconfig command with parameter -s to shortlist the output.

manually configure network in OEL 7, CentOS 7 - ifconfig-s

In view of the output of our example, you can see  that the server has three network interfaces, as follow:

eno1 LAN Network interface
lo Loopback interface
virbr0 Wireless Network interface

In our case, LAN Interface eno1 is our target.

Disable NetworkManager

Firstly, Stop NetworkManager by stopping its service.

Secondly, disable Network Manager using the following command.

manually configure network setting.

Initially, navigate into the network configuration directory. then, edit the configuration file for the ethernet. For example, if the card name eno1 then the filename is ifcfg-eno1.

After that, add the following parameters in the file if they are not exist

manually configure network in OEL 7, CentOS 7 - ifcfg-eno1

Optional you can add the following lines to force DNS on specific Card


Manually configure DNS resolve file.

make sure it has a reliable DNS IPs, for example, google public DNS

manually configure network in OEL 7, CentOS 7 - resolv

Finally, type :wq to save & exit the editor.

Restart network services

For version 6, use the service command.

On RHEL 7 use systemD command, though, executing the above command will redirect to systemD command