fbpx

Server Setup

NetworkManager in CentOS/RHEL 7

by ,


We have by far the largest RPM repository with NGINX module packages and VMODs for Varnish. If you want to install NGINX, Varnish, and lots of useful performance/security software with smooth yum upgrades for production use, this is the repository for you.
Active subscription is required.

The NetworkManager service is enabled by default even in minimal installation of CentOS 7. You may find a multitude of articles online about disabling it in CentOS 7. However, they provide little justification on why this is needed. And is it needed?

NetworkManager and CentOS 7

When you install the minimal CentOS 7, you will get both services enabled:

  • NetworkManager
  • The network service (starts the network initscript)

Should you use both or disable some of them in a server environment? Is there benefit of keeping NetworkManager?

Benefits of using NetworkManager service

#1. Ease of configuration

NetworkManager is great in case you want to edit your network configuration using CLI. You will less likely break things by running CLI commands (NetworkManager) as opposed to editing configuration files directly (in case of network service only).

See how smooth it is to start using CloudFlare’s faster DNS service in your CentOS 7, using nothing but NetworkManager CLI (nmcli) commands.

If you’re using Ansible to manage your servers – it has nmcli module. So you can configure multiple servers network configuration in a cleaner way as opposed to editing configuration files on every machine.

#2. Futureproofing

Fedora community (RedHat) is much more focused on bringing updates to the to the NetworkManager and not the network script.

#3. More suitable for systemd

There are timing issues if configuring network devices using network script in systemd environments. NetworkManager is just more suitable in CentOS 7.

Negative effects of using NetworkManager service

The network script (and the service) does not really run residually in memory, so does not waste memory and is OK to keep as fallback for those device types which aren’t (yet) supported by the NetworkManager.

The NetworkManager service, on the other hand, uses residual memory of couple megabytes.

Conclusion

Choosing NetworkManager vs network script is like choosing to use Firewalld vs iptables userspace programs. I believe that you should use the default. The benefits are clear and the default is a good choice here. NetworkManager will allow you to manage configuration easily, like a PRO and virtually at no cost.

Literature:

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

This site uses Akismet to reduce spam. Learn how your comment data is processed.