Error Control in TCP
- Loss detection: sender based (Timer)
- adaptive timeout calculation
- triple duplicate ACK
- Acknowledgement: cumulative ACK
- sequence number: next octet that the receiver expects to get.
- variable message length; retransmitted messages can include
more than the original.
- Retransmision: (no specification)
- until 1987: GBN
- since 1987: Selective Retransmit
- proposed modification: selective ACK
Simplified TCP Sender
switch (event) { data received from application above: create TCP segment w/sequence number NextSeqNum if (timer not running) start timer pass segment to IP NextSeqNum += length(data) timer timeout: retranmit not-yet-acknowledged segment with smallest sequence number start timer ACK received, with ACK field value of y: if (y > SendBase) { SendBase = y if (not-yet-acknowledged segments) start timer } }
Connection Management
- Connectionless vs. connection-oriented
- Connection:
association between a pair of protocol entities.
- Connection record:
state information about a particular connection (data structure at sender and receiver).
- Connection identifier:
identifier for a particular connection.
- Handshake-based or timer-based
Connection Management
- Requirements:
- no identifier reuse while copies of a PDU/ACK are alive.
- identifiers from a previously terminated connections should
not cause a new connection to be opened/closed.
- PDUs from previous connections should not be accepted.
- graceful close
- receiver: all possible retransmissions received and responded to them.
- sender: received all ACKs of sent PDUs.
- Problems:
- reuse of connection id
- limited storage (release of connection records)
- crash