1

Are timeouts in TCPs inherently part of sequence numbers, or is it an entirely different component of a TCP packet?

I understand that timeouts provide some level of reliabilty to a data stream, in that, it prevents excessive transmission of traffic - which may be due to a MITM attack; juxtaposed the sequence numbers that provide security by ensuring data is sent in order - detects replay attacks.

0

The timers and sequence numbers are for the reliability that TCP gives, not really anything to do with security. See RFC 793, Transmission Control Protocol:

When the TCP transmits a segment containing data, it puts a copy on a retransmission queue and starts a timer; when the acknowledgment for that data is received, the segment is deleted from the queue. If the acknowledgment is not received before the timer runs out, the segment is retransmitted.

TCP can, and often does, receive segments out of order, but, using the sequence numbers, it will reorder the segments before presenting the data to the application. TCP guarantees in-order data delivery. Receiving segments out of order does not detect or prevent MiTM or replay attacks.

The initial sequence number is randomly chosen the help with security, but the reason for sequence numbers is about reliability not security. You use some type of encryption (VPN tunnel, SSH, etc.) to provide security. Unencrypted traffic simply is not safe.


Remember that back when TCP was created, we did not have the public Internet, and things were much more trustworthy. Security was not really anything anyone thought about. IP was a government/academic experiment, and you had to be one of the partners to even participate.

2
  • So in the sentence (RFC 793): "Transmission is made reliable via the use of sequence numbers and acknowledgments.", is it assumed that timeouts are part of the sequence number component? Jan 18 at 2:21
  • If the sequence number is not acknowledged before the timeout, then the segment is resent. That is how it guarantees that the data are received. The receiver uses the sequence number to reorder the data before presenting to the application.
    – Ron Maupin
    Jan 18 at 2:45

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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