[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: networking.service fails



	Hi.

It's pretty straightforward.

On Mon, Apr 04, 2022 at 02:38:39AM +0200, Dmitry Katsubo wrote:
> Dear Debian community,

First we have this - don't be confused by the "kernel's" timestamps,
systemd likes to add its own messages into the kernel's ringbuffer:

> Apr  4 00:37:28 debian kernel: [   10.804450] r8169 0000:02:00.0 eth0: renamed from enp2s0
> Apr  4 00:37:28 debian kernel: [   10.825386] r8169 0000:03:00.0 eth1: renamed from enp3s0
> Apr  4 00:37:28 debian kernel: [    1.082558] r8169 0000:03:00.0 eth1: RTL8168g/8111g, 00:17:20:53:44:58, XID 4c0, IRQ 32
> Apr  4 00:37:28 debian kernel: [    1.082560] r8169 0000:03:00.0 eth1: jumbo features [frames: 9194 bytes, tx checksumming: ko]
> Apr  4 00:37:28 debian kernel: [    1.083615] r8169 0000:02:00.0 enp2s0: renamed from eth0
> Apr  4 00:37:28 debian kernel: [    1.108937] r8169 0000:03:00.0 enp3s0: renamed from eth1

And next we see this:

> # ifdown -a --force; ifup -a -v
...
> ifup: unknown interface eth0
> ifup: unknown interface eth1

> Well, I use eth0/eth1 as I have renamed them from predictable network names via /etc/udev/rules.d/70-persistent-net.rules:
> 
> ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="00:17:e8:92:b7:77", KERNEL=="eth*", NAME="eth0"
> ACTION=="add", SUBSYSTEM=="net", ATTR{address}=="00:17:20:53:44:58", KERNEL=="eth*", NAME="eth1"

As /var/log/messages helpfully show, your udev rules work.
The problem is, next thing udev does is renaming your network interfaces
back to (Un)Predictable Naming™ scheme.

Thus whatever stanzas you have in your interfaces(5) about eth0 and eth1
fail, thus the whole networking.service fails.


The conclusion is simple too:

1) Remove 70-persistent-net.rules, it's not doing what it should anyway.

2) Either use (Un)Predictable Network names in your interfaces, such as
enp2s0 and enp3s0.

3) Or use systemd network link files to rename network interfaces.

4) Or add "net.ifnames=0" to kernel's cmdline, as others suggested.

Reco


Reply to: