Skip to contentSkip to conversation

ifupdown with systemd

DISCUSSION [email protected] 2 participants 2 messages Feb 27, 2025

lore
Share & tools
lore
#0 lore raw

Hello

I'm using Yocto (Scarthgap) on a Raspberry Pi CM4 with ifupdown and init-ifupdown included in my image. The system uses systemd as the init manager.

It seems that the init scripts for ifupdown are not executed in a systemd environment. My /etc/network/interfaces file is as follows:

# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

However, after a reboot, eth0 remains down:

# ip a show eth0
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
    link/ether d8:3a:dd:a8:b6:52 brd ff:ff:ff:ff:ff:ff
    altname end0

Checking systemctl shows:

# systemctl status networking
* networking.service - LSB: Raise network interfaces.
     Loaded: loaded (/etc/init.d/networking; generated)
     Active: inactive (dead)
       Docs: man:systemd-sysv-generator(8)

I have to manually run ifup eth0 to bring up the interface. Is this expected behavior, or is there a service I need to enable to automate this?

Maybe also any other recommendation for a Network Manager, best with a high-level API?

Thanks

Benjamin

#1 lore raw
Quoted 27 lines · Benjamin Marty via lists.yoctoproject.org

Hello

I'm using Yocto (Scarthgap) on a Raspberry Pi CM4 with ifupdown and init-ifupdown included in my image. The system uses systemd as the init manager.

It seems that the init scripts for ifupdown are not executed in a systemd environment. My /etc/network/interfaces file is as follows:

# cat /etc/network/interfaces
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp

However, after a reboot, eth0 remains down:

# ip a show eth0
2: eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group
default qlen 1000
    link/ether d8:3a:dd:a8:b6:52 brd ff:ff:ff:ff:ff:ff
    altname end0

Checking systemctl shows:

# systemctl status networking
* networking.service - LSB: Raise network interfaces.
     Loaded: loaded (/etc/init.d/networking; generated)
     Active: inactive (dead)
       Docs: man:systemd-sysv-generator(8)
Quoted 4 lines

I have to manually run ifup eth0 to bring up the interface. Is this expected behavior, or is there a service I need to enable to automate this?

Maybe also any other recommendation for a Network Manager, best with a high-level API?

systemd-networkd?

Signature · 1 line
Alex Kiernan