> Did anybody encounter such a behavior with any system connecting to
> Linux?.. Any idea what can go wrong?
>
> I can send the pcap dump.
No experience with Linux and the dump would not help me since your
description is fairly accurate.
I could only have a guess - which is that the Linux system connection
to itself as an exception (if I got you right, both your device
and Linux use the same MAC [address]), and something does not work.
Apparently your first ACK does not reach the Linux host (or it has
the wrong TCP seq., as already suggested, which is another possible
scenario).
I suspect that not because I know how Linux does this - I don't - but
I know I have done it so myself for DPS and this would be one of the
places I would look into if I had here a similar issue (so far I
don't...
and hopefully I won't :-) ).
Another hint that this may be a "same host address" issue is the
ARP Linux sends out after having recently responded to your SYN
etc.
Dimiter
------------------------------------------------------
Dimiter Popoff Transgalactic Instruments
http://www.tgi-sci.com
------------------------------------------------------
On Nov 24, 11:34 pm, stargazer3...@gmail.com wrote:
> Greetings,
>
> I am implementing TCP connection functionality for my own embedded
> system. I am trying to connect to a listening program on Linux and
> capture network traffic with Ethereal network analyzer.
> Note: Ethereal runs on the same Linux machine, to which I am trying to
> connect to.
>
> What I see is really strange.
>
> Sequence of events is the following ("device" means my system):
>
> device -> ARP request: who has the Linux machine's IP address
> Linux -> ARP response: I have it
> device -> SYN to the Linux'ex IP address
> Linux -> SYN+ACK to device's IP address
> device -> ACK to Linux'es IP address
> Delay of 4.2 seconds
> Linux -> SYN+ACK to device's IP address (packet identical to the
> previous SYN+ACK)
> device -> ACK to Linux'es IP address (analyzer says: TCP segment lost)
> Linux -> ARP request: who has device's IP address
> device -> ARP response: I have it
> Linux -> SYN+ACK to device's IP address (packet identical to the
> previous SYN+ACK)
> device -> ACK to Linux'es IP address
> ...
> and so on.
>
> As strange as it sounds, it looks like Ethereal sees the ACK that my
> system sends to SYN+ACK, but Linux'es TCP layer doesn't (???). Even
> more strange, that was after Linux did see the first SYN that I sent.
> Packets are formed correctly, and the checksum is correct.
>
> I tried to connect to the same Linux machine from a Windows program
> and captures the dump. It succeeded normally after SYN/SYN+ACK/ACK;
> packets that Windows sent were identical to what I sent except for
> different ISN, window size and obviously the checksum.
>
> Did anybody encounter such a behavior with any system connecting to
> Linux?.. Any idea what can go wrong?
>
> I can send the pcap dump.
>
> Thanks,
> D