BG95 DNS not working on OpenWRT System

Problem summary:
DNS works via AT ping command but fails when using the network interface within OpenWRT.

Description:
We are using a BG95 module for cellular connection in an OpenWRT system. Using AT commands, I can successfully ping www.google.com as follows:

AT+QPING=1,"www.google.com"

OK

+QPING: 0,"142.251.167.99",32,41,255

+QPING: 0,"142.251.167.99",32,79,255

+QPING: 0,"142.251.167.99",32,78,255

+QPING: 0,"142.251.167.99",32,79,255

+QPING: 0,4,4,0,41,79,69

However, in OpenWRT I can ping IP addresses using a shell but when I try a host name, I get the following:

#public ip of www.google.com
root@OpenWrt:~# ping 142.251.167.147
PING 142.251.167.147 (142.251.167.147): 56 data bytes
64 bytes from 142.251.167.147: seq=0 ttl=105 time=307.392 ms
64 bytes from 142.251.167.147: seq=1 ttl=105 time=114.614 ms
64 bytes from 142.251.167.147: seq=2 ttl=105 time=90.152 ms
--- 142.251.167.147 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss


root@OpenWrt:~# ping www.google.com
ping: bad address 'www.google.com'

I have configured the BG95 in ‘ECM’ mode using

AT+QCFGEXT="usbnet","ecm"

and the interface in question is eth1 in OpenWRT:

eth1      Link encap:Ethernet  HWaddr XX.XX.XX.XX.XX.XX
          inet addr:192.168.225.20  Bcast:192.168.225.255  Mask:255.255.255.0
          inet6 addr: fe80::xxxx:xxxx:xxxx:xxxx/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:29 errors:0 dropped:0 overruns:0 frame:0
          TX packets:33 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1824 (1.7 KiB)  TX bytes:2886 (2.8 KiB)

I am relatively new to both OpenWRT and cell modems so there’s a lot I don’t know :slight_smile:
If anyone could explain why DNS might not be working when using OpenWRT but is working from the BG95 itself, that would be very helpful.

I suggest you asking a question at OpenWrt forum.