22
December
2023
11:52

Network Manager error on Linux: "No network connection", "device is strictly unmanaged"

22 December 2023 11:52

In one of the experimental Linux installations I saw a network error. It manifests itself in the fact that ping passes, but Networkmanager shows the “No network” icon and network management through “Connection settings” does not work.

Connection settings - Network Manager settings (icon in the corner of the screen).
If you have a network card, an Ethernet connection is added automatically.

Symptoms

Problem #1: it is impossible to connect to such a network, the error is "Connection 'Wired connection 1' is not available on device eth0 because device is strictly unmanaged"

Problem #2: the network icon "Network Manager" is inactive, or rather shows the absence of a network.

Problem #3: "Connection details" are not displayed for a wired connection. It is impossible to view the IP address graphically.

Problem #4: connection settings - Last used -"Never".

Solution

1)Correct the file/etc/NetworkManager/NetworkManager.conf

sudo nano /etc/NetworkManager/NetworkManager.conf

Instead of [ifupdown] managed=false specify [ifupdown]managed=true:

[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=true

[device]
wifi.scan-rand-mac-address=no

This will solve the "device is strictly unmanaged" problem

2) Make sure there are no unmanaged devices in the folder /etc/NetworkManager/
Normally, the following commands should not output anything to the screen:

sudo grep -ri unmanaged-devices /etc/NetworkManager/conf.d/
sudo grep -ri unmanaged-devices /etc/NetworkManager/

4) For the second problem: add ethernet to the list of exceptions of unmanaged devices in the file /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf

sudo nano /usr/lib/NetworkManager/conf.d/10-globally-managed-devices.conf

Normally, the contents of the file should be:

[keyfile]
unmanaged-devices=*,except:type:wifi,except:type:gsm,except:type:cdma,except:type:ethernet

If except:type:ethernet no - add to the end of the line ,except:type:ethernet
and save the file.

5) Since modern Linux uses netplan with a description of a typical connection in a configuration file in yaml format, we check netplan:

ls /etc/netplan/
cat 00-installer-config.yaml
network:
renderer: networkd
ethernets:
    enp1s10:
      dhcp4: true
      dhcp6: true
version: 2

The name of the network card must match the output of the command ip a. For example,enp1s10.

For more information about netplan, see article. If the configuration is correct (see above), apply it:

sudo netplan apply

6) Start and allow automatic startup of network services:

sudo systemctl start systemd-networkd
sudo systemctl enable systemd-networkd
sudo systemctl start NetworkManager.service
sudo systemctl enable NetworkManager.service

7) Re-read the configuration of the NetworkManager service

sudo systemctl reload NetworkManager.service

The NetworkManager applet icon in the status bar also changes to a wired RJ-45 jack symbol.
After the last action, the network appears and can be managed (right mouse button - connection parameters).

Default IPv4 Settings

You can change the wired connection settings in Network Nanager to suit your needs.

Below are the default settings:

Basic: "Connect automatically to a network with priority" - 0, "All users can connect to this network."

Ethernet:

  • Device - enp2s0
  • MTU - automatic
  • Wake on LAN - default
  • Channel matching - Ignore

    IPv4 parameters:
    *Address: 192.168.1.101

  • Network mask: 24
  • Gateway: 192.168.1.1

The fixed IPv4 address can be changed within the local network behind the Internet router.


Source link:
*Ubuntu Error: Connection activation failed: Connection is not available on device because device is strictly unmanaged



Related publications