I have a rpi3b+ running latest os as headless with everything up to date and I use systemd-networkd for networking on it. I'm trying to connect a LTE usb modem to it for wan access. For that I use mbim-utils. Upon starting network with mbim at wwan0
with
#mbim-network /dev/cdc-wdm0 start
#mbimcli -d /dev/cdc-wdm0 -p --query-ip-configuration (1)
its gives the ip address and gateway like
IP: x.x.x.x/y
Gateway: x.x.x.z (2)
Normally I'd manually up the interface and configure the IP and gateway to enable wan access as follows.
#ip link set dev wwan0 up
#ip addr add x.x.x.x/y dev wwan0
#ip addr route default via x.x.x.z dev wwan0 (3)
This works on my linux machine and the rpi as well. But I want to configure it with systemd-networkd. So tried by connecting the modem to its registered network with commands in block (1)
and created a new network file at /etc/systemd/network/wwan0.network
and put in the assigned static IP
[Match]
Name=wwan0
[Network]
Address=x.x.x.x/y
Gateway=x.x.x.z
IPForward=yes (4)
and then restarted the systemd-networkd.service
, but this didn't work as I couldn't ping any wan IPs. How to get wan access by configuring it with systemd-networkd?
ip link
andip addr
say?wwan0.network
file and then add the output of the commands what goldilocks suggested and also fromsystemctl status systemd-networkd.service
.