简体   繁体   English

在TIME_WAIT状态下在套接字上接收数据

[英]Receive data on socket in TIME_WAIT state

What happens, in below scenarios, when a socket in TIME_WAIT receives a segment 在以下情况下,当TIME_WAIT中的套接字收到一个段时会发生什么

  • a) When it receives lost ACK a)当收到丢失的ACK时
  • b) When sending node wants to establish another new connection using same src_ip:src_port on the server to same dst_ip:dst_port for which the server already has a TIME_WAIT socket. b)当发送节点想要使用服务器上相同的src_ip:src_port与服务器已经具有TIME_WAIT套接字的相同dst_ip:dst_port建立另一个新连接时。

Will it ignore/drop it, sends a reset or reuse the TIME_WAIT socket? 它会忽略/丢弃它,发送重置消息还是重用TIME_WAIT套接字?

Thanks 谢谢

M 中号

a) When it receives lost ACK a)当收到丢失的ACK时

Nothing. 没有。

b) When sending node wants to establish another new connection using same src_ip:src_port on the server to same dst_ip:dst_port for which the server already has a TIME_WAIT socket. b)当发送节点想要使用服务器上相同的src_ip:src_port与服务器已经具有TIME_WAIT套接字的相同dst_ip:dst_port建立另一个新连接时。

Nothing. 没有。

Neither of these cases corresponds to your title. 这两种情况都不符合您的标题。

OK After digging a bit more and reading the book [page 43] 'Unix Network Programming' I finally figured out what was wrong with my question (answering my own question). OK在深入研究并阅读了本书[第43页]'Unix Network Programming'之后,我终于弄清楚了我的问题出了什么问题(回答了我自己的问题)。

a) The 'Active-Closer', while in TIME_WAIT state, will re-send ACK to a lost/wandering FIN (It is not expecting any ACK at this state [link] http://upload.wikimedia.org/wikipedia/commons/5/55/TCP_CLOSE.svg ) a)处于TIME_WAIT状态的“主动关闭器”将ACK重新发送到丢失/游荡的FIN(在此状态下,预计不会收到任何ACK [link] http://upload.wikimedia.org/wikipedia/ commons / 5/55 / TCP_CLOSE.svg

b) TCP will not initiate a new incarnation of a connection that is in TIME_WAIT state. b)TCP将不会启动处于TIME_WAIT状态的连接的新形式。 (I still don't know how it prevents it, ie does it reset that connection, how can we figure this from reading tcpdump) (我仍然不知道它是如何阻止它的,即它会重置该连接,我们如何通过读取tcpdump来解决这个问题)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM