Follow Chris:

August 15, 2017

How TCP Works - Sequence Numbers

TCP is important stuff for network engineers to know.

Why?

Today's problems aren't so cut-and-dry as they used to be. When a problem strikes, we can't just say "it's not the network" and go along with our day. A core understanding of TCP and how it carries and acknowledges data goes a long way in finding the root cause of performance problems today.

One key aspect of TCP that is important to learn is the Sequence and Acknowledgement process. To put it simply, these numbers in the TCP headers indicate how much data has been sent and received. They allow each endpoint to determine if there was packet loss, what needs to be retransmitted, and help to determine how much data is in flight.

For a six-minute crash-course on how TCP Sequence numbers work, check out this video:

3 comments on “How TCP Works - Sequence Numbers”

  1. Thanks Chris for this video series. it helps a lot!
    Since the sequence number fields is 4 bytes or 32bit, theorically, the maximum file size that can be transferred in a single connection is around 4G (2^32 bytes), before sequence number run out. I'm curious about this is handled, as I'd transferred a single file over 100G via RSYNC, so there must be a solution to that, or I missed something here?

    1. Great question! Basically what happens is that the sequence number wraps back around to zero. Now, to keep things straight in case that happens very quickly - TCP uses the Timestamps feature along with Sequence numbers to make sure that it doesn't get confused by seeing sequence number 4000000000 twice! If that makes sense.

      This would be a good idea for a video. Thank you!

Leave a Reply

Your email address will not be published. Required fields are marked *

Packet Pioneer is devoted to helping engineers and developers of all experience levels gain comfort with packet analysis.
CONTACT US
crossmenu linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram