AW: [En-Nut-Discussion] TCP/IP-Problems

Dirk Becker nospam at anode.de
Tue Jun 6 09:31:34 CEST 2006


Hello Oliver,

thanks for diving into this stuff and pointing out the problem.
Last week on thursday evening I figured out these things too but 
unfortunately I could not post them earlier (my box at home crashed). I 
was also very confused about the windows size beeing smaller than the MSS.
I then limited the MSS size of my ethernut to 280 bytes (thanks to Dusan 
Ferbas) which the CP343/1 LEAN announces. Then the Ethernut is able to 
send 280 bytes to the SPS. Unfortunately I have to split my message of 
300 bytes into 2 messages (280+20=300) which leads to some more load in 
my application.
What should be the behaviour if the windows size is smaller than MSS? 
Does the Ethernut have to fragment the packages?

Thanx for all the help so far

Dirk Becker


Oliver Schulz wrote:
> Hello folks, Hello Dirk,
> 
> After a first look to the dumps and the Nut sources, I think the problem is
> in the window size reported by the S7 on the first packets. The CP 343-1
> LEAN indicates on the first sent SYN packet a MSS of 456 bytes but a window
> size of only 280 bytes. That means, that the CP 343-1 LEAN cannot even store
> a segment with it's MSS of 456 bytes.
> 
> NutOS limits the sended segment sizes to the peer MSS, but always waits
> until the peer's window is big enough to store even the data to send.
> In your application Nut tries to send 300 bytes, which obviously dont fit in
> the receivers window. So Nut aborts the connection after a timeout, I think.
> 
> Indeed the "old" (and expensive (~1200EUR), I know that, b/c I also used the
> 343-1 on my own developments) CP from SIEMENS indicates a MSS of 512 bytes
> and a window size of 560, which will work with Nut.
> 
> Although this behaviour from the CP LEAN is very, very unusual (never saw
> that before), I cannot find in the RFC 793 (TCP) that this is a fault. That
> means, we have a bug in Nut/Net.
> 
> @Dirk: To check whether I'm right, please limit the MSS to 200 bytes, or
> limit the send data to 200 bytes. Then it should work.
> 
> Hope that helps,
> Oliver.
> 
> 
>> -----Ursprüngliche Nachricht-----
>> Von: en-nut-discussion-bounces at egnite.de 
>> [mailto:en-nut-discussion-bounces at egnite.de] Im Auftrag von 
>> Dirk Becker
>> Gesendet: Dienstag, 30. Mai 2006 18:30
>> An: Ethernut User Chat (English)
>> Betreff: Re: [En-Nut-Discussion] TCP/IP-Problems
>>
>> Hi Brett,
>>
>> thanx for your reply.
>> Further down you can find a tcpip-dump of the working station.
>> The problem with the long delay seems to be the TCP/IP-retransmission 
>> timer, it happens only shortly after sytem start (a bit strange, but 
>> probably not the real problem). A bit further down you can 
>> find packets 
>> where no retransmissions happen, but also no data is sent and the 
>> Ethernut? ends the connection.
>> Dusan Ferbas pointed out, that it might be connected with MSS not 
>> accepted by the Ethernut and he suggestet me changing MSS. 
>> With his help 
>> the LEAN version now sometimes accepts some data but then the 
>> connection 
>> is dropped again suddenly after 1 packet with data (300 Bytes).
>>
>> Kind regards,
>>
>> Dirk
>>
>>
>>
>>
> 
> _______________________________________________
> En-Nut-Discussion mailing list
> En-Nut-Discussion at egnite.de
> http://www.egnite.de/mailman/listinfo.cgi/en-nut-discussion




More information about the En-Nut-Discussion mailing list