Hi @valdezleo063,
You must add a default route to exit via the gateway.
The ip addr add 10.10.10.13/24 dev wwan0 command only adds the local subnet route (10.10.10.0/24).
However, for access to the internet or a remote host, you must define a default route:
sudo ip route add default via 10.10.10.1
Simply adding an IP address and route doesn’t guarantee a connection.
The module needs to open a PDP context/data session. The MBIM/QMI stack normally handles this automatically (you obtain the IP address with dhclient).
Your SIM profile doesn’t have DHCP; you’re using a static IP address. In this case, you need to activate PDP with AT commands:
# APN setting
AT+CGDCONT=1,"IP","5Gnetwork"
# PDP activate
AT+CGACT=1,1
Then you can manually assign the IP on the Linux side:
sudo ip link set wwan0 up
sudo ip addr add 10.10.10.13/24 dev wwan0
sudo ip route add default via 10.10.10.1
“I can’t ping 10.10.10.1.” This could be due to several reasons.
PDP might not be active, or the modem might not have actually opened the data channel to the network.
A firewall/APN restriction might be the cause, or IP forwarding or ICMP might be disabled on the 5G SA network.
This could be a wrong interface issue. Sometimes it opens with a name like wwp0sxxuYcZ. You can check it with an IP link.
I can suggest something like this:
Create a file like /usr/local/sbin/5g-static.sh:
#!/bin/bash
DEV=wwan0
IP=10.10.10.13/24
GW=10.10.10.1
DNS=8.8.8.8
# Open PDP from modem first
# Run on AT port: AT+CGDCONT=1,"IP","5Gnetwork"
# AT+CGACT=1.1
sudo ip link set $DEV up
sudo ip addr flush dev $DEV
sudo ip addr add $IP dev $DEV
sudo ip route add default via $GW
echo "nameserver $DNS" | sudo tee /etc/resolv.conf > /dev/null
When you add an IP address, only the subnet route appears; the default route is also required.
The PDP context must be opened (AT+CGACT).
Since it’s a static IP address, the DHCP client (dhclient, udhcpc) will not take any action.
Frankly, it’s a difficult problem, and without the hardware, it’s difficult to find a complete solution. It takes some experimentation.