TCP: Transmission Control Protocol

 


Overview

 


Segment Format

Field

Bits

Description

Source Port

16

service access point at source host

Destination Port

16

service access point at destination host

Sequence Number

32

byte offset, for sliding window tranmission

Acknowledgement Number

32

also used in sliding window

TCP Header Length

4

in 32-bit words

unused

6

 

Code Bits

6

six 1-bit control fields, explained below

Window Size

16

used in variable-length sliding window

Checksum

16

1's comp. sum of segment in 16-bit words

Urgent Pointer

16

byte offset of special signals (e.g. Ctrl-C)

Options

n * 32

n = # options specified

Data

0-max

max = what will fit in datagram

Code bits are:

  1. URG : Urgent pointer is used. Pointer is byte offset of interrupt character (such as Ctrl-C)
  2. ACK : This segment contains an acknowledgement, so use the Ack.Number field.
  3. PSH : deliver data to destination w/o buffering (short for push)
  4. RST : reset a scrambled connection
  5. SYN : used in connection establishment (explained below)
  6. FIN : used in connection termination "I have nothing more to send" (explained below)

Checksum: partition segment plus "pseudoheader" (IP addresses, TCP protocol number, segment length) into 16=bit pieces, sum the 1's complement of those values, then take the 1's complement of the sum. When receiver calculates checksum of received segment, result should be 0.

Options: examples: request max segment length other endpoint will accept (used in connect setup), negotiate window size > 64K, use of "selective repeat" for more efficient sliding window.

 


Connections

 


Reliable Transmission


Flow Control

 


Congestion Control

    1. # bytes that can be send without worsening congestion (congestion window)
    2. # bytes available in receiver window

 

  


Related Home Pages: notes | CSC 465 | Peter Sanderson | Computer Science | SMSU


Last reviewed: 21 April 1998

Peter Sanderson ( pete@csc.smsu.edu )