http://www.tcpipguide.com/free/t_TCPConnectionTermination-4.htm
TCP Connection Termination
(Page 4 of 4)
Simultaneous Connection Termination
Just as it is possible for the normal connection establishment process to be changed if two devices decide to actively OPEN a connection to each other, it is also possible for two devices to try to terminate a connection simultaneously. This term “simultaneously” doesn't mean that they both decide to shut down at exactly the same time—variances in network delays mean nothing can be simultaneous on an internetwork anyway. It simply means that, in the example above, the client decides to shut down and sends a FIN, but the server sends its own FIN before the client's FIN shows up at the server. In that case, a different procedure is followed, as described in Table 155 and Figure 215.
As you can see, the process is much more symmetric in this case, with both devices transitioning through the same states. In either case the end result is the same, with the connection in the CLOSED state—meaning no connection. Each TCP will make sure all outstanding data is sent to the application, sometimes referred to as an implied “push” (see the description of the “push” function for an explanation of this term). The transmission control blocks (TCBs) established for the connection in both devices are destroyed when the connection is closed down.
Table 155: TCP Simultaneous Connection Termination Procedure
Client
|
|
|
Server
|
|
|
Start State
|
Action
|
Transitions To State
|
Start State
|
Action
|
Transitions To State
|
ESTABLISHED
|
Client Close Step #1 Transmit: The application using TCP signals that the connection is no longer needed. The TCP on the client sends the next segment with the FIN bit set, indicating a request to close the connection.
|
FIN-WAIT-1
|
ESTABLISHED
|
Server Close Step #1 Transmit: Before the server can receive the FIN sent by the client, the application on the server also signals a close. The server also sends a FIN.
|
FIN-WAIT-1
|
FIN-WAIT-1
|
Server Close Step #1 Receive and Step #2 Transmit: The client has sent a FIN and is waiting for it to be acknowledged. Instead, it receives the FIN sent by the server. It acknowledges the server's close request with an ACK and continues to wait for its own ACK.
|
CLOSING
|
FIN-WAIT-1
|
Client Close Step #1 Receive and Step #2 Transmit: The server has sent a FIN and is waiting for it to be acknowledged. Instead, it receives the FIN sent by the client. It acknowledges the client's close request with an ACK and continues to wait for its own ACK.
|
CLOSING
|
CLOSING
|
Client Close Step #2 Receive: The client receives the ACK for its FIN.
|
TIME-WAIT
|
CLOSING
|
Server Close Step #2 Receive: The server receives the ACK for its FIN.
|
TIME-WAIT
|
TIME-WAIT
|
The client waits for a period of time equal to double the maximum segment life (MSL) time. This gives enough time to ensure the ACK it sent to the server was received.
|
—
|
TIME-WAIT
|
The server waits for a period of time equal to double the maximum segment life (MSL) time. This gives enough time to ensure the ACK it sent to the client was received.
|
—
|
TIME-WAIT
|
The timer expires after double the MSL time.
|
CLOSED
|
TIME-WAIT
|
The timer expires after double the MSL time.
|
CLOSED
|
CLOSED
|
The connection is closed.
|
—
|
CLOSED
|
The connection is closed.
|
—
|
Figure 215: TCP Simultaneous Connection Termination Procedure
Under certain circumstances both devices may decide to terminate a connection simultaneously, or nearly simultaneously. In this case each sends a FIN and before getting an ACK for it, receives the other device’s FIN. Each acknowledges the other’s FIN and waits for a period of time before closing the connection. Note the transition through the CLOSING state, which is only used as part of simultaneous termination.
|
Key Concept: Just as two devices can simultaneously open a TCP session, they can terminate it simultaneously as well. In this case a different state sequence is followed, with each device responding to the other’s FIN with an ACK, waiting for receipt of its own ACK, and pausing for a period of time to ensure that its ACK is received by the other device before ending the connection.
|
分享到:
相关推荐
Advanced Process Termination 2.1 用多种方法结束进程 一般用于测试安全工具的自我保护的测试
一份描述网口Bob Smith的电路,对于了解此电路的功能有很大的帮助
Termination of Coverage.pdf
In the past there have been two main termination specifications for UTP data cable infrastructure and yet another for phone cable infrastructure. In today’s world of structured cable systems where ...
Atom-Termination.zip,Integrated terminal for Atom. Looks like terminal-plus, acts like your native terminal (except every other Friday). Looking for collaborators! :-)终止,atom是一个用web技术构建的...
使用这个程序可以轻易关闭著名杀毒软件、系统关键进程,但使用前请关闭杀毒软件&防火墙,以免误杀。
Transmission lines equations for coupled lines symmetrical lines and symmetrically driven homogeneous medium symmetrical lines in homogeneous medium symmetrical lines and asymmetrical driven ...
Bob Smith Termination patent
MOLAND: Termination of the consent solicitation.pdf
程序验证 终止性分析 非线性循环程序 , 非线性循环程序的终止性分析,一篇非常好的文章,不过实在太简单了点
FPGA端口电平配置的工程文件,可以实现不同的端口配置,包括PECL,TTL,LVDS等,关键是看引脚分配的.UCF文件
Suvarna 等 - 2015 - Ion Implantation-Based Edge Termination to Improve.pdf
TCP Connection Establishment and Termination Section 2.7. TIME_WAIT State Section 2.8. SCTP Association Establishment and Termination Section 2.9. Port Numbers Section 2.10. TCP Port Numbers ...
An additional 4th port allows proper termination of the antenna when turned off. This SP3T offers low insertion loss and high robustness against interferer signals at the antenna port, while ...
目的 应用程序是一种确保可抢占节点在将要被抢占以便Kubernetes更新其管理时接收信号的方法。 没有节点就迷路了,Kubernetes需要一段时间才能意识到它已经消失并更新了管理。 同时,请求可以继续发送到不再存在的Pod...
AWS节点终止处理程序 轻松处理Kubernetes中的EC2实例关闭 项目总结 该项目确保Kubernetes控制平面通过API或控制台对可能导致EC2... aws-node-termination-handler 监视器将在每个主机上运行一个小型Pod,以执行对IMD
A.- M. MAYER. - On the expérimental détermination of the relative intensities of sounds; and on the measurement of the powers of various substance
ecs-spot-termination配置集 此配置集安装了一个现场终止脚本,该脚本将连续运行并监视现场两分钟警告。 看到两分钟的警告后,它将从ECS群集中耗尽实例。什么是lono配置集? Lono配置集允许通常嵌入在模板中的 可...