210 likes | 220 Views
This article provides an overview of the transport layer in OSI and TCP/IP protocols, its functions, and the UDP and TCP protocols. It covers topics such as application-to-application delivery, addressing, reliable delivery, error control, flow control, and congestion control.
E N D
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 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.
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.
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 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 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 window.
TCP Congestion Window • After connection is established: • congestion window size = one maximum segments (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 increasing. • timeout: set threshold = half of the current congestion window size and start sending from one maximum segment again.