PPP phase dead every 2 hours

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

PPP phase dead every 2 hours

Nishant Agrawal
Hello,

I am using the ppp stack, using a modem to keep a device online and it is sending ping requests every 30 seconds. The problem is that roughly every 2 hours, I end up with error, PPPERR_CONNECT. The phase change generally is as follows,

PHASE_NETWORK
PHASE_ESTABLISH
PHASE_DISCONNECT
PHASE_DEAD

The PHASE_NETWORK and ESTABLISH happens simultaneously. PHASE_DISCONNECT happens about 5 seconds later and the phase goes to DEAD immediately as well. After PHASE_DEAD, I get the error, PPPERR_CONNECT. I believe that the issue is related to the IP lease time. Because the time is more or less consistent and I am seeing the same pattern with 2 different prototypes that are on test. And every time I reconnect I get a new IP. So my question is, is there any way for me to request a renew of the old connection, like something that can be done with DHCP. Or what I can I do to keep the device connected?


--
With Regards,
Nishant Agrawal


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPP phase dead every 2 hours

Sylvain Rochet
Hi Nishant,

On Thu, Jun 21, 2018 at 12:37:09PM +0545, Nishant Agrawal wrote:

> Hello,
>
> I am using the ppp stack, using a modem to keep a device online and it is
> sending ping requests every 30 seconds. The problem is that roughly every 2
> hours, I end up with error, PPPERR_CONNECT. The phase change generally is
> as follows,
>
> PHASE_NETWORK
> PHASE_ESTABLISH
> PHASE_DISCONNECT
> PHASE_DEAD
>
> The PHASE_NETWORK and ESTABLISH happens simultaneously. PHASE_DISCONNECT
> happens about 5 seconds later and the phase goes to DEAD immediately as
> well. After PHASE_DEAD, I get the error, PPPERR_CONNECT.
That's the normal clean disconnection behavior. I believe the peer sent
you a LCP TermReq request. Could you check that ? (Using PPP_DEBUG and
PRINTPKT_SUPPORT support).


> I believe that the issue is related to the IP lease time. Because the
> time is more or less consistent and I am seeing the same pattern with
> 2 different prototypes that are on test. And every time I reconnect I
> get a new IP. So my question is, is there any way for me to request a
> renew of the old connection, like something that can be done with
> DHCP.

This is no such renew thing in PPP. If the peer change your local IP
address it means it really want to change it or just they don't care at
all and give a random one each time you connect.

There is no such thing of IP lease time as well, if a peer disconnect
you every two hours it means the peer want you to reconnect every two
hours.

However, you could try with another modem brand/model, I doubt the issue
is on the modem side (once in a while :p) but some of them are,
especially cellular ones, are doing stupid things or just full of bugs.


> Or what I can I do to keep the device connected?

Well, ask your ISP to stop disconnecting you every two hours :-)


Sylvain

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users

signature.asc (188 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: PPP phase dead every 2 hours

Ajay Bhargav (SiWi)

Hi Nishant,

 

It is normal for network providers to close PDP context. And 2hrs seems to be common duration as per what I have tested. All you can do is simply reconnect. Moreover IP provided by most service providers are not public so you wont be able to run a server in most cases and IP will change all the time for sure.

 

Regards,

Ajay B.

 

 

From: [hidden email]
Sent: Thursday, June 21, 2018 2:19 PM
To: [hidden email]
Subject: Re: [lwip-users] PPP phase dead every 2 hours

 

Hi Nishant,

 

On Thu, Jun 21, 2018 at 12:37:09PM +0545, Nishant Agrawal wrote:

> Hello,

>

> I am using the ppp stack, using a modem to keep a device online and it is

> sending ping requests every 30 seconds. The problem is that roughly every 2

> hours, I end up with error, PPPERR_CONNECT. The phase change generally is

> as follows,

>

> PHASE_NETWORK

> PHASE_ESTABLISH

> PHASE_DISCONNECT

> PHASE_DEAD

>

> The PHASE_NETWORK and ESTABLISH happens simultaneously. PHASE_DISCONNECT

> happens about 5 seconds later and the phase goes to DEAD immediately as

> well. After PHASE_DEAD, I get the error, PPPERR_CONNECT.

 

That's the normal clean disconnection behavior. I believe the peer sent

you a LCP TermReq request. Could you check that ? (Using PPP_DEBUG and

PRINTPKT_SUPPORT support).

 

 

> I believe that the issue is related to the IP lease time. Because the

> time is more or less consistent and I am seeing the same pattern with

> 2 different prototypes that are on test. And every time I reconnect I

> get a new IP. So my question is, is there any way for me to request a

> renew of the old connection, like something that can be done with

> DHCP.

 

This is no such renew thing in PPP. If the peer change your local IP

address it means it really want to change it or just they don't care at

all and give a random one each time you connect.

 

There is no such thing of IP lease time as well, if a peer disconnect

you every two hours it means the peer want you to reconnect every two

hours.

 

However, you could try with another modem brand/model, I doubt the issue

is on the modem side (once in a while :p) but some of them are,

especially cellular ones, are doing stupid things or just full of bugs.

 

 

> Or what I can I do to keep the device connected?

 

Well, ask your ISP to stop disconnecting you every two hours :-)

 

 

Sylvain

 


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: PPP phase dead every 2 hours

Nishant Agrawal
Thanks a lot Sylvain and Ajay for your replies.

On Thu, Jun 21, 2018 at 3:23 PM, Ajay Bhargav (SiWi) <[hidden email]> wrote:

Hi Nishant,

 

It is normal for network providers to close PDP context. And 2hrs seems to be common duration as per what I have tested. All you can do is simply reconnect. Moreover IP provided by most service providers are not public so you wont be able to run a server in most cases and IP will change all the time for sure.

 

Regards,

Ajay B.

 

 

From: [hidden email]
Sent: Thursday, June 21, 2018 2:19 PM
To: [hidden email]
Subject: Re: [lwip-users] PPP phase dead every 2 hours

 

Hi Nishant,

 

On Thu, Jun 21, 2018 at 12:37:09PM +0545, Nishant Agrawal wrote:

> Hello,

>

> I am using the ppp stack, using a modem to keep a device online and it is

> sending ping requests every 30 seconds. The problem is that roughly every 2

> hours, I end up with error, PPPERR_CONNECT. The phase change generally is

> as follows,

>

> PHASE_NETWORK

> PHASE_ESTABLISH

> PHASE_DISCONNECT

> PHASE_DEAD

>

> The PHASE_NETWORK and ESTABLISH happens simultaneously. PHASE_DISCONNECT

> happens about 5 seconds later and the phase goes to DEAD immediately as

> well. After PHASE_DEAD, I get the error, PPPERR_CONNECT.

 

That's the normal clean disconnection behavior. I believe the peer sent

you a LCP TermReq request. Could you check that ? (Using PPP_DEBUG and

PRINTPKT_SUPPORT support).

 

 

> I believe that the issue is related to the IP lease time. Because the

> time is more or less consistent and I am seeing the same pattern with

> 2 different prototypes that are on test. And every time I reconnect I

> get a new IP. So my question is, is there any way for me to request a

> renew of the old connection, like something that can be done with

> DHCP.

 

This is no such renew thing in PPP. If the peer change your local IP

address it means it really want to change it or just they don't care at

all and give a random one each time you connect.

 

There is no such thing of IP lease time as well, if a peer disconnect

you every two hours it means the peer want you to reconnect every two

hours.

 

However, you could try with another modem brand/model, I doubt the issue

is on the modem side (once in a while :p) but some of them are,

especially cellular ones, are doing stupid things or just full of bugs.

 

 

> Or what I can I do to keep the device connected?

 

Well, ask your ISP to stop disconnecting you every two hours :-)

 

 

Sylvain

 


_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users



--
With Regards,

Nishant Agrawal,
Real Time Solutions Pvt. Ltd.
Dhobighat, Patan-44600,
P.O. Box: 25090
Phone: +977-1-5538687, 5529953 Ext: 1442
Fax: <a href="tel:%2B977-1-5525695" value="+97715525695" style="font-size:12.8px;color:rgb(17,85,204)" target="_blank">+977-1-5525695,                                               
Mobile: +977 9802034152
www.wscada.com

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users