[lwip-users] about lwip TCP/IP paratmers

67 views
Skip to first unread message

yueyue papa

unread,
Mar 17, 2009, 5:38:13 AM3/17/09
to Mailing list for lwIP users
Hi all,

I meet the problem in lwIP working on the poor GPRS network.

I could see connection lost in the GPRS network: lwIP send FIN, so the connection is losted.

Where is the parameters I could config this

1. Resend time out
2. FIN send timeout

I could see there is out of sequance package,

What is the meaning of

#define TCP_OOSEQ_TIMEOUT        6U /* x RTO */

I changed the data to 60, but more worse

Lee

yueyue papa

unread,
Mar 17, 2009, 7:03:12 AM3/17/09
to Mailing list for lwIP users
My test case:
 
lwip in           Echo server
211.xxx   --> 192.xxx.xx

211.xxx  send 209 byte, and wait echo server to echo back.  If link break do connection again.  I do not want the link break. But in the No 94:  the connection is finished.

Is there any parameter I could changed to increase the resend times, resend .... , so as to not meet such kind of break.

90% link is break by lwIP first. Could I make lwIP not send the FIN to stop the connection

Lee
socketTest-tcp.port8000.pcap

Kieran Mansley

unread,
Mar 17, 2009, 7:19:19 AM3/17/09
to Mailing list for lwIP users
On Tue, 2009-03-17 at 17:38 +0800, yueyue papa wrote:
> Hi all,
>
> I meet the problem in lwIP working on the poor GPRS network.
>
> I could see connection lost in the GPRS network: lwIP send FIN, so the
> connection is losted.

lwIP normally only sends a FIN when the connection is closed by the
application. If something were timing out in the stack it would instead
be either just dropping the connection or sending a RST to abort the
connection. This suggests that your application is giving up on the
connection, and so changing the timers in lwIP won't make any
difference.

Kieran

_______________________________________________
lwip-users mailing list
lwip-...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/lwip-users

yueyue papa

unread,
Mar 17, 2009, 8:29:34 AM3/17/09
to Mailing list for lwIP users
>>lwIP normally only sends a FIN when the connection is closed by the
application.
I do not agree this statement. I always find lwIP first FIN the connection. The connection is not close by remote.

Kieran Mansley

unread,
Mar 17, 2009, 8:39:07 AM3/17/09
to Mailing list for lwIP users
On Tue, 2009-03-17 at 20:29 +0800, yueyue papa wrote:
> >>lwIP normally only sends a FIN when the connection is closed by the
> application.
> I do not agree this statement. I always find lwIP first FIN the
> connection. The connection is not close by remote.

I mean the application running on top of lwIP, not the other end.

yueyue papa

unread,
Mar 18, 2009, 4:28:19 AM3/18/09
to Mailing list for lwIP users
thanks Kierean, I check the code, and I understand lwIP really send FIN in socket close.

I have a quertion for how long time will be lwIP resend the lost pacakge?

##############
No.     Time        Source                Destination           Protocol Info
      1 0.000000    211.136.158.37        192.168.8.94          TCP      49360 > irdmi [SYN] Seq=0 Win=2920 Len=0 MSS=1460
      2 0.000524    192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [SYN, ACK] Seq=0 Ack=1 Win=65535 Len=0 MSS=1460
      3 1.414053    211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=1 Ack=1 Win=2920 Len=0
      4 5.055230    211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=1 Ack=1 Win=2920 Len=198
      5 5.062737    192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=1 Ack=199 Win=65337 [TCP CHECKSUM INCORRECT] Len=198
      6 6.316085    211.136.158.37        192.168.8.94          TCP      [TCP Retransmission] 49360 > irdmi [PSH, ACK] Seq=1 Ack=1 Win=2920 Len=198
      7 6.316119    192.168.8.94          211.136.158.37        TCP      [TCP Dup ACK 5#1] irdmi > 49360 [ACK] Seq=199 Ack=199 Win=65337 [TCP CHECKSUM INCORRECT] Len=0
      8 6.935167    211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=199 Ack=199 Win=2920 Len=0
      9 34.553643   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=199 Ack=199 Win=2920 Len=198
     10 34.560701   192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=199 Ack=397 Win=65139 [TCP CHECKSUM INCORRECT] Len=198
     11 35.131844   211.136.158.37        192.168.8.94          TCP      [TCP Retransmission] 49360 > irdmi [PSH, ACK] Seq=199 Ack=199 Win=2920 Len=198
     12 35.131876   192.168.8.94          211.136.158.37        TCP      [TCP Dup ACK 10#1] irdmi > 49360 [ACK] Seq=397 Ack=397 Win=65139 [TCP CHECKSUM INCORRECT] Len=0
     13 35.337657   211.136.158.37        192.168.8.94          TCP      [TCP Retransmission] 49360 > irdmi [PSH, ACK] Seq=199 Ack=199 Win=2920 Len=198
     14 35.337687   192.168.8.94          211.136.158.37        TCP      [TCP Dup ACK 10#2] irdmi > 49360 [ACK] Seq=397 Ack=397 Win=65139 [TCP CHECKSUM INCORRECT] Len=0
     15 35.713722   211.136.158.37        192.168.8.94          TCP      [TCP Retransmission] 49360 > irdmi [PSH, ACK] Seq=199 Ack=199 Win=2920 Len=198
     16 35.713747   192.168.8.94          211.136.158.37        TCP      [TCP Dup ACK 10#3] irdmi > 49360 [ACK] Seq=397 Ack=397 Win=65139 [TCP CHECKSUM INCORRECT] Len=0
     17 37.090132   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=397 Ack=397 Win=2920 Len=0
     18 42.572425   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=397 Ack=397 Win=2920 Len=198
     19 42.579375   192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=397 Ack=595 Win=64941 [TCP CHECKSUM INCORRECT] Len=198
     20 48.739357   192.168.8.94          211.136.158.37        TCP      [TCP Retransmission] irdmi > 49360 [PSH, ACK] Seq=397 Ack=595 Win=64941 [TCP CHECKSUM INCORRECT] Len=198
     21 51.099474   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=595 Ack=595 Win=2920 Len=0
     22 56.762953   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=595 Ack=595 Win=2920 Len=198
     23 56.769989   192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=595 Ack=793 Win=64743 [TCP CHECKSUM INCORRECT] Len=198
     24 58.345088   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=793 Ack=793 Win=2920 Len=0
     25 73.313026   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=793 Ack=793 Win=2920 Len=198
     26 73.320700   192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=793 Ack=991 Win=64545 [TCP CHECKSUM INCORRECT] Len=198
     27 74.817597   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=991 Ack=991 Win=2920 Len=0
     28 89.941063   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=991 Ack=991 Win=2920 Len=198
     29 89.949603   192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=991 Ack=1189 Win=64347 [TCP CHECKSUM INCORRECT] Len=198
     30 91.755556   211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=1189 Ack=1189 Win=2920 Len=0
     31 101.679462  211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=1189 Ack=1189 Win=2920 Len=198
     32 101.686505  192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=1189 Ack=1387 Win=64149 [TCP CHECKSUM INCORRECT] Len=198
     33 103.147619  211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=1387 Ack=1387 Win=2920 Len=0
     34 108.376596  211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=1387 Ack=1387 Win=2920 Len=198
     35 108.376952  192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [ACK] Seq=1387 Ack=1585 Win=65535 [TCP CHECKSUM INCORRECT] Len=0
     36 108.383705  192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=1387 Ack=1585 Win=65535 [TCP CHECKSUM INCORRECT] Len=198
     37 109.797425  211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=1585 Ack=1585 Win=2920 Len=0
     38 173.506679  211.136.158.37        192.168.8.94          TCP      49360 > irdmi [PSH, ACK] Seq=1585 Ack=1585 Win=2920 Len=198
     39 173.507694  211.136.158.37        192.168.8.94          TCP      [TCP Out-Of-Order] 49360 > irdmi [PSH, ACK] Seq=1585 Ack=1585 Win=2920 Len=198
     40 173.507731  192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [ACK] Seq=1585 Ack=1783 Win=65337 [TCP CHECKSUM INCORRECT] Len=0
     41 173.513621  192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [PSH, ACK] Seq=1585 Ack=1783 Win=65337 [TCP CHECKSUM INCORRECT] Len=198
     42 178.288443  192.168.8.94          211.136.158.37        TCP      [TCP Retransmission] irdmi > 49360 [PSH, ACK] Seq=1585 Ack=1783 Win=65337 [TCP CHECKSUM INCORRECT] Len=198
     43 187.804221  192.168.8.94          211.136.158.37        TCP      [TCP Retransmission] irdmi > 49360 [PSH, ACK] Seq=1585 Ack=1783 Win=65337 [TCP CHECKSUM INCORRECT] Len=198
     44 193.154690  211.136.158.37        192.168.8.94          TCP      49360 > irdmi [FIN, ACK] Seq=1783 Ack=1585 Win=2920 Len=0
     45 193.155010  192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [ACK] Seq=1783 Ack=1784 Win=65337 [TCP CHECKSUM INCORRECT] Len=0
     46 193.155206  192.168.8.94          211.136.158.37        TCP      irdmi > 49360 [FIN, ACK] Seq=1783 Ack=1784 Win=65337 [TCP CHECKSUM INCORRECT] Len=0
     47 193.318588  211.136.158.37        192.168.8.94          TCP      [TCP Retransmission] 49360 > irdmi [PSH, ACK] Seq=1585 Ack=1585 Win=2920 Len=198
     48 193.318620  192.168.8.94          211.136.158.37        TCP      [TCP Dup ACK 46#1] irdmi > 49360 [ACK] Seq=1784 Ack=1784 Win=65337 [TCP CHECKSUM INCORRECT] Len=0
     49 193.357145  211.136.158.37        192.168.8.94          TCP      49360 > irdmi [FIN, ACK] Seq=1783 Ack=1585 Win=2920 Len=0
     50 193.357178  192.168.8.94          211.136.158.37        TCP      [TCP Dup ACK 46#2] irdmi > 49360 [ACK] Seq=1784 Ack=1784 Win=65337 [TCP CHECKSUM INCORRECT] Len=0
     51 194.657555  211.136.158.37        192.168.8.94          TCP      49360 > irdmi [ACK] Seq=1784 Ack=1784 Win=2721 Len=0
##############

item 38: It is send very later
item 44:  H50 send FIN.

between 37, 38, there may be a send package lost, but the resend is very later.

based on previous send time, there must be a package send from 211.xxx, before item 38. (The time will be 11:33:53, and the package is losted due to GPRS.)

but the item 38, showed the package is send in 11:34: 47

I think there is nearly 50s delay for resend.

Question: why  the resecend is so later.

Will it caused by TCP Nagle algorithm?

Lee
log_haixiao_2_allBatchFailure-filter.pcap
Reply all
Reply to author
Forward
0 new messages