Prevent Network Manager from controlling an interface
Note: this article no longer applies to the NTA1000 platform or fully licensed CDRouter systems. It should only be used when configuring a CDRouter DEMO evaluation platform.
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 need to tell Network Manager to ignore test interfaces.
Before you begin, please be aware that you may still want to use Network Manager to control the non-testing interfaces you have on your system, like the one you use to connect your system to the lab or corporate network.
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
unmanaged. Any other value indicates the interface is under Network
The preferred way to tell Network Manager to stop controlling an interface is by
creating/updating a file in the
/etc/NetworkManager/conf.d/ directory and
giving it the following content. You can name the file anything with a
suffix, but all files in that directory will be read in asciibetical order.
Files read later override snippets of files read earlier. Make sure the
plugin is listed. Other plugins may be listed too.
[main] plugins=ifcfg-rh,keyfile [keyfile] unmanaged-devices=interface-name:eth0;interface-name:wifi1
The keyfile section can also include wildcards and exceptions as follows:
Interfaces can also be defined by their MAC addresses (in lower case):
Reboot for the changes to take effect.