1 chapter 3 transport layer computer networking: a top down approach 4 th edition. jim kurose, keith...
TRANSCRIPT
1
Chapter 3Transport Layer
Computer Networking: A Top Down Approach 4th edition. Jim Kurose, Keith RossAddison-Wesley, July 2007.
A note on the use of these ppt slides:We’re making these slides freely available to all (faculty, students, readers). They’re in PowerPoint form so you can add, modify, and delete slides (including this one) and slide content to suit your needs. They obviously represent a lot of work on our part. In return for use, we only ask the following: If you use these slides (e.g., in a class) in substantially unaltered form, that you mention their source (after all, we’d like people to use our book!) If you post any slides in substantially unaltered form on a www site, that you note that they are adapted from (or perhaps identical to) our slides, and note our copyright of this material.
Thanks and enjoy! JFK/KWR
All material copyright 1996-2007J.F Kurose and K.W. Ross, All Rights Reserved
2
Chapter 3 outline
3.1 Transport-layer services
3.2 Multiplexing and demultiplexing
3.3 Connectionless transport: UDP
3.4 Principles of reliable data transfer
3.5 Connection-oriented transport: TCP segment structure reliable data transfer flow control connection
management
3.6 Principles of congestion control
3.7 TCP congestion control
3
TCP Connection EstablishmentThree-way
handshake
Step 1: client host sends TCP SYN segment to server specifies initial seq # no data
Step 2: server host receives SYN, replies with SYN+ACK segment server allocates buffers specifies server initial
seq. #Step 3: client receives
SYN+ACK, replies with ACK segment, which may contain data
aida.poly.edu mng.poly.edu
ACK
4
TCP segment structure
source port # dest port #
32 bits
applicationdata
(variable length)
sequence number
acknowledgement numberReceive window
Urg data pnterchecksum
FSRPAUheadlen
notused
Options (variable length)
URG: urgent data (generally not used)
ACK: ACK #valid
PSH: push data now
RST, SYN, FIN:connection estab(setup, teardown
commands)
# bytes rcvr willingto accept
countingby bytes of data(not segments!)
Internetchecksum
(as in UDP)
5
TCP Connection Termination
Step 1: client end system sends TCP FIN control segment to server
Step 2: server receives FIN, replies with ACK.
When server is done sending all data, it closes connection by sending FIN.
Step 3: client receives FIN, replies with ACK.
Enters “timed wait” - will respond with ACK to received FINs
Step 4: server, receives ACK. Connection closed.
client
FIN
server
ACK
ACK
FIN
close
close
closed
tim
ed w
ait
6
TCP Connection Management (cont)
TCP clientlifecycle
TCP serverlifecycle
aida.poly.edu mng.poly.edu
SYN
SYN + ACK
ACK
FIN
clientFIN
server
ACK
ACK
FIN
close
close
closed
tim
ed
wait
7
TCP state-transition diagram
CLOSED
LISTEN
SYN_RCVD SYN_SENT
ESTABLISHED
CLOSE_WAIT
LAST_ACKCLOSING
TIME_WAIT
FIN_WAIT_2
FIN_WAIT_1
Passive open Close
Send/SYNSYN/SYN + ACK
SYN + ACK/ACK
SYN/SYN + ACK
ACK
Close/FIN
FIN/ACKClose/FIN
FIN/ACKACK + FIN/ACKTimeout after two segment lifetimes
FIN/ACK
ACK
ACK
ACK
Close/FIN
Close
CLOSED
Active open/SYN
8
Chapter 3 outline
3.1 Transport-layer services
3.2 Multiplexing and demultiplexing
3.3 Connectionless transport: UDP
3.4 Principles of reliable data transfer
3.5 Connection-oriented transport: TCP segment structure reliable data transfer flow control connection
management
3.6 Principles of congestion control
3.7 TCP congestion control
9
Principles of Congestion Control
Congestion: informally: “too many sources sending too
much data too fast for network to handle” the load on the network is more than its capacity
different from flow control! manifestations:
lost packets (buffer overflow at routers) long delays (queueing in router buffers)
a top-10 problem!
11
Approaches towards congestion control
End-end congestion control:
no explicit feedback from network
congestion inferred from end-system observed loss, delay
approach taken by TCP
Network-assisted congestion control:
routers provide feedback to end systems single bit indicating
congestion explicit rate sender
should send at
Two broad approaches towards congestion control:
13
TCP Congestion Control
Approach Limit the rate at which sender sends data as
a function of perceived congestion in the network
Issues How does it perceive that there is
congestion in the network? What algorithm does it use to change the
sending rate as a function of the perceived level of congestion?