A vital aspect of TCP which is conveniently abstracted away from normal use is the TCP window size. Because endpoints of various levels of speed, capability, and memory operate across networks, reliability can only be achieved efficiently if endpoints have “a means for the receiver to govern the amount of data sent by the sender”, as is described in RFC 793 (Postel, 2003). Windows are the size of buffers maintained by network TCP stacks and fill with incoming data and empty as that data is consumed by the networking application.
TCP Flow control lessons learned from programming network tools:
If you are watching a TCP session, such as in Wireshark, and the TCP window suddenly starts shrinking then it means that the endpoint has stopped calling recv. This is a likely sign that the receiving application is blocking on the thread processing inbound data, and probably blocking inappropriately. Check for waits or even premature thread termination. This problem will occur also if the inbound data thread has exited without triggering a closure of the socket.
Man, I hate it when comedians tell jokes about TCP. They just keep repeating it until you laugh! This is because, as a protocol, TCP guarantees reliability through Positive Acknowledgement with Retransmission. (Vacca, 2009, pg 298) Data packets are retransmitted until they are acknowledged.
Postel, J. (2003). RFC 793: Transmission control protocol, September 1981.Status: Standard, 88.
UMUC. (2012) Advanced TCP/IP, CSEC-640 – Module 1. Retrieved from: https://leoprdws.umuc.edu/CSEC640/1206/csec640_01/assets/csec640_01.pdf
Vacca, J. R. (2009). Computer and Information Security Handbook. Burlington, MA: Morgan Kaufman
No comments:
Post a Comment