Is it possible with the "nmcli" command to reset/establish network interfaces?

Hello Friends

For a just installed Ubuntu Server 24.04 through VirtualBox

When the nmcli connection show command is executed appears nothing. Furthermore when the nmcli device status command is executed appears the following:

DEVICE TYPE     STATE      CONNECTION
enp0s3 ethernet unmanaged  --
lo     loopback unmanaged  --

But when the ip a command is executed appears the lo and enp0s3 network interfaces with complete data. The IP is dynamic and is possible do ping to other place

Now, as a comparison for a just installed Fedora Server 41 when the two nmcli commands are executed appear “valid” data

Question

  • Is possible with the nmcli command reset/establish network interfaces?

If not what to do?

Purpose

  1. Obtain the same valid structure data as in Fedora Server
  2. Configure a static IP for the enp0s3 network interface through the nmcli command as was done in Fedora Server

Thank You

1 Like

Those interfaces are not being managed by NetworkManager.
Have a look in /etc/network/interfaces… they may be configured there
or
maybe you have dhcpcd running… it will conflict with NM.
Check dhcpcd.conf

To get NM to control interfaces, you have to disable all other network configurations for those interfaces.

4 Likes

Thank You

I am going to research all the suggested. The content of /etc/network/interfaces should be similar than in Fedora. It how a guidance to understand what to expect.

Furthermore: It seems would be too:

  1. Add each network interface as a new profile

or perhaps

  1. Do a modification to each current profile

Of course I must do more research for the nmcli command to see what is the correct approach either 1 or 2

2 Likes

You started another thread discussing netplan…

Does your

/etc/netplan/xxxxx.yaml

(on Ubuntu 24.04 on my Pi5 it’s 50-cloud-init.yaml) have “renderer: NetworkManager” in it?

If it doesn’t then your network settings are probably NOT managed by NetworkManager…

My x86_64 Ubuntu 24.04 (on a Dell Latitude) does seem to be using NetworkManager via Netplan - it has the file /etc/netplan/90-NM-b47ea08f-26ba-4057-97da-dc7665528fd2.yaml in /etc/netplan, and

renderer: NetworkManager

But I’m not going to post ANY of the other contents of the file because there’s security considerations there…

Some variations on "renderer: " might also be something like “networkd” :

# This file describes the network interfaces available on your system
# For more information, see netplan(5).
network:
  version: 2
  renderer: networkd
  ethernets:

    ens5:
      dhcp4: yes

(from a Ubuntu 18.04 server)

2 Likes