Transport Layer
Natawut Nupairoj, Ph.D.
Department of Computer Engineering
Chulalongkorn University
Outline
Overview. Transport Layer Functions. UDP and TCP protocols.
Overview
Core of OSI and TCP/IP protocols. Interface between lower-level and upper-level
protocols (even application layers). Provide network-independent interface
Application-to-application delivery.
Transport Layer
Network-Independent Interface
Example: TCP Layer
Transport Layer Functions
Application-to-application delivery. Addressing
For not just end-to-end, but for application-to-application.
Service access point. Some transports: reliable layer over
unreliable network layer.
Service Access Point: Port
Well-Known Port Addresses
Port 80 – HTTP (web server). Port 25 – SMTP (mail server). Port 23 – Telnet. Port 22 – SSH. Port 110 – POP3.
Reliable Delivery
Error control Corrupted packets.
Sequence control Delay packets. Out-of-order delivery. Transmission speed mismatches.
Loss control Lost packets.
Duplicate control Duplicate packets.
Providing Reliability
Assume unreliable network layer. Use flow control – variable-size sliding
window protocol Acknowledgement. Window size is dynamic and adjustable in real-
time.
UDP: User Datagram Protocol
Connectionless transport protocol. Simple and efficient:
no connection setup. no flow control.
Unreliable. Discard when error occurs.
UDP Datagram Format
TCP: Transmission Control Protocol
Features Connection-oriented. Reliable. Full duplex. Assume unreliable network protocol. Flow control and congestion control. Three-way handshake for connection establishment. Application sends/receives data as “stream”.
TCP Segment Format
TCP Flow Control
Variable-size sliding window protocol: Sequence number: the first byte being sent. Acknowledgement: the next byte expected. Window size: control the transmission speed.
0 = receive all, but want to more data.
Out of order segments ? Depending on the receiver: Kept or discard.
TCP Sliding Window Protocol
TCP Sliding Window Protocol
TCP Congestion Control
Congestion - 2 causes: fast network, low-capacity receiver. slow network, high-capacity receiver.
Using window size. Sender maintains 2 windows:
receiving window. congestion window. The effective window is the minimum of the two w
indow.
TCP Congestion Window
After connection is established: congestion window size = one maximum segment
s (negotiate during connection). 64K threshold.
Sender sends one maximum segment. If the ack comes back before timeout, double the congestion window size.
TCP Congestion Window
Keep sending until: reach the threshold: increase the window size by
one. reach the receiving window size: no more increasi
ng. timeout: set threshold = half of the current conges
tion window size and start sending from one maximum segment again.
Top Related