TCP
Transmission Control Protocol
TCP is connection-oriented.
Before actually sending data to the destination host, the two hosts communicate to establish a connection. Once the connection is established, the data exchange begins.
TCP provides reliable communication.
The destination host must acknowledge that it received each TCP segment.
If a segment isn't acknowledged, it is sent again.
TCP provides sequencing.
Sequence numbers in the TCP header allow destination hosts to put segments in the correct order even if they arrive out of order.
TCP provides flow control.
The destination host can tell the source host to increase/decrease the rate that data is sent.
Establishing Connections: Three-Way Handshake
Terminating Connections: Four-Way Handshake
Sequencing / Acknowledgment
Hosts set a random initial sequence number.
Forward acknowledgment is used to indicate the sequence number of the next segment the host expects to receive.
Retransmission
Flow Control
Acknowledging every single segment, no matter what size, is inefficient.
The TCP header's Window Size field allows more data to be sent before an acknowledgment is required.
A 'sliding window' can be used to dynamically adjust how large the window size is.
In all of these examples, I used very simple sequence numbers. In real situations, the sequence numbers get much larger and do not increase by 1 with each message. For the CCNA, just understand the concepts and don't worry about the exact numbers.
Last updated