Transmission Control Protocol (TCP)
Transmission Control Protocol (TCP)
Protocol (TCP)
8
Sending and Receiving Buffers
Senders and receivers may not produce and consume data at same
speed.
2 buffers for each direction (sending and receiving buffer).
9
Sliding Window Mechanism
Sender maintains 3 pointers for each connection
Pointer to bytes sent and acknowledged
Pointer to bytes sent, but not yet acknowledged
Sender window includes bytes sent but not acknowledged
Pointer to bytes that cannot yet be sent
10
Flow Control
Tell peer exactly how many bytes it is willing to accept (advertised
window sender can not overflow receiver buffer)
Sender window includes bytes sent but not acknowledged
Receiver window (number of empty locations in receiver buffer)
Receiver advertises window size in ACKs
12
Congestion Control
TCP assumes the cause of a lost segment is due to congestion in
the network
If the cause of the lost segment is congestion, retransmission of
the segment does not remove the problem, it actually aggravates
it
The network needs to tell the sender to slow down (affects the
sender window size in TCP)
Actual window size = Min (receiver window size, congestion
window size)
The congestion window is flow control imposed by the sender
The advertised window is flow control imposed by the receiver
13
TCP Connection Establishment
• SYN: Synchronize
• ACK: Acknowledge
14
TCP Connection Termination
• FIN: Finish
• Step 1 can be sent with data
• Steps 2 and 3 can be combined into 1
segment
15
Thank You!