Trouble configuring network via systemd

Hello, we are having trouble with basic configuration of the wired network via systemctl. Assuming it’s something easy, but not obvious:

I have tried this procedure several times from a fresh 2.8b5 installation, and the results are the same, so it’s not a fat-finger issue.

steps:

opkg update
opkg install hostapd
opkg install dhcp-server
opkg install linux-firmware
systemctl disable connman
systemctl disable wpa_supplicant

l3afpad /usr/lib/systemd/network/wired.network& #!may also be in /etc/systemd instead of /usr/lib/systemd
{"
[Match]
Name=eth0

[Network]
DHCP=ipv4
DHCPServer=no
"}

l3afpad /usr/lib/systemd/network/rndis.network&
{"
[Match]
Name=usb0

[Network]
Address=10.157.1.1
Gateway=10.157.1.1
DNS=8.8.8.8
DHCPServer=no
"}

l3afpad /usr/lib/systemd/network/hostapd.network&
{"
[Match]
Name=wlan0

[Network]
Address=10.157.1.1
Gateway=10.157.1.1
DNS=8.8.8.8
DHCPServer=no
"}

The problem is that eth0 persistently boots to an IP of 10.157.1.1! I cannot see anywhere in the config that would make that happen!

issuing a “udhcpc eth0” command after boot sucessfuly places eth0 on the appropriate IP (192.168.222.xyz), so the connection is fine. We have no idea what else to try at this point! Our goal is to configure hostapd and gadget, but we cannot get past the basic configuration!

You may first want to disable connman which is used for Ethernet configuration by default on our images as e.g. mentioned here.

You’ll notice my 5th step above is to disable conman, and the 6th step is to disable wpa_supplicant. Your web interface doesn’t handle linefeeds properly, so perhaps it wasn’t obvious that we disabled this.

The problem lies either in our systemctl config files, or some other area of the system we are not yet aware of. These files are the only place 10.157.1.1 has been specified, so perhaps the “[Match]” command is improperly matching eth0 when it shouldn’t?

what’s the output of

journalctl -b 0 -u systemd-networkd

after boot?