今天看 netstat 的时候发现了 一大批条的
SYN-RECEIVED
▪
ESTABLISHED
▪
FIN-WAIT-1
▪
FIN-WAIT-2
▪
CLOSE-WAIT
▪
CLOSING
▪
LAST-ACK
FIN-WAIT-1
(both server and client) represents waiting for a connection termination request from the remote TCP, or an acknowledgment of the connection termination request previously sent.
代表 A端 等待从远程TCP也就是 B端 传来的 中断连接 请求 ,或者是 A端 等着 B端对 A端先前发送给B端的中断连接请求 的确认。
和前面那种情况是相反的,反观百度和维基中文“
等待远程TCP连接中断请求,或先前的连接中断请求的确认”,翻译的什么鬼?垃圾!
FIN-WAIT-2
(both server and client) represents waiting for a connection termination request from the remote TCP.
代表 A端 等待从远程TCP也就是 B端 传来的 中断连接 请求 。
CLOSE-WAIT
(both server and client) represents waiting for a connection termination request from the local user.
这里不太明白 local user 是指什么.....
CLOSING
(both server and client) represents waiting for a connection termination request acknowledgment from the remote TCP.
代表 A端 等着 B端对 中断连接 请求的 确认。
LAST-ACK
(both server and client) represents waiting for an acknowledgment of the connection termination request previously sent to the remote TCP (which includes an acknowledgment of its connection termination request).
代表 A端 等着
B端对 A端先前发送给B端的中断连接请求 的确认。
感觉 LAST-ACK 和 CLOSING 的相关性好微妙?到底有什么区别?这里有个链接讲的比我好LAST-ACK和CLOSING区别,这篇博文讲的太好了,完全解答了我的疑惑。
TIME-WAIT
(either server or client) represents waiting for enough time to pass to be sure the remote TCP received the acknowledgment of its connection termination request. [According to
RFC 793 a connection can stay in TIME-WAIT for a maximum of four minutes known as a
MSL (maximum segment lifetime).]
CLOSED
(both server and client) represents no connection state at all.
▪ TIME-WAIT 不认识。
于是百度来百度去,牵扯到tcp,顺便把TCP协议看了下,rfc793还没看。
大部分知识以前有了解,但是 这里的FIN-WAIT-1不理解,最后看到 wiki英文版解释才懂
才理解原来 FIN-WAIT 是 在 客户端和服务端 都可以发生的状态。
后面的 CLOSE-WAIT 里的 local user 是什么鬼?而且也是 客户端、服务端都可能发生的状态--难道需要我去看 rfc793吗?