Disable network manager for a particular interface
Put this in your NetworkManager.conf (usually at /etc/NetworkManager/):
[main]plugins=keyfile[keyfile]unmanaged-devices=mac:xx:xx:xx:xx:xx:xx
of course, adjust the mac address to the device your want to ignore.
I realise this question is a bit old, but it came up when I was trying to Google the answer to this myself. What eventually worked for me was:
- Add the interface to
/etc/network/interfaces
. For mine:
iface eth1 inet static address 192.168.168.1 netmask 255.255.255.0 gateway 192.168.168.1
- Restart networking:
sudo /etc/init.d/networking restart
- Restart Network Manager:
sudo service network-manager restart
Network Manager should ignore any interfaces it finds in /etc/network/interfaces
. At this point obviously you're on your own for managing this interface with ifconfig
or something similar.
NetworkManager will not attempt to control a given interface if you set the interface to unmanaged
using the nmcli
command.
nmcli dev set wlp2s0 managed no
You can verify the interface is no longer managed with the following:
nmcli dev status
Output example:
DEVICE TYPE STATE CONNECTION wlp2s0 wifi unmanaged --