M95 cgpaddr vs qilocip

I was wondering if anyone can explain why there is a difference in the IP address that is returned by at+cgpaddr & at+qilocip.
i notice that at+cgpaddr returns the same address that i see in at+cgdcont.

i also noticed that the address that a remote server sees when the modem connects to it is the one returned by at+qilocip.

thanks in advance.

Hi Moose:
AT+QILOCIP queries the address of the TCPIP built-in protocol stack,AT+CGPADDR queries the address of the external protocol stack.

Hi Winnie - thanks for responding.
Yes, i read that but i dont understand the concept of getting 2 IP addresses for the same device.
if AT+CGPADDR queries the external stack then presumably the IP address is issued by the network.
And if AT+QILOCIP queries the built-in stack and the built-in stack cannot issue its own IP address, so it must also get it from the network. So if that is the case, then why does it not match the address from CGPADDR??
As it is, the address returned by QILOCIP is the address the remote server sees therefore that must be the correct address. And that being the case, why does CGPADDR not get updated with the correct address??

Alas, more questions than answers…

These two at commands query different cid addresses.
When using a module’s embedded stacks like TCP and UDP protocol, you need to use AT+QILOCIP to check the ip address. While using PPP, you need to use AT+CGPADDR to check the ip address.

Thank you…now why doesnt the manual say that!!!