nm applet disable
http://support.qacafe.com/knowledge-base/how-do-i-prevent-network-manager-from-controlling-an-interface/
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:
- Tell Network Manager to stop controlling the interfaces used by the test configuration
- Stop the Network Manager process
- Remove the Network Manager software from the system
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. This article discusses how to manually configure network interfaces under several Operating Systems.
Tell Network Manager to stop controlling the interfaces used by the test configuration
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, but how this is done depends on which linux operating system is running.
CentOS, Fedora, Red Hat
With these linux distributions, 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.
[main]
plugins=ifcfg-rh
This plugin tells Network Manager to look at the Red Hat 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:
NM_CONTROLLED=no
HWADDR=00:11:22:33:44:55
Of course, set the HWADDR
value to be the actual MAC address of this interface. Often this line is already present.
Ubuntu, Debian
With these linux distributions, one way to tell Network Manager to stop controlling a particular interface is by telling Network Manager to ignore ALL interfaces listed in the /etc/network/interfaces
file. This is done by adding the following lines to the Network Manager configuration file:
[main]
plugins=ifupdown
[ifupdown]
managed=false
Since this will only affect interfaces listed in the /etc/network/interfaces
file, any interface not listed there will remain under Network Manager control.
Alternate KEYFILE
method
Regardless of which linux distribution is running, 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:
[main]
plugins=keyfile
[keyfile]
unmanaged-devices=mac:00:11:22:33:44:55;mac:66:77:88:99:00:aa
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.
Stop the Network Manager process
If Network Manager is not needed during testing, it can be shut off completely. The stop/start command is a little different depending on the linux distribution used:
CentOS, Fedora, Red Hat
$ service NetworkManager stop
$ service NetworkManager start
Ubuntu, Debian
$ sudo service network-manager stop
$ sudo service network-manager start
Remove the Network Manager software from the system
If Network Manager will not be needed at all, it can be removed from the system completely. Again, this procedure is a bit different depending on the linux distribution used:
CentOS, Fedora, Red Hat
$ yum remove NetworkManager
Ubuntu, Debian
$ sudo apt-get remove network-manager