From the TCP document

I have read this:

First, client sends a TCP packet with_ SYN=1, ACK=0 and ISN(Sequence Number)= 5000_. Do not forget, sequence number is random and it could be between 0 to 4,294,967,295.

I have some questions,

  1. Why the seq number set to random, there will be safer?

  2. Is it usually the SYN=1? can it be set to any random number like seq number? if can, will it have more small protection?

  • For readability reasons, the sequence number is often relative to the ISN, and the ack sequence number is relative to the ISN of the peer. But the Initial Sequence Number should always be random for security considerations. See also RFC 7323 for timestamps.
    – omuffat
    Commented Sep 2, 2019 at 10:44
  • how about syn number?
    – 244boy
    Commented Sep 2, 2019 at 12:58
  • SYN is not a number it is a 1-bit flag (and ACK is as well). So there are not many values it can have ;-) Commented Sep 2, 2019 at 15:16

1 Answer 1


Basically there are a couple reasons:

  1. Security: anything too predictable is likely to be used for spoofing purposes
  2. Multi-session interference. If all sessions started their sequence numbers at 1, then it would be much easier to end up in situations where you mix up packets from various sessions between two hosts (though there are other measures in place to avoid this, like randomizing the source port).
  • how about the syn number? should it be set random?
    – 244boy
    Commented Sep 2, 2019 at 11:18
  • See above, SYN is not a number, just a flag which says whether the packet is part of the first two parts of the three-way TCP handshake. So it will always be set to 1. Commented Sep 2, 2019 at 15:18

Your Answer

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

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