Wrong DNS forwarded from EXS62-W to host Linux OS | Telit Cinterion IoT Developer Community
November 3, 2023 - 10:10am, 410 views
Hi all,
we just integrated an EXS62-W module into our product (running Yocto Linux) to have internet access.
After configuring the EXS62-W module, the internet access gets established properly, so our product has internet access. We use the WWAN interface of the module, activating it with the AT^SWWAN command.
On the Yocto side, the network interface has the 192.168.255.20 IP address (looks good, this static IP is also mentioned in the AT command specification). After executing the AT+CGCONTRDP command, we see that the module also got IP+DNS addresses from the network provider. All looks good.
However, we observed that the Yocto OS received 192.168.255.1 as a DNS IP from the phone module and this is not the one that is visible by the AT+CGCONTRDP command. This also causes a problem with our product since the DNS name resolution either does not work or it takes too much time.
If we manually take the DNS IPs from the AT+CGCONTRDP and set them in Yocto then the DNS name resolution works fast.
So looks like the DNS IPs are not "forwarded" from the phone to the Yocto during the DHCP negotiation.
We use NetworkManager in Yocto and in the detailed logs we also see that the DNS address we receive during the DHCP negotiation is 192.168.255.1.
We are not completely sure if the received DNS IP correct or not, but for sure that the DNS name resolution takes too much time with this IP, however if we set the DNS IPs from the AT+CGCONTRDP answer then the name resolution is fast.
Thanks for you comments and help!
Hello,
So, the module's DHCP always assigns 192.168.255.20 to the connected system (which is described) and 192.168.255.1 is the module's local IP and probably also the gateway provided to your system. And as DNS address it also provides the gateway address. Since the outbound traffic always goes thru 192.168.255.1 and the module knows the DNS addresses, we could assume that this is correct so far.
But if this introduces additional delays or even the address resolution fails, this doesn't look correct.
Could you also provide the module's firmware version (ATI1 reply)? I'll try to get some information.
BR,
Bartłomiej
Hi Bartłomiej,
thanks for the answer.
This is the output of the ATI1 command:
ati1
Cinterion
EXS62-W
REVISION 01.400
A-REVISION 01.000.04
Does this mean that the phone somehow recognizes that the incoming messages are "DNS name resolution request messages" so it will forward/route these messages to the proper DNS servers (assigned by the network provider)?
I would also have another question: in our product, we run a TCP server. This server listens on the 0.0.0.0 address. As I know this means "listen on all IP available". Our issue is that this server is not reachable if we would like to connect to it by using the IP address we got from the network provider (output of the AT+CGCONTRDP command). Note, in our product the TCP server port is configurable by the user, it could be anything, except some well-known-ports.
Is there any port-forwarding we need to enable on the phone? Or how does the phone know that it should forward the packets to our device which runs the TCP server?
Hello,
Let me clarify the DNS issue with R&D. I'll write back when I have more information.
As for the server on your device, there is any port forwarding configuration on the module. So, I believe that anything that comes to the public IP address of the module's WWAN connection, should be forwarded to your device. Just this IP assigned by MNO should be accessible from internet and your MNO should not block the inbound traffic.
BR,
Bartłomiej
Hi,
thanks for asking R&D.
Regarding the server issue: so we should think of the phone module that there is a little router/NAT inside which by default forwards all the packets regardless of the port.
In the AT command specification, we did not find any command to configure this forwarding functionality, then I guess it is not configurable, right?
When we ping our device over the phone's public IP, we get a response. We were not sure if the phone itself replied to the ping or our Linux device. For this, we used a tool to dump ICMP messages (tcpdump) and we did not see the requests and replies. Then we also disabled the ping responses in our Linux device. We still got ping responses. So we think that the phone itself replies to the ping.
Hello,
There are no configurable routing options. 192.168.255.20 is always assigned to the host and 192.168.255.1 is a gateway and also assigned as DNS address. For now I know from R&D that this functionality with IP addresses is not designed by us but provided by the chip vendor. So, it could take more time to clarify what's inside. It would be the same with this ping reply.
BR,
Bartłomiej