2

So i read this somewhere that there is no such TCP segment and 0 for both of SYN and ACK is not possible, and i wanted to check whether its true or not

if the segment is not the first segment of the handshake(which in that case the ACK=0 and SYN=1) then do we always set the ACK as 1? if so, why?

and if there is such a TCP segment, then what type of segment is it, a normal data segment or...?

1 Answer 1

5

As you say, the handshake is SYN, SYN/ACK, then ACK, so there is always SYN and/or ACK set in the handshake.

Following handshake, every segment will ACK data received from the other host, so the ACK will always be set.

When the connection is closed, FIN is sent and these also contain ACK.

So under a normal initiation, data transfer and close sequence, ACK or SYN is always set.

One exception would be RST - these can be sent to refuse a connection. In this case, it does not acknowledge anything the sender is sending, it just wants to tell the sender to stop, so in this case, RST can be sent without ACK (and obviously no SYN).

1
  • And also, of course, buggy code and code looking for buggy code..
    – jonathanjo
    Jul 17, 2018 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.