PHS8-E / PLS8-E subnet mask issue | Telit Cinterion IoT Developer Community
October 30, 2015 - 2:35pm, 4626 views
Hello,
our company is using mobile modules in our devices. We have switched from Sierra to Cinterion and we are having some issues when connecting to mobile network.
When obtaining IP address from ISP, our subnet mask is 255.255.255.252 and sometimes 255.255.255.240. With same SIM cards in Sierra modules we get 255.255.255.0.
Since we get 255.255.255.252 we sometimes have overlap of subnets and therefore our devices cannot comunicate (ping etc).
We are writting our own embeded software, so we are sure its not the code that it manipulating subnet mask.
Our code does the following AT commands:
send_at_command('AT+CGATT=1')
send_at_command('ATZ')
send_at_command('AT&F')
send_at_command('ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0')
send_at_command('AT+CGDCONT=17,"IP","' .. apn .. '"')
send_at_command('AT^SGAUTH=17,' .. papchap .. ',' .. user.. ',' .. pass )
send_at_command('AT+CGACT=1,17')
Then we check IP address in a loop with:
send_at_command('AT+CGPADDR=17')
And afer that we use dhclient Linux software to place IP address on our ppp_0 interface.
To repeat and conclude, same hardware, same software, different modules (Sierra and Cinterion) we get different subnet masks (but same IP address).
Does anyone have some ideas?
Thank you in advance,
Igor.
Hello,
Could you write more details? How you get the subnet mask? In fact in ppp connections there are no masks needed.
On the other hand context definition no. 17 is dedicated for the WWAN interface.
Regards,
Bartłomiej
Thanks for answering :)
Actually i wanted to add some more details, we do get it with 17 (WWAN interface) but our application renames it to ppp_0 (because of some old code) without actually changing anything but the name.
We get the IP using linux dhclient application which is not altered in any way, there is a dhclient.rc script in init.d which is plain start/stop/restart rc script, when starting it uses /etc/dhclient.conf and puts ip address, subnet mask, dns... to /var/lib/dhclient leases file.
When reading that file we see the same as with ifconfig, subnet mask is /30
dhclient.conf has only
# cat /etc/dhclient.conf
timeout 60;
retry 30;
reboot 10;
select-timeout 5;
initial-interval 2;
Same thing with PLS8-E and with content 1 on PLS8-E (ppp).Code from PLS8-E function: send_at_command('AT+CGATT')
send_at_command('ATZ')
send_at_command('AT&F')
send_at_command('ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0')
send_at_command('AT+CGDCONT=1,"IP","' .. apn .. '"')
send_at_command('AT^SGAUTH=1,1,' .. user.. ',' .. pass )
send_at_command('AT^SWWAN=1,1')
at_res = send_at_command('AT+CGCONTRDP=1')
Hello,
Have you tried to ask the network operator about the subnets?
Have you tested static configuration of IP and mask? How does the connection behave then?
Can you provide ATI1 replies form the modules?
Regards,
Bartłomiej
Hello Bartolomiej
no we havent tested static configuration, line works like this, but we get overlaps of subnets on two routers where SIM cards have IP addresses which are near. SIM cards allways get the same IP (private - 172.27...) but with Sierra module they get 255.255.255.0 subnet, and in Cinterion it is 255.255.255.252 and for one SIM its allways 255.255.255.240
So when we have IP addresses as 172.27.234.50 and 172.27.234.52 they work well with /24 subnet, but when we get 172.24.234.50/30 and 172.27.234.52/30, then the .52 overlaps with broadcast IP of .50 and those SIMs cannot communicate.
We havent contacted the ISP because the ISP...well you know them, you cannot reach engineers, only call center, and what to ask them, Im pretty sure they dont know what Sierra and what Cinterion is, but we doplan to raise that issue with them.
Here is the output of ATI1 comand:
ATI1
Cinterion
PHS8-E
REVISION 03.001
A-REVISION 01.001.07
OK
Hello,
I've checked with my PLS8 module and Windows system. I was able to get 255.255.255.240 or 255.255.255.248 masks.
Have you tried to trace with Wireshark? It looks like this mask is coming in DHCP offer. But I was unable to see what is sent in request. Maybe you'll be able to catch some differences between two modules.
Regards,
Bartłomiej
Thank you for your time.
Did you get those masks automaticly from DHCP server?
I dont know how to wireshark those packets, because it is physically a router, motherboard with elements welded to it, one of those is mobile module, recognised as a USB device, and we run embedded software on it (boot loader, rootfs, kernel...) so actually every funcionality has to be written by us manually :)
So we have problems when we want to capture packets from 2G/3G/4G network, we can only use tcpdump but it is poor and doesnt work well.
How did you catch packets, how is your module connected to the device where you catch packets?
Hello,
So you don't have any separate module just the whole board..
I've seen these masks in the DHCP Offer packet caught by Wireshark.
I thought that you were using Linux PC - in that case there would be no problem with using Wireshark.
I've been using the Windows PC with the module connected on USB.
Dhcpdump would be better than tcpdump if it would be possible to run it on your system.
Regards,
Bartłomiej