How to add an interface to network manager?

Questions about Wi-Fi and other network devices, file sharing, firewalls, connection sharing etc
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

How to add an interface to network manager?

Post by MakOwner »

This is a MATE install that gone through a few upgrades, but not recently.
The network manager app in the tool bar died.
Just left the scene.
The parrot is dead.

I was able to get the desktop online using the /etc/network/interfaces file, but nothing I am able to do now will either
  • move the interface back to nm control
    restart the applet in the toolbar.
I'm no rocket surgeon by any means, but this seems to be _wwaayy_ overcomplicated.
I have spent several hours googling how to configure NetworkManager and I can't even find .conf examples.

Code: Select all

# nmcli dev 
DEVICE   TYPE      STATE      CONNECTION 
enp0s25  ethernet  unmanaged  --         
enp7s0   ethernet  unmanaged  --         
vmnet1   ethernet  unmanaged  --         
vmnet8   ethernet  unmanaged  --         
lo       loopback  unmanaged  --     
I am assuming once the magic happens to get the interfaces managed by nm, the management applet would restart on boot?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interrface to network manager?

Post by MakOwner »

Anyone?
Just can't there from here?
No way to do this without a complete re-install?
User avatar
Flemur
Level 20
Level 20
Posts: 10096
Joined: Mon Aug 20, 2012 9:41 pm
Location: Potemkin Village

Re: How to add an interrface to network manager?

Post by Flemur »

MakOwner wrote: Sat Nov 27, 2021 4:24 pm Anyone?
Just can't there from here?
No way to do this without a complete re-install?
This might be what you want - it's the thing launched by nm-applet.
In a terminal:

Code: Select all

nm-connection-editor
(might need sudo to make changes)
Please edit your original post title to include [SOLVED] if/when it is solved!
Your data and OS are backed up....right?
t42
Level 11
Level 11
Posts: 3744
Joined: Mon Jan 20, 2014 6:48 pm

Re: How to add an interrface to network manager?

Post by t42 »

In addition to the suggestion above by Flemur
look at the output of the command

Code: Select all

systemctl status network-manager
and then run if appropriate

Code: Select all

sudo systemctl start network-manager
-=t42=-
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interrface to network manager?

Post by MakOwner »

t42 wrote: Sat Nov 27, 2021 6:19 pm In addition to the suggestion above by Flemur
look at the output of the command

Code: Select all

systemctl status network-manager
and then run if appropriate

Code: Select all

sudo systemctl start network-manager
@Flemur -- I knew about the editor, but even if you open it it just shows all interfaces "unmanaged" and you can't edit them.

Network Manager is installed

Code: Select all

# dpkg -l | grep -i network-manager
ii  network-manager                        1.22.10-1ubuntu2.2                    amd64        network management framework (daemon and userspace tools)
ii  network-manager-gnome                  1.8.24-linuxmint4                     amd64        network management framework (GNOME frontend)
ii  network-manager-pptp                   1.2.8-2                               amd64        network management framework (PPTP plugin core)
but ....

Code: Select all

# systemctl status network-manger 
Unit network-manger.service could not be found.
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interrface to network manager?

Post by MakOwner »

It would help if I could spell. If I could type, I'd be dangerous.

It's loaded and running.

Code: Select all

# systemctl status network-manager 
● NetworkManager.service - Network Manager
     Loaded: loaded (/lib/systemd/system/NetworkManager.service; enabled; vendor preset: enabled)
     Active: active (running) since Sun 2021-11-28 08:44:37 CST; 26s ago
       Docs: man:NetworkManager(8)
   Main PID: 74378 (NetworkManager)
      Tasks: 3 (limit: 77136)
     Memory: 4.3M
     CGroup: /system.slice/NetworkManager.service
             └─74378 /usr/sbin/NetworkManager --no-daemon

Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0638] device (vmnet1): driver '(null)' does not support carrier detection.
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0641] device (vmnet1): driver 'unknown' does not support carrier detection.
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0643] manager: (vmnet1): new Ethernet device (/org/freedesktop/NetworkManager/Devices/4)
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0649] device (vmnet8): driver '(null)' does not support carrier detection.
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0651] device (vmnet8): driver 'unknown' does not support carrier detection.
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0654] manager: (vmnet8): new Ethernet device (/org/freedesktop/NetworkManager/Devices/5)
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0661] manager: NetworkManager state is now CONNECTED_GLOBAL
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0721] manager: startup complete
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0822] modem-manager: ModemManager available
Nov 28 08:44:38 T7600 NetworkManager[74378]: <info>  [1638110678.0941] agent-manager: agent[dfd9785270486c22,:1.110/org.freedesktop.nm-applet/1000]: agent registered

Nothing is managed.

Code: Select all

# nmcli dev
DEVICE   TYPE      STATE      CONNECTION 
enp0s25  ethernet  unmanaged  --         
enp7s0   ethernet  unmanaged  --         
vmnet1   ethernet  unmanaged  --         
vmnet8   ethernet  unmanaged  --         
lo       loopback  unmanaged  -- 
I have tried a dpkg-reconfigure, with no change.

I just need to know how to configure it so that the interfaces return to NM control, and the app restarts on the tool bar at bootup.
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: How to add an interrface to network manager?

Post by JeremyB »

Run these commands in terminal

Code: Select all

wget -N -t 5 -T 10 https://github.com/UbuntuForums/wireless-info/raw/master/wireless-info && chmod +x wireless-info && ./wireless-info
cat wireless-info.txt | nc termbin.com 9999
Post termbin URL
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interrface to network manager?

Post by MakOwner »

JeremyB wrote: Sun Nov 28, 2021 11:27 am Run these commands in terminal

Code: Select all

wget -N -t 5 -T 10 https://github.com/UbuntuForums/wireless-info/raw/master/wireless-info && chmod +x wireless-info && ./wireless-info
cat wireless-info.txt | nc termbin.com 9999
Post termbin URL
https://termbin.com/cd8u
https://termbin.com/cd8u


There is no wireless at all on this desktop. This will enable Network Manager on the physical NICs?
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: How to add an interrface to network manager?

Post by donten »

Last time I messed with network interfaces at the command line, NetworkManager left the room... :) Do you have any network connectivity at all? If so, use Synaptic to re-install NetworkManager a la:

viewtopic.php?p=1359273#p1359273
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interrface to network manager?

Post by MakOwner »

donten wrote: Sun Nov 28, 2021 12:58 pm Last time I messed with network interfaces at the command line, NetworkManager left the room... :) Do you have any network connectivity at all? If so, use Synaptic to re-install NetworkManager a la:

viewtopic.php?p=1359273#p1359273
Network connectivity is currently enabled by the /etc/network/interfaces file and the networking service.
I have tried multiple iterations of removing the contents from there and modifying the various netplan and network-manager configuration files.

I can never get Network Manager to "own" the interfaces.

I can't imagine why finding the appropriate configuration file to make NM the "owner" of these interfaces is so difficult.
I have spent a number of hours on duckduckgo before posting here.

I may the only person that has ever tried to move from one network manager to another - other than a fresh install.
I sure can't find any mention or documentation on how to do it.

I have reconfigured the NM package and removed and reinstalled it from the command line previously.
Just did it again via the gui and selected all three NM packages ( network-manager, network-manager-gnome and network-manager-pptp ) instead of just Network-Manager.
I'm going to try a reboot and see if NM takes over now.

Nope, no joy.
Installation of Network Manager doesn't assume control of the interfaces, so I still need the list of NM files to modify and and to remove the interfaces from management of the other method.


Quite frankly if I could get the applet working with the way the interfaces are setup in /etc/network/interfaces, I'd prefer that.
Much saner configuration, but there are a couple of times when it is really convenient to enable/disable interfaces in the gui. :/
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: How to add an interrface to network manager?

Post by donten »

Did you try the Synaptic method? Synaptic sometimes works wonders...
I found the solution by myself. If anyone faces the same issue do the following.

Launch Synaptic Package Manager, find your Network Manager package, right click on it, select Mark for Reinstallation, then select Mark Recommended for Installation and select whatever is needed (highlighted). For me it was network-manager-gnome and plasma-nm. Then "Apply".
JeremyB
Level 21
Level 21
Posts: 13880
Joined: Fri Feb 21, 2014 8:17 am

Re: How to add an interrface to network manager?

Post by JeremyB »

Since you had the internet working through listing the interface in /etc/network/interfaces (enp0s25 and enp7s0) and with managed=false in /etc/NetworkManager/NetworkManager.conf Network Manager ignores anything listed in /etc/network/interfaces
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interrface to network manager?

Post by MakOwner »

donten wrote: Sun Nov 28, 2021 2:02 pm Did you try the Synaptic method? Synaptic sometimes works wonders...
I found the solution by myself. If anyone faces the same issue do the following.

Launch Synaptic Package Manager, find your Network Manager package, right click on it, select Mark for Reinstallation, then select Mark Recommended for Installation and select whatever is needed (highlighted). For me it was network-manager-gnome and plasma-nm. Then "Apply".
yep, tried that.
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interrface to network manager?

Post by MakOwner »

JeremyB wrote: Sun Nov 28, 2021 2:19 pm Since you had the internet working through listing the interface in /etc/network/interfaces (enp0s25 and enp7s0) and with managed=false in /etc/NetworkManager/NetworkManager.conf Network Manager ignores anything listed in /etc/network/interfaces
I remove all manual configurations in /etc/network/interfaces and changed the "managed" entry in NetworkManager.conf to "true" and on another attempt to "1".

Then I just have no network connectivity.
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: How to add an interface to network manager?

Post by donten »

Throwing this into the ring... Enter into the terminal:

Code: Select all

nmtui
Very simple...won't take any time to see if it works.

Image
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interface to network manager?

Post by MakOwner »

I can't paste images here, but the outcome is :

"Could not activate connection: │ │
Connection 'enp0s25' is not available │ │
on device enp0s25 because device is │ │
strictly unmanaged"


Question remains:
I can stop networking services, remove the /etc/network/interface entries, but I can't figure out the magic to get NM to actually assume ownership.
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: How to add an interface to network manager?

Post by donten »

I found this info:

https://askubuntu.com/questions/1073960 ... st#1212761


The answer:
You must ensure that no other service that wants to configure the network is running; in fact, multiple networking services will conflict. You can find a list of the currently running services with systemctl --type=service and then stop them.
Also You have to remove/comment out every interface you wish to config through cockpit in /etc/networking/interfaces
Then install and enable networkmanager package.
Everything about setup Network Manager is describe here: https://wiki.archlinux.org/index.php/NetworkManager
https://wiki.debian.org/NetworkManager
Give it a thorough go! :wink:
MakOwner
Level 2
Level 2
Posts: 66
Joined: Sun Nov 06, 2011 3:54 pm

Re: How to add an interface to network manager?

Post by MakOwner »

donten wrote: Tue Nov 30, 2021 12:14 am I found this info:

https://askubuntu.com/questions/1073960 ... st#1212761


The answer:
You must ensure that no other service that wants to configure the network is running; in fact, multiple networking services will conflict. You can find a list of the currently running services with systemctl --type=service and then stop them.
Also You have to remove/comment out every interface you wish to config through cockpit in /etc/networking/interfaces
Then install and enable networkmanager package.
Everything about setup Network Manager is describe here: https://wiki.archlinux.org/index.php/NetworkManager
https://wiki.debian.org/NetworkManager
Give it a thorough go! :wink:
I really appreciate everyone's help here.
Unfortunately for me, there is just no getting there form here.
I read through that thread you pointed to, read through the wiki, and even found a few new nmcli command options not directly mentioned in that wiki.

I still don't find anything that helps move the interfaces under NetworkManager control.
Maybe removing and re-installing NetworkManager while the interfaces are no longer under control of the networking service, but ... with no network it's hard to do that.
At least it's not worth the trouble just to get a toolbar tray working.
This just re-inforces my opinion that complexity for the sake of complexity is a bit disastrous.
I'll leave it as it is until I need to do a wipe and re-install.
User avatar
donten
Level 4
Level 4
Posts: 244
Joined: Mon Apr 06, 2020 2:16 pm

Re: How to add an interface to network manager?

Post by donten »

I'll leave it as it is until I need to do a wipe and re-install.
Hope it doesn't happen again... :|
dobriain
Level 2
Level 2
Posts: 85
Joined: Sat Dec 06, 2014 1:26 pm

Re: How to add an interface to network manager?

Post by dobriain »

Hi, I had a similar problem and I solved it by ensuring that netplan and not ifupdown were managing the interfaces.

Code: Select all

~$ sudo apt install netplan.io
~$ sudo apt purge ifupdown
~$ cat <<EOM | sudo tee -a /etc/netplan/1-network-manager-all.yaml 
# Let NetworkManager manage all devices on this system
network:
  version: 2
  renderer: NetworkManager
EOM
~$ netplan apply
The interfaces should become active in NetworkManager.
Locked

Return to “Networking”