Raspberry Pi 5 Cannot get DNS to work with Sixfab LTE Hat

I have a Raspberry Pi 5 with the latest OS build (Kernel 6.6.20+rpt-rpi-2712). I have a Quectel EC25 cellular module hat plugged into the pi using QMI mode. The modem connects successfully to the network and udhcpc assigns an ip address to the wwan0 interface. The problem is that I cannot get DNS to work. I have no other networking connections to the Pi ( no wifi and no ethernet ). Through the wwan0 interface, I can ping 8.8.8.8 - but not google.com.

I was unable to get NetworkManager to work and so I disabled it and installed systemd-networkd and systemd-resolved.

There is a default route through wwan0, and /etc/resolv.conf has 8.8.8.8 setup as a DNS server. Furthermore, resolvectl shows that the interface could be using 8.8.8.8 for DNS. How can I get DNS to work through the working wwan0 internet connection? Thanks.

Modem:

pi@raspberrypi:~/Desktop $ lsusb
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 003: ID 046d:c52b Logitech, Inc. Unifying Receiver
Bus 003 Device 002: ID 2c7c:0125 Quectel Wireless Solutions Co., Ltd. EC25 LTE modem

Connection script:

pi@raspberrypi:~/Desktop $ cat connect-cellular.sh
sudo ip link set wwan0 down
echo 'Y' | sudo tee /sys/class/net/wwan0/qmi/raw_ip
sudo ip link set wwan0 up
sudo qmicli -p -d /dev/cdc-wdm0 --device-open-net='net-raw-ip|net-no-qos-header' --wds-start-network="apn='super',ip-type=4" --client-no-release-cid
sudo udhcpc -q -f -i wwan0

Connection output:

pi@raspberrypi:~/Desktop $ ./connect-cellular.sh
Y
[/dev/cdc-wdm0] Network started
        Packet data handle: '2269121952'
[/dev/cdc-wdm0] Client ID not released:
        Service: 'wds'
            CID: '17'
udhcpc: started, v1.35.0
Dropped protocol specifier '.udhcpc' from 'wwan0.udhcpc'. Using 'wwan0' (ifindex=3).
udhcpc: broadcasting discover
udhcpc: broadcasting select for 100.84.137.75, server 100.84.137.76
udhcpc: lease of 100.84.137.75 obtained from 100.84.137.76, lease time 7200
Dropped protocol specifier '.udhcpc' from 'wwan0.udhcpc'. Using 'wwan0' (ifindex=3).

Interface:

> pi@raspberrypi:~/Desktop $ ifconfig  wwan0
wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 100.84.137.75  netmask 255.255.255.248  destination 100.84.137.75
        unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00  txqueuelen 1000  (UNSPEC)
        RX packets 7  bytes 1425 (1.3 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 147  bytes 14394 (14.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

Ping:

> pi@raspberrypi:~/Desktop $ ping -I wwan0 google.com
PING google.com (142.251.32.14) from 100.84.137.75 wwan0: 56(84) bytes of data.
^C
--- google.com ping statistics ---
5 packets transmitted, 0 received, 100% packet loss, time 4101ms

pi@raspberrypi:~/Desktop $ ping -I wwan0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 100.84.137.75 wwan0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=113 time=151 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=113 time=164 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=113 time=204 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2002ms
rtt min/avg/max/mdev = 150.517/172.688/203.546/22.503 ms

Route:

pi@raspberrypi:~/Desktop $ ip route
default via 100.84.137.76 dev wwan0
100.84.137.72/29 dev wwan0 proto kernel scope link src 100.84.137.75

pi@raspberrypi:~/Desktop $ route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         _gateway        0.0.0.0         UG    0      0        0 wwan0
100.84.137.72   0.0.0.0         255.255.255.248 U     0      0        0 wwan0

Resolvectl:

pi@raspberrypi:~/Desktop $ resolvectl status
Global
       Protocols: +LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported
resolv.conf mode: stub

Link 2 (eth0)
Current Scopes: none
     Protocols: -DefaultRoute -LLMNR +mDNS -DNSOverTLS DNSSEC=no/unsupported

Link 3 (wwan0)
    Current Scopes: DNS LLMNR/IPv4
         Protocols: +DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported
Current DNS Server: 8.8.4.4
       DNS Servers: 8.8.4.4 8.8.8.8

Link 4 (wlan0)
Current Scopes: none
     Protocols: -DefaultRoute +LLMNR -mDNS -DNSOverTLS DNSSEC=no/unsupported

Hi,

Make sure that the DNS servers are correctly configured. You mentioned that /etc/resolv.conf has 8.8.8.8 set up as a DNS server, which seems correct. However, double-check that there are no syntax errors or typos in the configuration file.

Sometimes, restarting the systemd-resolved service can resolve DNS-related issues. You can do this by running the following command:

sudo systemctl restart systemd-resolved

After restarting the systemd-resolved service, try to resolve domain names using the nslookup command to see if DNS resolution is working:

nslookup google.com

If DNS resolution is successful, you should see the IP address(es) associated with the domain name.

Hi - I have double checked that there are no syntax errors in /etc/resolv.conf.

I tried a different board that I had with a PCIe Quectel EC25 modem and it can ping google through that interface. I double checked everything I could think of between that one and the Sixfab hat - and found no errors. But the Sixfab one cannot ping google ( please see the output below as a comparison of the routes and everything else between the two ).

Could this be a service level DNS thing not related to the actual Linux configuration?

Working other board:

root@imx8:~# qmicli -d /dev/cdc-wdm0 --wds-get-current-settings
[/dev/cdc-wdm0] Current settings retrieved:
IP Family: IPv4
IPv4 address: 10.204.79.165
IPv4 subnet mask: 255.255.255.252
IPv4 gateway address: 10.204.79.166
IPv4 primary DNS: 8.8.8.8
IPv4 secondary DNS: 8.8.4.4
MTU: 1500
Domains: none
root@iot-gate-imx8plus:~#
root@iot-gate-imx8plus:~# ifconfig wwan0
wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1500
inet 10.204.79.165 netmask 255.255.255.252 destination 10.204.79.165
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 1538 bytes 197923 (193.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1374 bytes 171063 (167.0 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@iot-gate-imx8plus:~# ip route
default via 10.204.79.166 dev wwan0 metric 10
10.2.0.0/16 dev wg0 scope link
10.204.79.164/30 dev wwan0 proto kernel scope link src 10.204.79.165
root@iot-gate-imx8plus:~#
root@iot-gate-imx8plus:~# ping google.com
PING google.com (142.250.180.14) 56(84) bytes of data.
64 bytes from lhr25s32-in-f14.1e100.net (142.250.180.14): icmp_seq=1 ttl=112 time=236 ms
64 bytes from lhr25s32-in-f14.1e100.net (142.250.180.14): icmp_seq=2 ttl=112 time=275 ms
64 bytes from lhr25s32-in-f14.1e100.net (142.250.180.14): icmp_seq=3 ttl=112 time=243 ms
64 bytes from lhr25s32-in-f14.1e100.net (142.250.180.14): icmp_seq=4 ttl=112 time=274 ms
^C
google.com ping statistics —
4 packets transmitted, 4 received, 0% packet loss, time 3003ms
rtt min/avg/max/mdev = 236.348/257.205/275.411/17.489 ms
root@iot-gate-imx8plus:~# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
search .

Sixfab HAT on Raspberry Pi:

root@raspberrypi:/home/pi/Desktop# qmicli -d /dev/cdc-wdm0 --wds-get-current-settings
[/dev/cdc-wdm0] Current settings retrieved:
IP Family: IPv4
IPv4 address: 100.75.157.67
IPv4 subnet mask: 255.255.255.248
IPv4 gateway address: 100.75.157.68
IPv4 primary DNS: 8.8.4.4
IPv4 secondary DNS: 8.8.8.8
MTU: 1360
Domains: none
root@raspberrypi:/home/pi/Desktop#
root@raspberrypi:/home/pi/Desktop# ifconfig wwan0
wwan0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST> mtu 1360
inet 100.75.157.67 netmask 255.255.255.248 destination 100.75.157.67
inet6 fe80::b750:b71f:6494:4e58 prefixlen 64 scopeid 0x20
unspec 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 txqueuelen 1000 (UNSPEC)
RX packets 153 bytes 16644 (16.2 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 47348 bytes 8168507 (7.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

root@raspberrypi:/home/pi/Desktop#
root@raspberrypi:/home/pi/Desktop# ip route
default via 100.75.157.68 dev wwan0 metric 10
100.75.157.64/29 dev wwan0 proto kernel scope link src 100.75.157.67
root@raspberrypi:/home/pi/Desktop#
root@raspberrypi:/home/pi/Desktop# ping -I wwan0 -W 3 -C 3 google.com
PING google.com (142.251.163.100) from 100.75.157.67 wwan0: 56(124) bytes of data.
^C
google.com ping statistics —
19 packets transmitted, 0 received, 100% packet loss, time 18431ms

root@raspberrypi:/home/pi/Desktop#
root@raspberrypi:/home/pi/Desktop# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=115 time=118 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=115 time=116 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=115 time=115 ms
^C
— 8.8.8.8 ping statistics —
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 115.051/116.219/117.650/1.077 ms
root@raspberrypi:/home/pi/Desktop# cat /etc/resolv.conf
nameserver 8.8.8.8
nameserver 8.8.4.4
search .

I installed tshark, and then monitored wwan0 while I tried to ping google in a different terminal. It is interesting that the DNS response is received on the interface, but the ping then is never responded to.

root@raspberrypi:/home/pi/Desktop# tshark -i wwan0
Running as user “root” and group “root”. This could be dangerous.
Capturing on ‘wwan0’
** (tshark:456216) 20:56:56.160995 [Main MESSAGE] – Capture started.
** (tshark:456216) 20:56:56.161146 [Main MESSAGE] – File: “/tmp/wireshark_wwan05F4ZL2.pcapng”
1 0.000000000 100.75.157.67 → 8.8.8.8 DNS 56 Standard query 0x4501 A google.com
2 0.000025703 100.75.157.67 → 8.8.8.8 DNS 56 Standard query 0x6c0c AAAA google.com
3 0.287190564 8.8.8.8 → 100.75.157.67 DNS 168 Standard query response 0x6c0c AAAA google.com AAAA 2607:f8b0:4004:c1b::8b AAAA 2607:f8b0:4004:c1b::71 AAAA 2607:f8b0:4004:c1b::66 AAAA 2607:f8b0:4004:c1b::8a
4 0.287191675 8.8.8.8 → 100.75.157.67 DNS 152 Standard query response 0x4501 A google.com A 142.251.163.138 A 142.251.163.102 A 142.251.163.101 A 142.251.163.100 A 142.251.163.113 A 142.251.163.139
5 0.287529002 100.75.157.67 → 142.251.163.138 ICMP 84 Echo (ping) request id=0xb5fb, seq=1/256, ttl=64