Docsity

TCP/IP Transport Layer: A Comprehensive Guide to TCP and UDP Protocols, Lecture notes of Data Communication Systems and Computer Networks

Partial preview of the text

Download TCP/IP Transport Layer: A Comprehensive Guide to TCP and UDP Protocols and more Lecture notes Data Communication Systems and Computer Networks in PDF only on Docsity!

Chapter 5 –TRANSPORT LAYER

5.1 - INTRODUCTION

  • (^) Logical connection between application processes running on different hosts (Network layer: connection b/n hosts)
  • (^) Sender: segmentation, encapsulation
  • (^) Receiver: assembly, decapsulation
  • (^) Two transport-layer protocols:
    • (^) TCP: connection-oriented, reliable, congestion control, flow control
    • (^) UDP: connectionless, unreliable, unordered, no congestion control, no flow control

5.2 – Multiplexing/Demultiplexing

  • (^) Multiplexing – gathers data from multiple processes
  • (^) Demultiplexing – delivers segments to correct processes Transport Network Link Physical Transport Network Link Physical Transport Application (^) P 1 P^2 Application^ P^3 P 4 Application Network Link Physical Host 1 Host 2 Host 3
  • (^) UDP has only four fields: source port number, destination port number, length and checksum
  • (^) UDP (User Datagram Protocol) is defined in RFC 768 - (^) often used for streaming multimedia applications because these applications are loss tolerant and rate sensitive. DNS and SNMP also use UDP. - (^) Reliable transfer over UDP is added at application layer - (^) UDP checksum is used to detect “errors”
  • (^) UDP Checksum: 1’s complement sum of segment contents treated as sequence of 16-bit words is carried out to produce the checksum and put into UDP checksum field. - (^) The receiver computes checksum of received segment, checks if computed checksum equals checksum field value: - (^) NO - error detected - (^) YES - no error detected.
  • (^) A carryout from the most significant bit needs to be added to the result. For example: add two 16-bit integers
  • (^) TCP socket is identified by four-tuple: source IP address, source port number, destination IP address and destination port number.

TCP Connection management

  • (^) Connection setup (three-way handshake) and connection termination in TCP look as follows:
  • (^) Stop-and-wait: every packet acknowledged before next packet is sent
  • (^) Pipelining: several packets sent before receiving 1st acknowledgment
  • (^) Workout the example above when a pipeline of three packets is used.

TCP Retransmission Scenarios

  • (^) Different TCP retransmission scenarios are shown below

Go-Back-N (GBN)

  • (^) One of two pipelined protocols Window of size N (sequence numbers for transmission but not yet acknowledged packets) slides forward over the sequence number space. N is referred to as the window size and the GBN protocol itself is a sliding-window protocol. The receiver discards out-of-order packets and it does not buffer any out-of-order packets.

Selective Repeat

  • (^) The second pipelined protocol
    • (^) avoids unnecessary retransmissions (the sender retransmit only those packets that it suspects were lost or corrupted). The receiver individually acknowledge correctly received packets.