draft-ietf-tcpm-rfc793bis-01.txt   draft-ietf-tcpm-rfc793bis-02.txt 
Internet Engineering Task Force W. Eddy, Ed. Internet Engineering Task Force W. Eddy, Ed.
Internet-Draft MTI Systems Internet-Draft MTI Systems
Obsoletes: 793, 879, 6093, 6528, 6691 September 21, 2015 Obsoletes: 793, 879, 6093, 6528, 6691 March 21, 2016
(if approved) (if approved)
Updates: 1122 (if approved) Updates: 1122 (if approved)
Intended status: Standards Track Intended status: Standards Track
Expires: March 24, 2016 Expires: September 22, 2016
Transmission Control Protocol Specification Transmission Control Protocol Specification
draft-ietf-tcpm-rfc793bis-01 draft-ietf-tcpm-rfc793bis-02
Abstract Abstract
This document specifies the Internet's Transmission Control Protocol This document specifies the Internet's Transmission Control Protocol
(TCP). TCP is an important transport layer protocol in the Internet (TCP). TCP is an important transport layer protocol in the Internet
stack, and has continuously evolved over decades of use and growth of stack, and has continuously evolved over decades of use and growth of
the Internet. Over this time, a number of changes have been made to the Internet. Over this time, a number of changes have been made to
TCP as it was specified in RFC 793, though these have only been TCP as it was specified in RFC 793, though these have only been
documented in a piecemeal fashion. This document collects and brings documented in a piecemeal fashion. This document collects and brings
those changes together with the protocol specification from RFC 793. those changes together with the protocol specification from RFC 793.
skipping to change at page 2, line 4 skipping to change at page 2, line 4
Internet-Drafts are working documents of the Internet Engineering Internet-Drafts are working documents of the Internet Engineering
Task Force (IETF). Note that other groups may also distribute Task Force (IETF). Note that other groups may also distribute
working documents as Internet-Drafts. The list of current Internet- working documents as Internet-Drafts. The list of current Internet-
Drafts is at http://datatracker.ietf.org/drafts/current/. Drafts is at http://datatracker.ietf.org/drafts/current/.
Internet-Drafts are draft documents valid for a maximum of six months Internet-Drafts are draft documents valid for a maximum of six months
and may be updated, replaced, or obsoleted by other documents at any and may be updated, replaced, or obsoleted by other documents at any
time. It is inappropriate to use Internet-Drafts as reference time. It is inappropriate to use Internet-Drafts as reference
material or to cite them other than as "work in progress." material or to cite them other than as "work in progress."
This Internet-Draft will expire on March 24, 2016. This Internet-Draft will expire on September 22, 2016.
Copyright Notice Copyright Notice
Copyright (c) 2015 IETF Trust and the persons identified as the Copyright (c) 2016 IETF Trust and the persons identified as the
document authors. All rights reserved. document authors. All rights reserved.
This document is subject to BCP 78 and the IETF Trust's Legal This document is subject to BCP 78 and the IETF Trust's Legal
Provisions Relating to IETF Documents Provisions Relating to IETF Documents
(http://trustee.ietf.org/license-info) in effect on the date of (http://trustee.ietf.org/license-info) in effect on the date of
publication of this document. Please review these documents publication of this document. Please review these documents
carefully, as they describe your rights and restrictions with respect carefully, as they describe your rights and restrictions with respect
to this document. Code Components extracted from this document must to this document. Code Components extracted from this document must
include Simplified BSD License text as described in Section 4.e of include Simplified BSD License text as described in Section 4.e of
the Trust Legal Provisions and are provided without warranty as the Trust Legal Provisions and are provided without warranty as
skipping to change at page 12, line 48 skipping to change at page 12, line 48
The state diagram in Figure 4 illustrates only state changes, The state diagram in Figure 4 illustrates only state changes,
together with the causing events and resulting actions, but addresses together with the causing events and resulting actions, but addresses
neither error conditions nor actions which are not connected with neither error conditions nor actions which are not connected with
state changes. In a later section, more detail is offered with state changes. In a later section, more detail is offered with
respect to the reaction of the TCP to events. respect to the reaction of the TCP to events.
NOTA BENE: this diagram is only a summary and must not be taken as NOTA BENE: this diagram is only a summary and must not be taken as
the total specification. the total specification.
+---------+ ---------\ active OPEN +---------+ ---------\ active OPEN
| CLOSED | \ ----------- | CLOSED | \ -----------
+---------+<---------\ \ create TCB +---------+<---------\ \ create TCB
| ^ \ \ snd SYN | ^ \ \ snd SYN
passive OPEN | | CLOSE \ \ passive OPEN | | CLOSE \ \
------------ | | ---------- \ \ ------------ | | ---------- \ \
create TCB | | delete TCB \ \ create TCB | | delete TCB \ \
V | \ \ V | \ \
rcv RST (note 1) +---------+ CLOSE | \ rcv RST (note 1) +---------+ CLOSE | \
-------------------->| LISTEN | ---------- | | -------------------->| LISTEN | ---------- | |
/ +---------+ delete TCB | | / +---------+ delete TCB | |
/ rcv SYN | | SEND | | / rcv SYN | | SEND | |
/ ----------- | | ------- | V / ----------- | | ------- | V
+---------+ snd SYN,ACK / \ snd SYN +---------+ +--------+ snd SYN,ACK / \ snd SYN +--------+
| |<----------------- ------------------>| | | |<----------------- ------------------>| |
| SYN | rcv SYN | SYN | | SYN | rcv SYN | SYN |
| RCVD |<-----------------------------------------------| SENT | | RCVD |<-----------------------------------------------| SENT |
| | snd SYN,ACK | | | | snd SYN,ACK | |
| |------------------ -------------------| | | |------------------ -------------------| |
+---------+ rcv ACK of SYN \ / rcv SYN,ACK +---------+ +--------+ rcv ACK of SYN \ / rcv SYN,ACK +--------+
| -------------- | | ----------- | -------------- | | -----------
| x | | snd ACK | x | | snd ACK
| V V | V V
| CLOSE +---------+ | CLOSE +---------+
| ------- | ESTAB | | ------- | ESTAB |
| snd FIN +---------+ | snd FIN +---------+
| CLOSE | | rcv FIN | CLOSE | | rcv FIN
V ------- | | ------- V ------- | | -------
+---------+ snd FIN / \ snd ACK +---------+ +---------+ snd FIN / \ snd ACK +---------+
| FIN |<----------------- ------------------>| CLOSE | | FIN |<----------------- ------------------>| CLOSE |
| WAIT-1 |------------------ | WAIT | | WAIT-1 |------------------ | WAIT |
+---------+ rcv FIN \ +---------+ +---------+ rcv FIN \ +---------+
| rcv ACK of FIN ------- | CLOSE | | rcv ACK of FIN ------- | CLOSE |
| -------------- snd ACK | ------- | | -------------- snd ACK | ------- |
V x V snd FIN V V x V snd FIN V
+---------+ +---------+ +---------+ +---------+ +---------+ +---------+
|FINWAIT-2| | CLOSING | | LAST-ACK| |FINWAIT-2| | CLOSING | | LAST-ACK|
+---------+ +---------+ +---------+ +---------+ +---------+ +---------+
| rcv ACK of FIN | rcv ACK of FIN | | rcv ACK of FIN | rcv ACK of FIN |
| rcv FIN -------------- | Timeout=2MSL -------------- | | rcv FIN -------------- | Timeout=2MSL -------------- |
| ------- x V ------------ x V | ------- x V ------------ x V
\ snd ACK +---------+delete TCB +---------+ \ snd ACK +---------+delete TCB +---------+
------------------------>|TIME WAIT|------------------>| CLOSED | ------------------------>|TIME WAIT|------------------>| CLOSED |
+---------+ +---------+ +---------+ +---------+
note 1: The transition from SYN-RCVD to LISTEN on receiving a RST is note 1: The transition from SYN-RCVD to LISTEN on receiving a RST is
conditional on having reached SYN-RCVD after a passive open. conditional on having reached SYN-RCVD after a passive open.
note 2: An unshown transition exists from FIN-WAIT-1 to TIME-WAIT if note 2: An unshown transition exists from FIN-WAIT-1 to TIME-WAIT if
a FIN is received and the local FIN is also acknowledged. a FIN is received and the local FIN is also acknowledged.
TCP Connection State Diagram TCP Connection State Diagram
Figure 4 Figure 4
3.3. Sequence Numbers 3.3. Sequence Numbers
A fundamental notion in the design is that every octet of data sent A fundamental notion in the design is that every octet of data sent
over a TCP connection has a sequence number. Since every octet is over a TCP connection has a sequence number. Since every octet is
sequenced, each of them can be acknowledged. The acknowledgment sequenced, each of them can be acknowledged. The acknowledgment
mechanism employed is cumulative so that an acknowledgment of mechanism employed is cumulative so that an acknowledgment of
sequence number X indicates that all octets up to but not including X sequence number X indicates that all octets up to but not including X
have been received. This mechanism allows for straight-forward have been received. This mechanism allows for straight-forward
skipping to change at page 25, line 10 skipping to change at page 25, line 10
reduced to the basic 3-way handshake of Figure 5. reduced to the basic 3-way handshake of Figure 5.
An interesting alternative case occurs when TCP A crashes and TCP B An interesting alternative case occurs when TCP A crashes and TCP B
tries to send data on what it thinks is a synchronized connection. tries to send data on what it thinks is a synchronized connection.
This is illustrated in Figure 9. In this case, the data arriving at This is illustrated in Figure 9. In this case, the data arriving at
TCP A from TCP B (line 2) is unacceptable because no such connection TCP A from TCP B (line 2) is unacceptable because no such connection
exists, so TCP A sends a RST. The RST is acceptable so TCP B exists, so TCP A sends a RST. The RST is acceptable so TCP B
processes it and aborts the connection. processes it and aborts the connection.
TCP A TCP B TCP A TCP B
1. (CRASH) (send 300,receive 100) 1. (CRASH) (send 300,receive 100)
2. (??) <-- <SEQ=300><ACK=100><DATA=10><CTL=ACK> <-- ESTABLISHED 2. (??) <-- <SEQ=300><ACK=100><DATA=10><CTL=ACK> <-- ESTABLISHED
3. --> <SEQ=100><CTL=RST> --> (ABORT!!) 3. --> <SEQ=100><CTL=RST> --> (ABORT!!)
Active Side Causes Half-Open Connection Discovery Active Side Causes Half-Open Connection Discovery
Figure 9 Figure 9
In Figure 10, we find the two TCPs A and B with passive connections In Figure 10, we find the two TCPs A and B with passive connections
waiting for SYN. An old duplicate arriving at TCP B (line 2) stirs B waiting for SYN. An old duplicate arriving at TCP B (line 2) stirs B
into action. A SYN-ACK is returned (line 3) and causes TCP A to into action. A SYN-ACK is returned (line 3) and causes TCP A to
generate a RST (the ACK in line 3 is not acceptable). TCP B accepts generate a RST (the ACK in line 3 is not acceptable). TCP B accepts
the reset and returns to its passive LISTEN state. the reset and returns to its passive LISTEN state.
TCP A TCP B TCP A TCP B
skipping to change at page 29, line 5 skipping to change at page 29, line 5
the connection is aborted and the user is told. the connection is aborted and the user is told.
Case 3: both users close simultaneously Case 3: both users close simultaneously
A simultaneous CLOSE by users at both ends of a connection causes A simultaneous CLOSE by users at both ends of a connection causes
FIN segments to be exchanged. When all segments preceding the FIN segments to be exchanged. When all segments preceding the
FINs have been processed and acknowledged, each TCP can ACK the FINs have been processed and acknowledged, each TCP can ACK the
FIN it has received. Both will, upon receiving these ACKs, delete FIN it has received. Both will, upon receiving these ACKs, delete
the connection. the connection.
TCP A TCP B TCP A TCP B
1. ESTABLISHED ESTABLISHED 1. ESTABLISHED ESTABLISHED
2. (Close) 2. (Close)
FIN-WAIT-1 --> <SEQ=100><ACK=300><CTL=FIN,ACK> --> CLOSE-WAIT FIN-WAIT-1 --> <SEQ=100><ACK=300><CTL=FIN,ACK> --> CLOSE-WAIT
3. FIN-WAIT-2 <-- <SEQ=300><ACK=101><CTL=ACK> <-- CLOSE-WAIT 3. FIN-WAIT-2 <-- <SEQ=300><ACK=101><CTL=ACK> <-- CLOSE-WAIT
4. (Close) 4. (Close)
TIME-WAIT <-- <SEQ=300><ACK=101><CTL=FIN,ACK> <-- LAST-ACK TIME-WAIT <-- <SEQ=300><ACK=101><CTL=FIN,ACK> <-- LAST-ACK
5. TIME-WAIT --> <SEQ=101><ACK=301><CTL=ACK> --> CLOSED 5. TIME-WAIT --> <SEQ=101><ACK=301><CTL=ACK> --> CLOSED
6. (2 MSL) 6. (2 MSL)
CLOSED CLOSED
Normal Close Sequence Normal Close Sequence
Figure 11 Figure 11
TCP A TCP B TCP A TCP B
1. ESTABLISHED ESTABLISHED 1. ESTABLISHED ESTABLISHED
2. (Close) (Close) 2. (Close) (Close)
FIN-WAIT-1 --> <SEQ=100><ACK=300><CTL=FIN,ACK> ... FIN-WAIT-1 FIN-WAIT-1 --> <SEQ=100><ACK=300><CTL=FIN,ACK> ... FIN-WAIT-1
<-- <SEQ=300><ACK=100><CTL=FIN,ACK> <-- <-- <SEQ=300><ACK=100><CTL=FIN,ACK> <--
... <SEQ=100><ACK=300><CTL=FIN,ACK> --> ... <SEQ=100><ACK=300><CTL=FIN,ACK> -->
3. CLOSING --> <SEQ=101><ACK=301><CTL=ACK> ... CLOSING 3. CLOSING --> <SEQ=101><ACK=301><CTL=ACK> ... CLOSING
<-- <SEQ=301><ACK=101><CTL=ACK> <-- <-- <SEQ=301><ACK=101><CTL=ACK> <--
... <SEQ=101><ACK=301><CTL=ACK> --> ... <SEQ=101><ACK=301><CTL=ACK> -->
4. TIME-WAIT TIME-WAIT 4. TIME-WAIT TIME-WAIT
(2 MSL) (2 MSL) (2 MSL) (2 MSL)
CLOSED CLOSED CLOSED CLOSED
Simultaneous Close Sequence Simultaneous Close Sequence
Figure 12 Figure 12
A TCP connection may terminate in two ways: (1) the normal TCP close A TCP connection may terminate in two ways: (1) the normal TCP close
sequence using a FIN handshake, and (2) an "abort" in which one or sequence using a FIN handshake, and (2) an "abort" in which one or
more RST segments are sent and the connection state is immediately more RST segments are sent and the connection state is immediately
discarded. If a TCP connection is closed by the remote site, the discarded. If a TCP connection is closed by the remote site, the
local application MUST be informed whether it closed normally or was local application MUST be informed whether it closed normally or was
aborted. aborted.
 End of changes. 28 change blocks. 
67 lines changed or deleted 67 lines changed or added

This html diff was produced by rfcdiff 1.44. The latest version is available from http://tools.ietf.org/tools/rfcdiff/