Announcements
Project #2
Overview
Process naming/demultiplexing
Three-way handshake
Flow control
Naming Processes/Services
16
31
SrcPort
DstPort
Checksum
Length
Data
UDP Delivery
Application
process
Application
process
Application
process
Kernel
boundary
Ports
Message
Queues
DeMux
Packets arrive
UDP Checksum
16
31
SrcPort
DstPort
Checksum
Length
Data
Streaming media
Connection-oriented
Flow control
10
TCP Delivery
Application process
Application process
Write
bytes
Read
bytes
TCP
TCP
Send buffer
Receive buffer
Transmit segments
Segment
Segment Segment
11
10
16
31
SrcPort
DstPort
SequenceNum
Acknowledgment
HdrLen
Flags
AdvertisedWindow
Checksum
UrgPtr
Options (variable)
Data
12
10
16
31
SrcPort
DstPort
SequenceNum
Acknowledgment
HdrLen
Flags
AdvertisedWindow
Checksum
UrgPtr
Options (variable)
Data
13
10
16
31
SrcPort
DstPort
SequenceNum
Acknowledgment
HdrLen
Flags
AdvertisedWindow
Checksum
UrgPtr
Options (variable)
Data
14
Connection Establishment
Didnt need it earlier because link had only two end points
Need to deal with delayed and reordered packets
15
Two-way handshake?
Active participant
(client)
Passive participant
(server)
+data
Whats wrong here?
16
Two-way handshake?
Active participant
(client)
Passive participant
(server)
+data
17
Three-Way Handshake
Passive participant
(server)
+data
18
Some Comments
19
Close
Close
LISTEN
SYN/SYN + ACK
Send/ SYN
SYN/SYN + ACK
SYN_RCVD
ACK
Close /FIN
SYN_SENT
SYN + ACK/ACK
ESTABLISHED
Close /FIN
FIN/ACK
FIN_WAIT_1
CLOSE_WAIT
FIN/ACK
ACK
Close /FIN
FIN_WAIT_2
FIN/ACK
CLOSING
LAST_ACK
20
Passive participant
(server)
SYN_SENT
LISTEN
SYN_RCVD
ESTABLISHED
ESTABLISHED
+data
CSE 123 Lecture 9: Transport Layer
21
Connection Teardown
22
Web browser
FIN_WAIT_1
CLOSE_WAIT
LAST_ACK
FIN_WAIT_2
TIME_WAIT
CLOSED
CLOSED
23
Why?
24
Flow Control
25
10
16
31
SrcPort
DstPort
SequenceNum
Acknowledgment
HdrLen
Flags
AdvertisedWindow
Checksum
UrgPtr
Options (variable)
Data
26
Receiving application
TCP
TCP
LastByteWritten
LastByteAcked
LastByteSent
= available buffer
LastByteRead
NextByteExpected
LastByteRcvd
= buffer in use
27
Window-Size Example
T=1
T=2
T=3
Stall due to
T=4
flow control
T=5
here
Receiver has
buffer of size 4
and application
doesnt read
T=6
28
2 3 4 5 6 7 8 9
T=2
2 3 4 5 6 7 8 9
=acked
=sent
T=3
2 3 4 5 6 7 8 9
T=4
2 3 4 5 6 7 8 9
T=5
2 3 4 5 6 7 8 9
T=6 1
2 3 4 5 6 7 8 9
=advertised
29
Window probes
Silly Window Syndrome
Nagles algorithm
PAWS
Etc
Stevens books TCP/IP Illustrated (vol 1,2) is a great
source of information on this
30
TCP applications
HTTP/WWW
FTP
SMTP, POP, IMAP (E-mail)
31
Summary
Connection setup/teardown
Flow control
32
Enjoy Thanksgiving