1 Transport Layer Computer Networks. 2 Where are we?
-
Upload
collin-fitzgerald -
Category
Documents
-
view
220 -
download
0
Transcript of 1 Transport Layer Computer Networks. 2 Where are we?
![Page 1: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/1.jpg)
1
Transport Layer
Computer Networks
![Page 2: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/2.jpg)
2
Where are we?
![Page 3: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/3.jpg)
3
Recall
Network LayerProvides host-to-host communicationSource and destination addresses identify
host interfacesMachine-to-machine networking
![Page 4: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/4.jpg)
4
Transport Protocols
Provide application-to-application communication
Need extended addressing mechanism to identify applications
Called end-to-endOptionally provide:
ReliabilityFlow ControlCongestion Control
![Page 5: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/5.jpg)
5
Example Transport Layer:Transmission Control Protocol (TCP)
Standardized by IETF as RFC 793Most popular layer 4 protocolConnection-oriented protocolConceptually between applications and IPFull-duplex operationByte-stream interfaceOf utmost importance for this class!
The book: TCP/IP Illustrated, Volume I - W.R. StevensAlso see: http://condor.depaul.edu/~jkristof/tcp.html
![Page 6: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/6.jpg)
6
TCP Feature Summary
Provides a completely reliable (no data duplication or loss), connection-
oriented, full-duplex stream transport service that allows two application programs to form a connection, send data in either
direction and then terminate the connection.
![Page 7: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/7.jpg)
7
Relationship Between TCP and Other Protocols
TCP on one computer uses IP to communicate with TCP on another computer
![Page 8: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/8.jpg)
8
Apparent Contradiction
IP offers best-effort (unreliable) delivery
TCP uses IPTCP provides completely reliable
transferHow is this possible?
![Page 9: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/9.jpg)
9
Achieving Reliability
Reliable connection setupReliable data transmissionReliable connection shutdown
![Page 10: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/10.jpg)
10
Reliable Data Transmission
Positive AcknowledgementReceiver returns short message when data
arrivesCall an acknowledgement
RetransmissionSender starts timer whenever message is
transmittedIf timer expires before acknowledgement
arrives, sender retransmits message
![Page 11: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/11.jpg)
11
Retransmission Illustrated
![Page 12: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/12.jpg)
12
How Long Should TCP Wait Before Retransmitting?
Time for acknowledgement to arrive depends onDistance to destinationCurrent traffic conditions
Multiple connections can be open simultaneously
Traffic conditions change rapidly
![Page 13: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/13.jpg)
13
Important Point
The delay required for data to reach a destination and an acknowledgement to return depends on traffic in the internet as well as the distance to
the destination. Since it allows multiple application programs to communicate with
multiple destinations concurrently, TCP must handle a variety of delays that can change
rapidly.
![Page 14: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/14.jpg)
14
Solving the Retransmission Problem
Keep estimate of round trip time on each connection
Use current estimate to set retransmission timer
Known as adaptive retransmissionKey to TCP’s success
![Page 15: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/15.jpg)
15
Adaptive Retransmission Illustrated
Timeout depends on current round-trip estimate
![Page 16: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/16.jpg)
16
TCP Flow Control
ReceiverAdvertises available buffer spaceCalled the window
SenderCan send up to entire window before ACK
arrives
Also called a sliding window protocol
![Page 17: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/17.jpg)
17
Window Advertisement
Each acknowledgement carries new window informationCalled window advertisementCan be zero (called closed window)
Interpretation: I have received up through X and can take Y more octets
![Page 18: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/18.jpg)
18
Window Advertisement Illustrated
![Page 19: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/19.jpg)
19
Another View: Sliding Window Illustrated
![Page 20: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/20.jpg)
20
Startup and Shutdown
Connection StartupMust be reliable
Connection ShutdownMust be graceful
Difficult
![Page 21: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/21.jpg)
21
Why Startup/Shutdown is Difficult
Segments can belostduplicateddelayeddelivered out of ordereither side can crasheither side can reboot
Need to avoid duplicate shutdown "message” from affecting later connection
![Page 22: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/22.jpg)
22
TCP’s Startup Solution
Use three-message exchangeKnown as the 3-way handshakeNecessary and sufficient for
unambiguous, reliable startupSYN messages used for connection
establishment
![Page 23: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/23.jpg)
23
3-Way Handshake Illustrated
![Page 24: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/24.jpg)
24
TCP’s Shutdown Illustrated
![Page 25: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/25.jpg)
25
Byte Stream Sequencing
Segments are labeled with a sequence number
Protects from out-of-order delivery32-bit numberLimited size of byte stream?Initial Sequence Numbers (ISNs) must be
exchanged at TCP connection establishment
![Page 26: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/26.jpg)
26
More Complete Illustration of the 3-Way Handshake
![Page 27: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/27.jpg)
27
Application Multiplexing
Cannot extend IP addressNo unused bits
Cannot use OS dependent quantityProcess IDTask numberJob name
Must work on all computer systems
![Page 28: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/28.jpg)
28
Application Multiplexing Illustrated
![Page 29: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/29.jpg)
29
Protocol Ports
Each application assigned a unique integer
ServerFollows standardAlways uses same port numberUsually uses lower port numbers
ClientObtains unused port from protocol softwareUsually uses higher port numbers
![Page 30: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/30.jpg)
30
Protocol Port Example
Web server application is assigned port 80Web client application obtains port 32938TCP segment sent from client to server has
source port number 32938destination port number 80
When web server responds, TCP segment hassource port number 80destination port number 32938
![Page 31: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/31.jpg)
31
Standard Protocol Ports
See http://www.iana.org for standard protocol port assignmentsSee /etc/services in UNIX systems and \winnt\system32\drivers\etc\services in Windows NT
![Page 32: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/32.jpg)
32
TCP Segment Format
![Page 33: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/33.jpg)
33
Example Transport Layer: User Datagram Protocol (UDP)
Unreliable message deliveryConnectionless protocolNo flow control (no window)No error recovery (no ACKs)Provides application multiplexingError detection optional (checksum
field)
![Page 34: 1 Transport Layer Computer Networks. 2 Where are we?](https://reader036.fdocuments.net/reader036/viewer/2022081513/56649e165503460f94b00dd2/html5/thumbnails/34.jpg)
34
UDP Message Format