Set17-Ch 6-Transport Layer
Set17-Ch 6-Transport Layer
Introduction to TCP
• pipelined: • connection-oriented:
– handshaking (exchange of control
– TCP congestion and flow control set
msgs) init’s sender, receiver state
window size
before data exchange
• send & receive buffers
• flow controlled:
– sender will not overwhelm receiver
application application
writes data reads data
socket socket
door door
TCP TCP
send buffer receive buffer
segment
6-31
Flow Control
Simulation
Seq. #’s:
– byte stream “number” of first Host A Host B
byte in segment’s data
ACKs: User Seq=4
2, ACK
– seq # of next byte expected types =79, d
ata = ‘C’
from other side ‘C’
– cumulative ACK host ACKs
Q: how receiver handles out-of-order receipt of
C ’ ‘C’, echoes
segments
, data = ‘
3
CK=4 back ‘C’
– A: TCP spec doesn’t say, -
eq=79, A
up to implementor S
host ACKs
receipt Seq=4
of echoed 3, ACK
=80
‘C’
time
simple telnet scenario
Clark’s Solution
• Prevent receiver from sending
updates for one byte
• Limit window updates to
MIN(MSS, RecvBuffer/2)
• Sender also should not send one
byte at a time
• Wait until there is enough
space at the receiver buffer
• Introduction to TCP
• The TCP Service Model
• The TCP Protocol
• The TCP Segment Header
• TCP Connection Establishment
• TCP Transmission Policy
• TCP Congestion Control
• TCP Timer Management
• Potential problems:
– Network capacity
» Requires congestion window
– Receiver capacity
» Requires receiver granted window
• Number of bytes that can be sent = MIN (cong window, receiver window)
Window size
increases linearly
TCP
Congestion
Control
Window size
doubles Simulation`
(a) Probability density of ACK arrival times in the data link layer. Very predictable.
(b) Probability density of ACK arrival times for TCP. Dynamic and is hard to predict.
Timeout = SRTT + 4 × D