Duplicated Connection in Network Manager

Problem Description
I have duplicated network connections for my Ethernet interface on my Raspberry Pi in Network Manager. When I delete the duplicated connection, it seems to be created again on every reboot. I therefore have problems assigning a static IP address because the corresponding setting in the duplicated connection is not taken into account.

Information

  • FreedomBox version: 21.4.4
  • Hardware: Raspi 2
  • How did you install FreedomBox?: SD-Card-Image

Can you post the log or output that is giving you that impression?

Typically a static IP address is set in your router–or whatever is serving DHCP on your network–based on the MAC address of the device. It would be unusual to use NetworkManager for setting up a static IP address.

Thanks for your reply.

Screenshot from nmtui:

nmtui

Plinth also shows two connections for the same interface. One is inactive.

Originally I wanted to assign the static IP via DHCP. However, that didn’t work because the two Network Manager connections get different IPs assigned and Network Manager seems to activate a different connection on every reboot.

I can’t explain this behavior.

NetworkManager does not assign an IP address, your IP address gets assigned by your gateway. Unless you assign the device a static IP address (in the gateway, i.e. in the admin portal for your router), every time the device connects it will get a new DHCP lease and (potentially) a new IP address.

I tried to assign a static ip-adress on my DHCP-server but it is not working.

It looks to me like each Network Manager connection profile gets its own IP address from the DHCP server. But since the profiles switch on reboot, the IP address of the Freedombox changes as well.

Anyway. I think that the problem would be solved if Network Manager did not create two connections for a single interface.

Try to disable MAC address randomization, like this person for example: Raspberry pi 3 Model B WiFi MAC address keeps changing - Page 2 - Raspberry Pi Forums

[connection-mac-randomization]
ethernet.cloned-mac-address=stable

Is already set.

After a reboot, I now got three connections in nmtui. Each with the same MAC address. Two are configured with static ip (I guess the old ones). The active connection is configured with dynamic ip address (I guess this one is new).

It looks like systemd-networkd and NetworkManager are both activated on my freedombox. Maybe that is the cause of my problems. What is the standard configuration on a freedombox? Should I deactivate one?

Mine has NetworkManager running, and does not have systemd-networkd. I think you are right, from what I am reading it does look like running both can cause issues/conflicts.

Perhaps you have cracked the case? :male_detective:

If you comment out your network/wifi cards in /etc/network/interfaces that allows NetworkManager to get full control of those interfaces. Freedombox uses NetworkManager to configure networking, so by doing this you are using the configuration method expected by the Freedombox team. Perhaps you see this because there is an entry in /etc/network/interfaces for that network card.

Here’s what my /etc/network/interfaces has:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
# allow-hotplug enp2s0
# iface enp2s0 inet dhcp

There is no entry for my ethernet or wifi card in this file.