📄 rfc1644.txt
字号:
does not have a send window for the server host. This is not a great difficulty; we simply define a default initial window; our current suggestion is 4K. Such a non-zero default should be be conditioned upon the existence of a cached connection count for the foreign host, so that data may be included on an initial SYN segment only if cache.CC[foreign host] is non-zero. In TCP, the window is dynamically adjusted to provide congestion control/avoidance [Jacobson88]. It is possible that a particular path might not be able to absorb an initial burst of 4096 bytes without congestive losses. If this turns out to be a problem, it should be possible to cache the congestion threshold for the path and use this value to determine the maximum size of the initial packet burst created by a request. 3.2 New TCP Options Three new TCP options are defined: CC, CC.NEW, and CC.ECHO. Each carries a connection count SEG.CC. The complete rules for sending and processing these options are given in Section 3.4 below.Braden [Page 17]RFC 1644 Transaction/TCP July 1994 CC Option Kind: 11 Length: 6 +--------+--------+--------+--------+--------+--------+ |00001011|00000110| Connection Count: SEG.CC | +--------+--------+--------+--------+--------+--------+ Kind=11 Length=6 This option may be sent in an initial SYN segment, and it may be sent in other segments if a CC or CC.NEW option has been received for this incarnation of the connection. Its SEG.CC value is the TCB.CCsend value from the sender's TCB. CC.NEW Option Kind: 12 Length: 6 +--------+--------+--------+--------+--------+--------+ |00001100|00000110| Connection Count: SEG.CC | +--------+--------+--------+--------+--------+--------+ Kind=12 Length=6 This option may be sent instead of a CC option in an initial <SYN> segment (i.e., SYN but not ACK bit), to indicate that the SEG.CC value may not be larger than the previous value. Its SEG.CC value is the TCB.CCsend value from the sender's TCB. CC.ECHO Option Kind: 13 Length: 6 +--------+--------+--------+--------+--------+--------+ |00001101|00000110| Connection Count: SEG.CC | +--------+--------+--------+--------+--------+--------+ Kind=13 Length=6 This option must be sent (in addition to a CC option) in a segment containing both a SYN and an ACK bit, if the initial SYN segment contained a CC or CC.NEW option. Its SEG.CC value is the SEG.CC value from the initial SYN.Braden [Page 18]RFC 1644 Transaction/TCP July 1994 A CC.ECHO option should be sent only in a <SYN,ACK> segment and should be ignored if it is received in any other segment. 3.3 Connection States T/TCP requires new connection states and state transitions. Figure 8 shows the resulting finite state machine; see [RFC-1379] for a detailed development. If all state names ending in stars are removed from Figure 8, the state diagram reduces to the standard TCP state machine (see Figure 6 of [STD-007]), with two exceptions: * STD-007 shows a direct transition from SYN-RECEIVED to FIN- WAIT-1 state when the user issues a CLOSE call. This transition is suspect; a more accurate description of the state machine would seem to require the intermediate SYN- RECEIVED* state shown in Figure 8. * In STD-007, a user CLOSE call in SYN-SENT state causes a direct transition to CLOSED state. The extended diagram of Figure 8 forces the connection to open before it closes, since calling CLOSE to terminate the request in SYN-SENT state is normal behavior for a transaction client. In the case that no data has been sent in SYN-SENT state, it is reasonable for a user CLOSE call to immediately enter CLOSED state and delete the TCB. Each of the new states in Figure 8 bears a starred name, created by suffixing a star onto a standard TCP state. Each "starred" state bears a simple relationship to the corresponding "unstarred" state. o SYN-SENT* and SYN-RECEIVED* differ from the SYN-SENT and SYN-RECEIVED state, respectively, in recording the fact that a FIN needs to be sent. o The other starred states indicate that the connection is half-synchronized (hence, a SYN bit needs to be sent).Braden [Page 19]RFC 1644 Transaction/TCP July 1994 ________ g ________ | |<------------| | | CLOSED |------------>| LISTEN | |________| h ------|________| | / | | | / i| j| | / | | a| a'/ | _V______ ________ | / j | |ESTAB- | e' | CLOSE- | | / -----------|-->| LISHED*|------------>| WAIT*| | / / | |________| |________| | / / | | | | | | / / | | c| d'| c| ____V_V_ / _______V | __V_____ | __V_____ | SYN- | b' | SYN- |c | |ESTAB- | e | | CLOSE- | | SENT |------>|RECEIVED|---|->| LISHED|----------|->| WAIT | |________| |________| | |________| | |________| | | | | | | | | | | __V_____ | | | | | | LAST- | | d'| d'| d'| d| | ACK* | | | | | | |________| | | | | | | | | | ______V_ | ________ |c' |d | k | | FIN- | | e''' | | | | | -------|-->| WAIT-1*|---|------>|CLOSING*| | | | / | |________| | |________| | | | / | | | | | | | / | c'| | c'| | | ___V___ / ____V___ V_____V_ ____V___ V____V__ | SYN- | b'' | SYN- | c | FIN- | e'' | | | LAST- | | SENT* |---->|RECEIVD*|---->| WAIT-1 |---->|CLOSING | | ACK | |________| |________| |________| |________| |________| | | | f| f| f'| ___V____ ____V___ ___V____ | FIN- | e |TIME- | T | | | WAIT-2 |---->| WAIT |-->| CLOSED | |________| |________| |________| Figure 8A: Basic T/TCP State DiagramBraden [Page 20]RFC 1644 Transaction/TCP July 1994 ________________________________________________________________ | | | Label Event / Action | | _____ ________________________ | | | | a Active OPEN / create TCB, snd SYN | | a' Active OPEN / snd SYN | | b rcv SYN [no TAO]/ snd ACK(SYN) | | b' rcv SYN [no TAO]/ snd SYN,ACK(SYN) | | b'' rcv SYN [no TAO]/ snd SYN,FIN,ACK(SYN) | | c rcv ACK(SYN) / | | c' rcv ACK(SYN) / snd FIN | | d CLOSE / snd FIN | | d' CLOSE / snd SYN,FIN | | e rcv FIN / snd ACK(FIN) | | e' rcv FIN / snd SYN,ACK(FIN) | | e'' rcv FIN / snd FIN,ACK(FIN) | | e''' rcv FIN / snd SYN,FIN,ACK(FIN) | | f rcv ACK(FIN) / | | f' rcv ACK(FIN) / delete TCB | | g CLOSE / delete TCB | | h passive OPEN / create TCB | | i (= b') rcv SYN [no TAO]/ snd SYN,ACK(SYN) | | j rcv SYN [TAO OK] / snd SYN,ACK(SYN) | | k rcv SYN [TAO OK] / snd SYN,FIN,ACK(SYN) | | T timeout=2MSL / delete TCB | | | | | | Figure 8B. Definition of State Transitions | |________________________________________________________________| This simple correspondence leads to an alternative state model, which makes it easy to incorporate the new states in an existing implementation. Each state in the extended FSM is defined by the triplet: (old_state, SENDSYN, SENDFIN) where 'old_state' is a standard TCP state and SENDFIN and SENDSYN are Boolean flags see Figure 9. The SENDFIN flag is turned on (on the client side) by a SEND(... EOF=YES) call, to indicate that a FIN should be sent in a state which would not otherwise send a FIN. The SENDSYN flag is turned on when the TAO test succeeds to indicate that the connection is only half synchronized; as a result, a SYN will be sent in a state which would not otherwise send a SYN.Braden [Page 21]RFC 1644 Transaction/TCP July 1994 ________________________________________________________________ | | | New state: Old_state: SENDSYN: SENDFIN: | | __________ __________ ______ ______ | | | | SYN-SENT* => SYN-SENT FALSE TRUE | | | | SYN-RECEIVED* => SYN-RECEIVED FALSE TRUE | | | | ESTABLISHED* => ESTABLISHED TRUE FALSE | | | | CLOSE-WAIT* => CLOSE-WAIT TRUE FALSE | | | | LAST-ACK* => LAST-ACK TRUE FALSE | | | | FIN-WAIT-1* => FIN-WAIT-1 TRUE FALSE | | | | CLOSING* => CLOSING TRUE FALSE | | | | | | Figure 9: Alternative State Definitions | |________________________________________________________________| Here is a more complete description of these boolean variables. * SENDFIN SENDFIN is turned on by the SEND(...EOF=YES) call, and turned off when FIN-WAIT-1 state is entered. It may only be on in SYN-SENT* and SYN-RECEIVED* states. SENDFIN has two effects. First, it causes a FIN to be sent on the last segment of data from the user. Second, it causes the SYN-SENT[*] and SYN-RECEIVED[*] states to transition directly to FIN-WAIT-1, skipping ESTABLISHED state. * SENDSYN The SENDSYN flag is turned on when an initial SYN segment is received and passes the TAO test. SENDSYN is turned off when the SYN is acknowledged (specifically, when there is no RST or SYN bit and SEG.UNA < SND.ACK). SENDSYN has three effects. First, it causes the SYN bit to be set in segments sent with the initial sequence number (ISN). Second, it causes a transition directly from LISTEN state to ESTABLISHED*, if there is no FIN bit, or otherwiseBraden [Page 22]RFC 1644 Transaction/TCP July 1994 to CLOSE-WAIT*. Finally, it allows data to be received and processed (passed to the application) even if the segment
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -