WEEK 5 CS2005 Transport Layer Concepts in Networks

CS2005 Networks and Operating Systems Transport Layer I

  • J.F Kurose and K.W. Ross 1996-2016

Session Objectives

  • To understand:

    • Transport layer services and protocols

    • Multiplexing and demultiplexing

    • Connectionless transport

    • User Datagram Protocol (UDP)

Transport Layer Services and Protocols

  • Provides logical communication between application processes across different hosts.

  • Implemented in end systems, not in network routers.

Sending Side Process

  • Converts application layer messages into transport layer packets (segments).

  • May break messages into smaller chunks and add a transport layer header.

  • Segments passed to network layer, encapsulating them into datagrams.

Receiving Side Process

  • Network layer extracts transport layer segment from datagram.

  • Transport layer processes the segment to make data available to the application.

  • Network routers only act on network layer fields and do not examine transport-layer segments.

Relationship Between Transport Layer and Network Layer

  • Transport layer: logical communication between processes.

  • Network layer: logical communication between hosts.

  • Transport layer enhances network layer services.

  • IP service model is a best-effort delivery service.

Available Transport Protocols

  • Two main protocols available on the Internet:

    • Transmission Control Protocol (TCP)

      • Reliable, in-order delivery.

      • Includes connection setup, flow control, and congestion control.

    • User Datagram Protocol (UDP)

      • Unreliable, unordered delivery (no extension of IP's best effort).

Transport Layer Services to Applications

  • Process-Level Addressing

    • Differentiates between application processes.

    • Network layer addressing identifies hosts.

  • Multiplexing and Demultiplexing

    • Sender side: multiplexing data from various processes.

    • Receiver side: demultiplexing received data to appropriate processes.

  • Integrity Checking

    • Error detection mechanisms.

  • Connection Management

    • Establishment and termination processes (TCP specific).

  • Acknowledgments and Retransmissions

    • Important for reliable service (TCP specific).

  • Flow Control

    • Ensures in-order delivery service (TCP specific).

Multiplexing and Demultiplexing

  • Extends host-to-host delivery to process-to-process delivery for applications.

Sending Host Functions

  • Multiplexing: Gathering data from different sockets, creating segments, and passing them to the network layer.

Destination Host Functions

  • Demultiplexing: Delivering received segments to the correct socket.

  • Each socket has a unique identifier.

Connectionless Demultiplexing (UDP)

  • Identified by a 2-tuple: destination IP address and destination port number.

  • Different source IPs or ports to the same destination will connect to the same process.

Connection-Oriented Demultiplexing (TCP)

  • Identified by a 4-tuple: source IP address, source port number, destination IP address, and destination port number.

  • Uses all four values for proper demultiplexing to the correct socket, differing from UDP in that different source tuples will connect to different sockets.

Web Server Usage of Port Numbers

  • Web server (e.g., Apache) running on port 80 handles segments directed to it from clients.

  • Distinguishes segments from clients using source IP addresses and port numbers.

  • Each connection can spawn a new process or thread with a unique connection socket.

Persistent vs Non-Persistent HTTP

  • Persistent HTTP: Client and server exchange messages via the same server socket throughout connection.

  • Non-Persistent HTTP: New TCP connection and socket created for each request/response cycle, potentially impacting performance negatively.

Connectionless Transport: User Datagram Protocol (UDP)

  • Provides mux/demux service to direct data to correct application-level processes.

  • Only adds light error checking to IP functionality.

UDP Segment Structure

  • Length Field: Indicates the total number of bytes in the UDP segment (header plus data).

  • Checksum: Used for error checking to verify data integrity during transmission.

    • Sender computes checksum and receiver verifies against received checksum value.

Reading Material Overview

  • Introduction to transport-layer services focusing on:

    • Relationship between transport and network layers

    • Multiplexing and demultiplexing

    • Connectionless transport, UDP, UDP segment structure, and UDP checksum.