COMP 3400 Networks Lecture 5: Transport Layer - Basic Service, UDP
major resource: Computer Networking (4th Edition), Kurose and Ross, Addison Wesley, 2008

[ previous | schedule | next ]

Basic Transport Services

Transport layer provides, minimally, process-to-process (e.g. client application-to-server application) communication.

For Internet communication, this involves:
(a) getting the packet from the sender’s machine to the receiver’s machine. IP, the network layer, does this.
(b) once packet arrives at receiver, delivering it to the correct process – TCP and UDP both do this.

Service: Reliable Delivery

Service: Deliver to correct process once datagram arrives

Transport Header contains two 16-bit fields (both TCP and UDP contain these, at byte 0 and byte 2):
(a) source port #
(b) destination port #

Simple transport level exchange between client and server:

  1. server is up and running and listening on port X.
  2. client initiates contact, sends segment with destination port X, source port Y (selected automatically from pool of unused ports)
  3. segment arrives at server machine, destination port is read, and delivered to the process running on port X (the server process).
  4. server formulates response, sends segment with destination port Y, source port X.
  5. segment arrives at client machine, destination port is read, and delivered to the process running on port Y (the client process).
  6. client formulates response, sends segment with destination port X, source port Y.
  7. etc.

The lesson for delivering to correct process: Combination of destination and source port #s will be unique, except if two clients connect to same server from different IP addresses through same source port#. In this case, differentiate based on IP address.

UDP – User Datagram Protocol

Datagram service. Used by DNS, SNMP (Simple Network Management Protocol), some A/V protocols, and a few others.

Motivation: if best-effort ("I'll try my best, but make no guarantees.") delivery is good enough, then UDP is fast (no connection setup) and cheap. Also helps if sender and receiver operate at similar rates (to avoid flooding).

Segment Structure:

  1. source port (16 bits)
  2. destination port(16 bits)
  3. segment length(16 bits)
  4. checksum(16 bits)
  5. payload (variable length)

Comments about the segment structure


[ COMP 3400 | Peter Sanderson | Math Sciences home page | Otterbein ]

Last updated:
Peter Sanderson (PSanderson@otterbein.edu)