r/debian • • 10h ago

Debian Stable Question Problems with Setting NIC configurations

I have a Minisforum NAB9 (2 RJ45 and WiFi) and loaded Debian 13 (trixie) with Cinnamon yesterday to get started building a docker host.

Everything was going fine and it found the 2 wired NIC and the WiFi.

Using the Settings > Network app, it shows the 2 wired devices (enp2s0 & enp3s0) and each has a different MAC address. The WiFi is listed and shows the Visible Networks.

But it seemed like it was treating the 2 wired connections as 1. If I changed the name of the 1st, the 2nd had the same name. If I used DHCP on the 1st, the 2nd had DHCP even though I wanted it "Manual".

The plan was to have NIC 1 (enp2s0) in the native LAN using DHCP and NIC 2 (enp3s0) in a private LAN (for CCTV with no access to the Internet) using a fixed IP address, no DNS and no router.

Yesterday, despite some of the weirdness with the Setup > Network app, it was all working as I expected. NIC 1 had full access to the Internet and NIC 2 could ping a device on the private LAN.

Today, there was a Debian update alert and I let it update. Now there is zero network access on either NIC. Nothing.

NIC 1 still gets a DHCP assigned address, but the "nmcli device show" displays that there is no IP4.GATEWAY and no IP4.DNS[1] or [2], those fields are --.

And enp3s0 had no IP4.?? details listed with nmcli. With the RJ45 unplugged the flag "GENERAL.STATE:" is "20 (disconnected) and with it plugged in, it is "30 (disconnected). In the Settings > Network,

If I set NIC 1 to "Manual", I can plug in all the details, and it starts working fine and nmcli shows all the correct details. But, DHCP doesn't work. It gets 1/2 the details and none of the DNS or GW.

The enp3s0 had no connection. The "enp3s0" was there, but nothing under it. I clicked the + to add a new profile and selected the MAC address of enp3s0 and filled in the IP address. But it won't ping any of the devices it would ping yesterday.

I may have FUBARed something yesterday. How can I get networking sorted (short of reinstalling from scratch)?

FWIW: I use CentOS / Redhat and now using Rocky. Maybe that should help, but usually, I'm a CLI kind of admin, and the Setting GUI seem to get in the way. I went to Debian because it was recommended for Frigate and Home Assistant.

5 Upvotes

2 comments sorted by

1

u/michaelpaoli 8h ago

changed the name of the 1st, the 2nd had the same name.

Probably best not to be changing the names on the interfaces. Or if you do, be quite cautious about how one does so, so they're consistently named throughout (e.g. via udev rules). Anyway, I commonly do that with udev rules, so the names remain consistent and persistent, so long as the hardware MAC address of the hardware interfaces don't change. And with that, even if, e.g. I add hardware, or reshuffle which interfaces are connected how to the mainboard, the names continue to persists and remain the same for the same interfaces (I got tired of 'em changing otherwise). If you otherwise rename things (or your hardware, or possibly even software changes), you may have issues or inconsistencies, and probably quite especially so if the names conflict.

So ... how did you go about changing the names exactly?

Note also, depending how renamed, interfaces may have aliases (additional names) for the same interface.

CentOS / Redhat and now using Rocky. Maybe that should help

Uhm, no, but that's not relevant for r/debian anyway.

So, e.g., I have, at least in part, within the /etc/udev/rules.d/70-persistent-net.rules file:

# REMEMBER: # update-initramfs -u -k all

# Any single wlan interface system:
SUBSYSTEM=="net", ACTION=="add", KERNEL=="wlan*", NAME="wlan0"

# balug: QEMU Standard PC (i440FX + PIIX, 1996) 08dcbe26-4c61-457b-9a6c-0ad01211b063
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="52:54:00:13:51:99", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="52:54:00:5e:c8:97", NAME="eth1"

I have much more in that file - use it on many hosts, but so long as there are no conflicts, it works on all of them. I have the hardwired Ethernet interfaces named by MAC addresses, and so long as the host has only a single wlan (generally Wi-Fi) interface, it will be named wlan0 (if I have more than one I'd need change that). Anyway, not the only way to do it, but one possible way to approach it. I do find it rather handy, e.g. I can have Debian installed on drive, and boot it physically, or boot it as a VM using that same drive as raw drive storage, and either way, even with changes in hardware and MAC addresses, I still get consistent network device names - so no need to reconfigured the host to deal with those hardware changes. Of course if I add/change MAC addresses on a host other than what I've already configured for, then yeah, I do need to reconfigure that, and generally reboot, as that needs be initialized rather early in the boot process - when the devices are set up via udev.

1

u/pelazas1 20m ago

Sounds like one connection profile with no device picked, so it covers both ports. Make two wired connections and set enp2s0 on one, enp3s0 on the other.