TCP协议

今天看 netstat 的时候发现了 一大批条的 
SYN-RECEIVED
  ESTABLISHED
  FIN-WAIT-1
  FIN-WAIT-2
  CLOSE-WAIT
  CLOSING
  LAST-ACK

 TIME-WAIT 不认识。

于是百度来百度去,牵扯到tcp,顺便把TCP协议看了下,rfc793还没看。

大部分知识以前有了解,但是 这里的FIN-WAIT-1不理解,最后看到 wiki英文版解释才懂   

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.

才理解原来 FIN-WAIT 是  在 客户端和服务端 都可以发生的状态。

后面的  CLOSE-WAIT 里的 local user 是什么鬼?而且也是 客户端、服务端都可能发生的状态--难道需要我去看 rfc793吗?

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值