COMP 3400 Networks Lecture 6: Transport Layer - Reliable Delivery, TCP
major resource: Computer Networking (4th Edition), Kurose and Ross, Addison Wesley, 2008

[ previous | schedule | next ]

Simplest protocol for reliable delivery

Stop-and-wait protocols for reliable delivery

Stop-and-wait with reliable channel

Stop-and-wait with corrupt channel

Stop-and-wait with lossy channel

Consider performance of all stop-and-wait protocols

Sliding window protocols for reliable delivery

TCP – Transport Control Protocol

Overview

TCP provides connection-oriented service.

TCP Segment Structure

TCP Reliable Transmission

Sequence and ACK numbers are handled thusly:

TCP Connection setup : 3 way handshake

Three-way handshake to establish connection : 3 segments exchanged
  1. client-to-server connection request :
  2. server-to-client response:
  3. client-to-server confirmation:
If server socket not prepared for connection (or client sends wrong socket number), server responds with RST flag instead of SYN flag

SYN Flood: Connection protocol makes server vulnerable to SYN flood denial of service attack: Malicious client sends flood of fake SYN requests, server allocates buffer space before verifying the request via handshake. Solution? SYN cookie: server does not allocate upon SYN request but instead crafts special initial Sequence number in its SYN response. If ACK response arrives, verify ack number then allocate buffers.

Double exchange to terminate connection

Think of it as one exchange to cut off one direction of duplex and second exchange to cut off other direction.
(we’ll show client initiating the sequence; could be either party)
  1. A is finished, sends B a segment with FIN bit set.
  2. B sends acknowledgement to A, and deallocates its buffers
A-to-B direction is now closed.
  1. B sends A a segment with FIN bit set
  2. A sends acknowledgement to B, waits awhile, then deallocates its buffers
B-to-A direction is now closed.

TCP Flow and Congestion Control


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

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