CDRouter Support

How do I prevent Network Manager from controlling an interface?

knowledge-base version 10.5

NOTE: The officially supported OS for CDRouter is CentOS 7 with a minimum kernel version of 3.10. If you are a legacy customer still running Ubuntu, you can find alternate instructions for controlling Network Manager in this Knowledge Base article. For more information on CDRouter’s officially support OS, consult this Supported OS Knowledge Base article.

Network Manager is a service for Linux which manages various networking interfaces, including physical such as Ethernet and wireless, and virtual such as VPN and other tunnels. Network Manager can be configured to control some or all of a system’s interfaces.

While Network Manager is an excellent service for managing the daily requirements of a user’s computer, its effects are typically non-optimal for a testing environment. Because of the extra variables it introduces into the state of a test machine’s networking configuration, it can be especially difficult to integrate with CDRouter, which also controls network interfaces. Due to this conflict, the start procedure will generate an error if Network Manager is controlling any interfaces used for testing. In this case you have three options:

  • Configure Network Manager to ignore test interfaces
  • Manually stop Network Manager
  • Remove Network Manager from the system

Manual interface configuration

Before you begin, please be aware that your LAN interface may require manual configuration should you decide to remove Network Manager from your system. If you do not have Internet access from another system, you may wish to learn how this process works before completing the removal process.

Please see this Knowledge Base article for manual interface configuration instructions:

Configure Network Manager to ignore test interfaces

Network Manager has a command line tool that can be used to see which interfaces it is controlling. Pull up a terminal window and type the following command:

nmcli dev status

This displays a table that lists all network interfaces along with their STATE. If Network Manager is not controlling an interface, its STATE will be listed as unmanaged. Any other value indicates the interface is under Network Manager control.

Network Manager settings are controlled by a configuration file: /etc/NetworkManager/nm-system-settings.conf (NM 0.7 and 0.8.0) or /etc/NetworkManager/NetworkManager.conf (NM 0.8.1 and later). We will use this file to tell Network Manager to stop controlling a particular interface.

With CentOS, the preferred way to tell Network Manager to stop controlling an interface is by editing the individual ifcfg-* files. First, make sure the Network Manager configuration file has the following lines.


This plugin tells Network Manager to look at the CentOS ifcfg-* files. Now for each interface you’d like Network Manager to ignore, edit the individual /etc/sysconfig/network-scripts/ifcfg-* interface files, adding the following lines:


If present, set the HWADDR value to be the actual MAC address of this interface.

Alternate KEYFILE method

An alternate method can be used to tell Network Manager to stop controlling an interface. This is done by adding the following lines to the Network Manager configuration file:



List the MAC address of each interface you want Network Manager to ignore, separated with a semicolon. Make sure that MAC addresses listed here are LOWER CASE.

Newer versions of NetworkManager can also use a more generic alternate KEYFILE method that does not involve actual MAC addresses. This syntax replaces the [keyfile] section above with the following:


Manually stop Network Manager

If Network Manager is not needed during testing, it can be shut off completely.

service NetworkManager stop
service NetworkManager start
systemctl stop NetworkManager
systemctl start NetworkManager

The above commands will stop/start NetworkManager, but will not affect whether it is automatically started when the machine boots. To disable/enable NetworkManager automatically when the system boots, again use the systemctl command (as root):

systemctl disable NetworkManager
systemctl enable NetworkManager

Remove Network Manager from the system

If Network Manager will not be needed at all, it can be removed from the system completely.

yum remove NetworkManager

Restart Networking

You may need to restart networking to make changes take effect.

For CentOS 7 and newer Ubuntu machines:

systemctl restart network

For CentOS 6 and older Ubuntu machines:

service network restart



About CDRouter

CDRouter is made by QA Cafe, a technology company based in Portsmouth, NH.

Get in touch via our Contact page or by following us on your favorite service: