JMU
Transmission Control Protocol (TCP)
An Introduction


Prof. David Bernstein
James Madison University

Computer Science Department
bernstdh@jmu.edu


Introduction
Properties
Reliability in TCP
Flow Control in TCP
The Need for Connections
The Demultiplexing Process
Moving through the Stack/Layers
Required Functionality of Service Providers
Required Functionality of Service Requestors
TCP Segments
TCP Segment Format
images/tcp-format.gif
Sequence Numbers and ACKs
Establishing a Connection (Three-Way Handshake)
  1. Active participant sends SYN (i.e., a special control segment)
    • Specifies the initial client-to-server sequence (number which is clock-based)
  2. Passive participant responds with ACKofSYN (or SYNACK)
    • Allocates buffers
    • Specifies the initial server-to-client sequence number
  3. Active Participant Responds with ACK
Closing a Connection (Four-Way Procedure)
  1. Peer A sends FIN
  2. Peer Z responds with ACK
  3. Peer Z sends FIN
  4. Peer A responds with ACK
    • And enters a "timed wait" before completely closing
The Lifecycle in Detail (in UML)
images/statechart_tcp.gif
A Simplified Reliability Mechanism