Professional Documents
Culture Documents
16 Transport
16 Transport
• Transport introduction
• Error recovery
Datalink
Datalink 22 22 Datalink
Datalink
Physical
Physical 11 11 Physical
Physical
router
Goal: detect “errors” (e.g., flipped bits) in transmitted segment – optional use!
Sender: Receiver:
• Treat segment contents as • Compute checksum of
sequence of 16-bit integers received segment
• Checksum: addition (1’s • Check if computed checksum
complement sum) of segment
contents equals checksum field value:
• Sender puts checksum value
• NO - error detected
into UDP checksum field • YES - no error detected
But maybe errors
nonethless?
Sequence number
Flags: SYN
Acknowledgement
FIN
RESET HdrLen 0 Flags Advertised window
PUSH
URG Checksum Urgent pointer
ACK Options (variable)
Data
1984
1975 Nagel’s algorithm
Three-way handshake to reduce overhead 1987
Raymond Tomlinson of small packets; Karn’s algorithm 1990
In SIGCOMM 75 predicts congestion to better estimate 4.3BSD Reno
collapse round-trip time fast retransmit
delayed ACK’s
1983
BSD Unix 4.2 1986 1988
1974 supports TCP/IP Congestion Van Jacobson’s
TCP described by collapse algorithms
Vint Cerf and Bob Kahn observed congestion avoidance
In IEEE Trans Comm 1982 and congestion control
TCP & IP (most implemented in
RFC 793 & 791 4.3BSD Tahoe)
1994 1996
T/TCP SACK TCP
(Braden) (Floyd et al)
Transaction Selective
TCP Acknowledgement
• Transport introduction
• Error recovery
• ARQ
• Receiver sends
acknowledgement (ACK)
Sender Receiver
when it receives packet
• Sender waits for ACK and Packe
t
Timeout
timeouts if it does not arrive
within some time period ACK
• Simplest ARQ protocol
• Send a packet, stop and Time
wait until ACK arrives
Timeout
Timeout
ACK C K
Time A
Packe
Packe Packe t
t t
Timeout
Timeout
Timeout
ACK
ACK ACK
Sender
Sender Receiver
Receiver
… … … …
Sent & Acked Sent Not Acked Received & Acked Acceptable Packet
• Transport introduction
• Error recovery
• 32 Bits, Unsigned
• Circular Comparison
a
a
b
Max 0 Max 0
window
Sent and acked Sent but not acked Not yet sent
Next to be sent
App write
New
Receive buffer
window
Lecture 16: 03-16-2004 33
TCP Persist
• Transport service
• UDP mostly just IP service
• TCP congestion controlled, reliable, byte stream
• Types of ARQ protocols
• Stop-and-wait slow, simple
• Go-back-n can keep link utilized (except w/ losses)
• Selective repeat efficient loss recovery
• TCP flow control
• Sliding window mapping to packet headers
• 32bit sequence numbers (bytes)
• TCP reliability
• Congestion control