If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

incorrect packet responses

Hey Guys, Long time no chat. :P

I have been investigating some weird packet responses from some servers when visiting their site and I am kind of confused as to what could be the cause of it. When I initiate the TCP connection, I get a SYN/ACK response that has an out of order sequence number. I am curious to what could have caused this and was wondering if any of you gurus had any ideas on the whole shenanigan. My initial guess was some hacked up TCP stack, but the servers are running standard operating systems (*nix/windows) from what I can tell. I started to think it might have been some oddly configured firewall but I can not find a good justification for that being the case. Any thoughts would be appreciated as I am trying to make sense of the whole thing. PLEASE KIND AND MERCIFUL AO SAGES! LEND ME YOUR WISDOM!

If I remember rightly, the sequence id does not just increment by one every time. It is closely related to the acknowledgment id throughout the session, and is randomly generated on each side when the 3 way handshake occurs.

1. SYN: The active open is performed by the client sending a SYN to the server. It sets the segment's sequence number to a random value A.
2. SYN-ACK: In response, the server replies with a SYN-ACK. The acknowledgment number is set to one more than the received sequence number (A + 1), and the sequence number that the server chooses for the packet is another random number, B.
3. ACK: Finally, the client sends an ACK back to the server. The sequence number is set to the received acknowledgement value i.e. A + 1, and the acknowledgement number is set to one more than the received sequence number i.e. B + 1.

So I guess the question is, how do you know the sequence id from the Syn-Ack phase is out of order? Based on what I know and what that wikipedia article indicates, it is randomly generated.

The packet sequence is generated (S + 1) however on a laggy network the packets may not come in the order they were generated and sent, hence the informational message about out of order sequence. If anything you're seeing a very active network with congestion.

Mercy has been bestowed upon you.

--TH13

Our scars have the power to remind us that our past was real. -- Hannibal Lecter.
Talent is God given. Be humble. Fame is man-given. Be grateful. Conceit is self-given. Be careful. -- John Wooden

Thanks for the reply TH13! I considered that congestion might be the problem, but wouldn't that only be of consequence after the TCP connection has been established? I am finding fault with the sequence number during the three-way handshake process which is why I am getting uppity >.< Hope you can clarify!