Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
NetworkManager - Ignore device
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
ZeuZ_NG
Guru
Guru


Joined: 10 Sep 2008
Posts: 453
Location: Near /dev/urandom | /dev/null

PostPosted: Sat Oct 31, 2015 3:29 pm    Post subject: NetworkManager - Ignore device Reply with quote

Hey all, what's the current way to disable NetworkManager from managing a device?
I've tried the keyfile plugin with unmanaged-devices=mac:mac_here and it doesn't work..
It sometimes changes the status from unmanaged -> unavailable due to reason: managed (from NetworkManager --debug)
_________________
| Intel Core i7 920. | Intel DX58SO Extreme. |
| 8gb DDR3 1666mHz | 1TB 7200 RPM WD HDD.|
Unix´s guru view of sex:
unzip ; strip ; touch ; grep ; finger ; \
mount ; fsck ; more ; yes ; umount ; sleep.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1631
Location: United Kingdom

PostPosted: Sun Nov 01, 2015 2:23 pm    Post subject: Re: NetworkManager - Ignore device Reply with quote

Do you have to include the interface name as well as the mac address?

man NetworkManager.conf wrote:
Example:

unmanaged-devices=interface-name:em4
unmanaged-devices=mac:00:22:68:1c:59:b1;mac:00:1E:65:30:D1:C4;interface-name:eth2

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
ZeuZ_NG
Guru
Guru


Joined: 10 Sep 2008
Posts: 453
Location: Near /dev/urandom | /dev/null

PostPosted: Sun Nov 01, 2015 9:50 pm    Post subject: Reply with quote

I've currently got:
Code:

[main]
plugins=keyfile
[keyfile]
unamanaged-devices=mac:24:05:0f:51:3b:f5;interface-name:wlan1


But to no avail

EDIT:
NetworkManager --debug
Code:

linuxblade byakko # NetworkManager --debug
NetworkManager[4531]: <info>  NetworkManager (version 1.0.6) is starting...
NetworkManager[4531]: <info>  Read config: /etc/NetworkManager/nm-system-settings.conf



So I copied over the NetworkManager.conf to nm-system-settings.conf
Still, I get:
Code:

linuxblade byakko # nmcli dev status show
Unknown parameter: show
DEVICE  TYPE      STATE         CONNECTION
sit0    sit       connected     sit0       
wlan0   wifi      connected     Zideral   
wlan1   wifi      disconnected  --         
lo      loopback  unmanaged     --


And the new debug looks like:
Code:

NetworkManager[4565]: <info>  NetworkManager (version 1.0.6) is starting...
NetworkManager[4565]: <info>  Read config: /etc/NetworkManager/nm-system-settings.conf
NetworkManager[4565]: <info>  Loaded settings plugin keyfile: (c) 2007 - 2015 Red Hat, Inc.  To report bugs please use the NetworkManager mailing list.
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/Speedy-0FE042 (3455dee8-cfe4-48f6-86a4-ff7a094272ba,"Speedy-0FE042")
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/FLENIGUEST (322914ab-b959-4005-ad95-1006d7c603d4,"FLENIGUEST")
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/Pizarro (5269dc9c-dec1-4ff0-a1ae-d34b38eaefa8,"Pizarro")
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/Zideral (80d7aab5-20d5-4d51-9a83-6eb8d70ceed0,"Zideral")
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/Flia-Cardonatto (427e21a6-f7a7-49f1-882e-3149a4b76114,"Flia-Cardonatto")
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/Wifi (ee2a9e7c-199e-49e4-b71a-a67156d8fe32,"Wifi")
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/TP-LINK_910460 (2aa2796c-f59a-4c6d-950d-8dc3237faa72,"TP-LINK_910460")
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/Auto Camaras (b17bede4-33fb-479f-abc1-606d0b034cfb,"Auto Camaras")
NetworkManager[4565]: <info>  keyfile: new connection /etc/NetworkManager/system-connections/Auto TP-LINK_SOLE (afa72e17-673d-4c9c-ab9c-278f5b1b3e11,"Auto TP-LINK_SOLE")
NetworkManager[4565]: <info>  monitoring kernel firmware directory '/lib/firmware'.
NetworkManager[4565]: <info>  rfkill7: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/ieee80211/phy7/rfkill7) (driver rtl8187)
NetworkManager[4565]: <info>  rfkill0: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:1c.3/0000:03:00.0/ieee80211/phy0/rfkill0) (driver iwlwifi)
NetworkManager[4565]: <info>  WiFi hardware radio set enabled
NetworkManager[4565]: <info>  WWAN hardware radio set enabled
NetworkManager[4565]: <info>  Loaded device plugin: NMVxlanFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMVlanFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMVethFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMTunFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMMacvlanFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMInfinibandFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMGreFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMEthernetFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMBridgeFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMBondFactory (internal)
NetworkManager[4565]: <info>  Loaded device plugin: NMWifiFactory (/usr/lib64/NetworkManager/libnm-device-plugin-wifi.so)
NetworkManager[4565]: <info>  Loaded device plugin: NMWwanFactory (/usr/lib64/NetworkManager/libnm-device-plugin-wwan.so)
NetworkManager[4565]: <info>  Loaded device plugin: NMAtmManager (/usr/lib64/NetworkManager/libnm-device-plugin-adsl.so)
NetworkManager[4565]: <info>  Loaded device plugin: NMBluezManager (/usr/lib64/NetworkManager/libnm-device-plugin-bluetooth.so)
NetworkManager[4565]: <info>  WiFi enabled by radio killswitch; enabled by state file
NetworkManager[4565]: <info>  WWAN enabled by radio killswitch; enabled by state file
NetworkManager[4565]: <info>  WiMAX enabled by radio killswitch; enabled by state file
NetworkManager[4565]: <info>  Networking is enabled by state file
NetworkManager[4565]: <info>  (wlan0): using nl80211 for WiFi device control
NetworkManager[4565]: <info>  (wlan0): driver supports Access Point (AP) mode
NetworkManager[4565]: <info>  (wlan0): new 802.11 WiFi device (carrier: UNKNOWN, driver: 'iwlwifi', ifindex: 3)
NetworkManager[4565]: <info>  (wlan0): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
NetworkManager[4565]: <info>  (sit0): new Generic device (carrier: UNKNOWN, driver: 'sit', ifindex: 2)
NetworkManager[4565]: <info>  keyfile: add connection in-memory (541897c7-818e-4686-a921-62ce41577869,"sit0")
NetworkManager[4565]: <info>  (sit0): device state change: unmanaged -> unavailable (reason 'connection-assumed') [10 20 41]
NetworkManager[4565]: <info>  (sit0): device state change: unavailable -> disconnected (reason 'connection-assumed') [20 30 41]
NetworkManager[4565]: <info>  (sit0): Activation: starting connection 'sit0' (541897c7-818e-4686-a921-62ce41577869)
NetworkManager[4565]: <info>  (wlan1): using nl80211 for WiFi device control
NetworkManager[4565]: <info>  (wlan1): new 802.11 WiFi device (carrier: UNKNOWN, driver: 'rtl8187', ifindex: 10)
NetworkManager[4565]: <info>  (wlan1): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
NetworkManager[4565]: <info>  (lo): link connected
NetworkManager[4565]: <info>  (lo): new Generic device (carrier: ON, driver: 'unknown', ifindex: 1)
NetworkManager[4565]: <info>  wpa_supplicant running
NetworkManager[4565]: get_ip_iface_identifier: assertion 'link_type > NM_LINK_TYPE_UNKNOWN' failed
NetworkManager[4565]: <warn>  (sit0): failed to get interface identifier; IPv6 may be broken
NetworkManager[4565]: <info>  (sit0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[4565]: <info>  (sit0): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[4565]: <info>  (sit0): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[4565]: <info>  (sit0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
NetworkManager[4565]: <info>  (sit0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
NetworkManager[4565]: <info>  (sit0): device state change: secondaries -> activated (reason 'none') [90 100 0]
NetworkManager[4565]: <info>  NetworkManager state is now CONNECTED_LOCAL
NetworkManager[4565]: <info>  (sit0): Activation: successful, device activated.
NetworkManager[4565]: <info>  (wlan0) supports 5 scan SSIDs
NetworkManager[4565]: <info>  (wlan0): supplicant interface state: starting -> ready
NetworkManager[4565]: <info>  (wlan0): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
NetworkManager[4565]: <info>  (wlan1) supports 4 scan SSIDs
NetworkManager[4565]: <info>  (wlan1): supplicant interface state: starting -> ready
NetworkManager[4565]: <info>  startup complete
NetworkManager[4565]: <info>  (wlan1): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
NetworkManager[4565]: <info>  (wlan1): supplicant interface state: ready -> inactive
NetworkManager[4565]: <info>  (wlan0): supplicant interface state: ready -> inactive
NetworkManager[4565]: <info>  Auto-activating connection 'Zideral'.
NetworkManager[4565]: <info>  (wlan0): Activation: starting connection 'Zideral' (80d7aab5-20d5-4d51-9a83-6eb8d70ceed0)
NetworkManager[4565]: <info>  (wlan0): device state change: disconnected -> prepare (reason 'none') [30 40 0]
NetworkManager[4565]: <info>  NetworkManager state is now CONNECTING
NetworkManager[4565]: <info>  (wlan0): device state change: prepare -> config (reason 'none') [40 50 0]
NetworkManager[4565]: <info>  (wlan0): Activation: (wifi) connection 'Zideral' has security, and secrets exist.  No new secrets needed.
NetworkManager[4565]: <info>  Config: added 'ssid' value 'Zideral'
NetworkManager[4565]: <info>  Config: added 'scan_ssid' value '1'
NetworkManager[4565]: <info>  Config: added 'key_mgmt' value 'WPA-PSK'
NetworkManager[4565]: <info>  Config: added 'psk' value '<omitted>'
NetworkManager[4565]: <info>  Config: set interface ap_scan to 1
NetworkManager[4565]: <info>  (wlan0): supplicant interface state: inactive -> associating
NetworkManager[4565]: <info>  (wlan0): supplicant interface state: associating -> 4-way handshake
NetworkManager[4565]: <info>  (wlan0): supplicant interface state: 4-way handshake -> completed
NetworkManager[4565]: <info>  (wlan0): Activation: (wifi) Stage 2 of 5 (Device Configure) successful.  Connected to wireless network 'Zideral'.
NetworkManager[4565]: <info>  (wlan0): device state change: config -> ip-config (reason 'none') [50 70 0]
NetworkManager[4565]: <info>  (wlan0): device state change: ip-config -> ip-check (reason 'none') [70 80 0]
NetworkManager[4565]: <info>  (wlan0): device state change: ip-check -> secondaries (reason 'none') [80 90 0]
NetworkManager[4565]: <info>  (wlan0): device state change: secondaries -> activated (reason 'none') [90 100 0]
NetworkManager[4565]: <info>  NetworkManager state is now CONNECTED_LOCAL
NetworkManager[4565]: <info>  NetworkManager state is now CONNECTED_GLOBAL
NetworkManager[4565]: <info>  Policy set 'Zideral' (wlan0) as default for IPv4 routing and DNS.
NetworkManager[4565]: <info>  (wlan0): Activation: successful, device activated.
NetworkManager[4565]: <info>  (wlan1): device state change: disconnected -> unmanaged (reason 'removed') [30 10 36]
NetworkManager[4565]: <warn>  (wlan1): failed to disable userspace IPv6LL address handling
NetworkManager[4565]: <info>  radio killswitch /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/ieee80211/phy7/rfkill7 disappeared
NetworkManager[4565]: <info>  (wlan1): using nl80211 for WiFi device control
NetworkManager[4565]: <info>  (wlan1): new 802.11 WiFi device (carrier: UNKNOWN, driver: 'rtl8187', ifindex: 11)
NetworkManager[4565]: <info>  rfkill8: found WiFi radio killswitch (at /sys/devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/ieee80211/phy8/rfkill8) (driver rtl8187)
NetworkManager[4565]: <info>  (wlan1): device state change: unmanaged -> unavailable (reason 'managed') [10 20 2]
NetworkManager[4565]: <info>  (wlan1) supports 4 scan SSIDs
NetworkManager[4565]: <info>  (wlan1): supplicant interface state: starting -> ready
NetworkManager[4565]: <info>  (wlan1): device state change: unavailable -> disconnected (reason 'supplicant-available') [20 30 42]
NetworkManager[4565]: <info>  (wlan1): supplicant interface state: ready -> inactive


_________________
| Intel Core i7 920. | Intel DX58SO Extreme. |
| 8gb DDR3 1666mHz | 1TB 7200 RPM WD HDD.|
Unix´s guru view of sex:
unzip ; strip ; touch ; grep ; finger ; \
mount ; fsck ; more ; yes ; umount ; sleep.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1631
Location: United Kingdom

PostPosted: Mon Nov 02, 2015 5:18 am    Post subject: Reply with quote

OK, what you're experiencing is not normal, because I have just edited /etc/NetworkManager/NetworkManager.conf on my Clevo W230SS laptop (Gentoo amd64) to make my wireless interface unmanaged, and that works in my case (I tried with both networkmanager-1.0.2-r1 and networkmanager-1.0.6):

Code:
clevow230ss fitzcarraldo # cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=keyfile
rc-manager=none
dhcp=dhclient
no-auto-default=*

[keyfile]
hostname=clevow230ss
clevow230ss fitzcarraldo # nmcli dev status show
Unknown parameter: show
DEVICE    TYPE      STATE        CONNECTION           
sit0      sit       connected    sit0                 
wlp3s0    wifi      connected    Free Airport Internet
enp4s0f1  ethernet  unavailable  --                   
lo        loopback  unmanaged    --                   
clevow230ss fitzcarraldo # nano /etc/NetworkManager/NetworkManager.conf
clevow230ss fitzcarraldo # cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=keyfile
rc-manager=none
dhcp=dhclient
no-auto-default=*

[keyfile]
hostname=clevow230ss
unamanaged-devices=mac:aa:bb:cc:dd:ee:ff
clevow230ss fitzcarraldo # nmcli dev status show
Unknown parameter: show
DEVICE    TYPE      STATE        CONNECTION
sit0      sit       connected    sit0       
enp4s0f1  ethernet  unavailable  --         
lo        loopback  unmanaged    --         
wlp3s0    wifi      unmanaged    --         
clevow230ss fitzcarraldo #

(I have edited the above to anonymise my MAC address.)

Code:
clevow230ss fitzcarraldo # eix -I networkmanager
[I] net-misc/networkmanager
     Available versions:  1.0.2-r1 1.0.6 ~1.0.6-r1 {bluetooth connection-sharing consolekit +dhclient dhcpcd gnutls +introspection +modemmanager ncurses +nss +ppp resolvconf selinux systemd teamd test vala +wext +wifi zeroconf ABI_MIPS="n32 n64 o32" ABI_PPC="32 64" ABI_S390="32 64" ABI_X86="32 64 x32" KERNEL="linux"}
     Installed versions:  1.0.6(05:02:23 02/11/15)(bluetooth consolekit dhclient introspection modemmanager ncurses nss ppp wext wifi zeroconf -connection-sharing -dhcpcd -gnutls -resolvconf -selinux -systemd -teamd -test -vala ABI_MIPS="-n32 -n64 -o32" ABI_PPC="-32 -64" ABI_S390="-32 -64" ABI_X86="64 -32 -x32" KERNEL="linux")
     Homepage:            https://wiki.gnome.org/Projects/NetworkManager
     Description:         Universal network configuration daemon for laptops, desktops, servers and virtualization hosts

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
ZeuZ_NG
Guru
Guru


Joined: 10 Sep 2008
Posts: 453
Location: Near /dev/urandom | /dev/null

PostPosted: Mon Nov 02, 2015 7:30 am    Post subject: Reply with quote

It's weird..
Here it reads the information from
Code:
Read config: /etc/NetworkManager/nm-system-settings.conf

Are you using SystemD also?
Should I try with the unmangled name of the interface? I mean, undo the rule of udev and let it be called wlp2s0(or whatever it was :P) and try with that?
_________________
| Intel Core i7 920. | Intel DX58SO Extreme. |
| 8gb DDR3 1666mHz | 1TB 7200 RPM WD HDD.|
Unix´s guru view of sex:
unzip ; strip ; touch ; grep ; finger ; \
mount ; fsck ; more ; yes ; umount ; sleep.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1631
Location: United Kingdom

PostPosted: Mon Nov 02, 2015 8:30 am    Post subject: Reply with quote

No, I'm using OpenRC. I suppose you could try with the so-called predictable network interface name to see if it makes a difference. BTW, isn't the file name /etc/NetworkManager/nm-system-settings.conf obsolete? I think these days it should be /etc/NetworkManager/NetworkManager.conf. For example, the command 'man NetworkManager.conf' works for me, but the command 'man nm-settings.conf' returns 'No manual entry for nm-settings.conf'.

Another thing you could investigate: I switched to using dhclient instead of dhcpcd some time ago because dhcpcd stopped working with NetworkManager for some reason (I have no idea why). Which DHCP client are you using? You could try switching to see if that makes a difference (although I doubt it). If you have USE="dhcpcd -dhclient", re-merge networkmanager with USE="-dhcpcd dhclient".
_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
ZeuZ_NG
Guru
Guru


Joined: 10 Sep 2008
Posts: 453
Location: Near /dev/urandom | /dev/null

PostPosted: Mon Nov 02, 2015 8:34 am    Post subject: Reply with quote

Perhaps it has something to do with SystemD that it reads the config from another file, anyways I've got them with the same content..
Tried the predictable names, it didn't work..
Also, not using DHCP et all so that can't be it either..
_________________
| Intel Core i7 920. | Intel DX58SO Extreme. |
| 8gb DDR3 1666mHz | 1TB 7200 RPM WD HDD.|
Unix´s guru view of sex:
unzip ; strip ; touch ; grep ; finger ; \
mount ; fsck ; more ; yes ; umount ; sleep.
Back to top
View user's profile Send private message
Fitzcarraldo
Veteran
Veteran


Joined: 30 Aug 2008
Posts: 1631
Location: United Kingdom

PostPosted: Mon Nov 02, 2015 8:43 am    Post subject: Reply with quote

I wonder if something in the system-connections file could interfere with what you have in your /etc/NetworkManager/NetworkManager.conf file? Below is an example of a system-connections file on my laptop:

Code:
# cat /etc/NetworkManager/system-connections/Free\ Airport\ Internet
[connection]
id=Free Airport Internet
uuid=c7edeb42-7aa4-1f79-5cb2-0f37a62ba439
type=wifi
autoconnect=false
permissions=user:fitzcarraldo:;
secondaries=

[wifi]
mac-address=aa:bb:cc:dd:ee:ff
mac-address-blacklist=
mode=infrastructure
seen-bssids=
ssid=Free Airport Internet

[ipv4]
dns-search=
may-fail=false
method=auto

[ipv6]
dns-search=
method=ignore

_________________
Clevo W230SS: amd64 OpenRC elogind nvidia-drivers & xf86-video-intel.
Compal NBLB2: ~amd64 OpenRC elogind xf86-video-ati. Dual boot Win 7 Pro 64-bit.
KDE on both.

Fitzcarraldo's blog
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum