I am trying to move from connman network management to systemd-networkd. I followed the procedure found here, manually removing connman and adding the following file as /etc/systemd/network/wired.network per the instructions:
root@apalis-t30:~# cat /etc/systemd/network/wired.network
[Match]
Name=enp1s0
[Network]
Address=192.168.1.10/24
Gateway=192.168.1.1
DNS=8.8.8.8
However, when I restart the board, enp1s0 doesn’t show up when I do an ifconfig
. I verified that I was using the proper name by running ip link:
root@apalis-t30:~# ip link
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 16436 qdisc noqueue
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: enp1s0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop qlen 1000
link/ether 00:14:2d:29:3a:f0 brd ff:ff:ff:ff:ff:ff
3: dummy0: <BROADCAST,NOARP> mtu 1500 qdisc noop
link/ether b2:9d:bd:2d:31:e4 brd ff:ff:ff:ff:ff:ff
4: ip6tnl0: <NOARP> mtu 1452 qdisc noop
link/tunnel6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
5: rndis0: <BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast qlen 1000
link/ether fe:80:e4:f0:45:ac brd ff:ff:ff:ff:ff:ff
then checked the status using networkctl:
root@apalis-t30:~# networkctl status
● State: no-carrier
Address: 192.168.1.10 on enp1s0
192.168.11.1 on rndis0
DNS: 8.8.8.8
Clearly I’m not wiring something up correctly, but I can’t quite figure out what. I’ve scoured the questions and found some hints along the way, but nothing that solved my problem. Any insights into what I could be doing wrong?
One other tidbit of [probably important] information. Here’s what I get when I check status on the networkd service:
root@apalis-t30:~# systemctl status systemd-networkd
● systemd-networkd.service - Network Service
Loaded: loaded (/lib/systemd/system/systemd-networkd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2018-09-26 20:46:24 UTC; 4h 38min ago
Docs: man:systemd-networkd.service(8)
Main PID: 341 (systemd-network)
Status: "Processing requests..."
CGroup: /system.slice/systemd-networkd.service
└─341 /lib/systemd/systemd-networkd
Sep 26 20:46:24 apalis-t30 systemd[1]: Starting Network Service...
Sep 26 20:46:24 apalis-t30 systemd-networkd[341]: Enumeration completed
Sep 26 20:46:24 apalis-t30 systemd-networkd[341]: enp1s0: IPv6 enabled for interface: Success
Sep 26 20:46:24 apalis-t30 systemd-networkd[341]: enp1s0: Could not bring up interface: Invalid argument
Sep 26 20:46:24 apalis-t30 systemd[1]: Started Network Service.
I’m guessing the “Invalid argument” message is important… Haven’t been able to figure out what argument it is yet though, despite an intense session with google, although I did see some chatter about the kernel not always having all the features networkd is looking for. I know we’re running an older kernel on the Apalis T30 (v3.1.10), so could that be a problem?
Possibly the same bug was reported here, but doesn’t look like any activity in two years. Just out of curiosity, was networkd ever tried out on the Apalis T30?
hi @kenobi923
Could you share your complete dmesg log? Did you remove connman as described here?
Yes, as mentioned at the top of the original post, I used that article as a guide. I manually removed the connman packages with
opkg remove connman --force-removal-of-dependent-packages
added the file /etc/systemd/network/wired.network for static ip
[Match]
Name=eth0
[Network]
Address=192.168.1.10/24
Gateway=192.168.1.1
DNS=8.8.8.8
finally rebooting my machine. That’s where the original post picks up.
Complete dmsg.log is enclosed.link text
Unfortunately you’re right, kernel used on Apalis T30 (3.1) is not supported by networkd.
“Could not bring up interface: Invalid argument” is an expected result in this case.
My application has a requirement of existing on networks where DHCP may not be present, in which case all network settings will need to be static and assigned manually. Your article re: connman does not include an example of how to easily do that, and existing information on manual configuration of connman is sketchy at best, especially regarding what config files are to be used for such a scenario. Can you make any recommendations?
My apologies, I misspoke. Your article does in fact talk about how to assign static information using connman. What I was looking for were config files that I could edit in place and on the fly. I think I can just use the connmanctl to do what I need to do.