1

I am running debian 11.3 x64 inside a vmware workstation 16.2. Initially the vm has only one network interface [NAT Switch of vmware] assigned. And it is working pretty well.

I tried to add another network adapter to the VM [Bridged Switch]. And the device got added but the network manager connection profile is not created and it showing in disconnected state. below are the nmcli outputs.

xxxx@yyyyyy:~$ nmcli device
DEVICE  TYPE      STATE         CONNECTION
ens33   ethernet  connected     Wired connection 1
ens36   ethernet  disconnected  --
lo      loopback  unmanaged     --
xxxxx@yyyyy:~$ nmcli
ens33: connected to Wired connection 1
        "Intel 82545EM"
        ethernet (e1000), 00:0C:29:1A:1F:8A, hw, mtu 1500
        ip4 default
        inet4 192.168.153.133/24
        route4 0.0.0.0/0
        route4 192.168.153.0/24
        inet6 fe80::20c:29ff:fe1a:1f8a/64
        route6 fe80::/64
        route6 ff00::/8

ens36: disconnected
        "Intel 82545EM"
        1 connection available
        ethernet (e1000), 00:0C:29:1A:1F:94, hw, mtu 1500

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

DNS configuration:
        servers: 192.168.153.2
        domains: localdomain
        interface: ens33

To connect to the new interface, I have to create connection profile by running sudo nmcli c add type ethernet ifname ens36 con-name Wired2

As per the debian manual, https://manpages.debian.org/testing/network-manager/NetworkManager.conf.5.en.html

no-auto-default - Specify devices for which NetworkManager shouldn't create default wired connection (Auto eth0). By default, NetworkManager creates a temporary wired connection for any Ethernet device that is managed and doesn't have a connection configured.

FYI

The etc/network/interfaces does not any entry for the device.

Network Manager Configuration

xxx@yyyyy:~$ cat /etc/NetworkManager/NetworkManager.conf
[main]
plugins=ifupdown,keyfile

[ifupdown]
managed=false

Questions

  • Why the NetworkManager is not auto creating profiles for wired connections?
  • Is there something else to be enabled?
  • Am I doing something wrong?
0

2 Answers 2

0

The following command:

sudo nmcli c add type ethernet ifname ens36 con-name Wired2

will create a new connection (on Debian) under:

/etc/NetworkManager/system-connections/

It is called Wired2.nmconnection, it doesn't make change under /etc/network/interfaces nor /etc/NetworkManager/NetworkManager.conf

1
  • Thanks for the quick response. Sorry I was not clear on my question. My question why the Network Manager is not adding the connection profile automatically? Why there is a need of running nmcli c add I am aware that it wont make changes to NetworkManager.conf and /etc/network/interfaces. Those information I provided for understanding.
    – Prakash P
    May 10, 2022 at 1:58
0

The issue happened in a customized preseeded debian installation and the root of the problem is in the install time configuration with net-cfg.

This seems to be a bug in debian linux installer. The installer creates a profile for first wired connection named "Wired connection 1" which should be limited to that interface instead the profile is kind of generic and applies to all new network interfaces! Since by default multiple connections cannot share a single profile, The newly added one does not has any connectivity.

  • The bug in the netcfg installer should be fixed and it should limit the default profile to one interface
  • Or disable the network configuration during the installation. Upon first boot the network will auto configure itself to DHCP.

Ref:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .