在 TIME_WAIT 状态下接收套接字上的数据 [英] Receive data on socket in TIME_WAIT state

查看:42
本文介绍了在 TIME_WAIT 状态下接收套接字上的数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在以下场景中,当 TIME_WAIT 中的套接字接收到一个段时会发生什么

What happens, in below scenarios, when a socket in TIME_WAIT receives a segment

  • a) 当它收到丢失的 ACK 时
  • b) 当发送节点想要在服务器上使用相同的 src_ip:src_port 建立另一个新连接到相同的 dst_ip:dst_port 时,服务器已经有一个 TIME_WAIT 套接字.

它会忽略/丢弃它、发送重置还是重用 TIME_WAIT 套接字?

Will it ignore/drop it, sends a reset or reuse the TIME_WAIT socket?

谢谢

M

推荐答案

O.K.在深入挖掘并阅读 [第 43 页]Unix 网络编程"一书后,我终于弄清楚我的问题出了什么问题(回答我自己的问题).

O.K. 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).

a) 'Active-Closer',在 TIME_WAIT 状态下,将重新发送 ACK 到丢失/徘徊的 FIN(在此状态下不期待任何 ACK [link]http://upload.wikimedia.org/wikipedia/commons/5/55/TCP_CLOSE.svg)

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)

b) TCP 不会启动处于 TIME_WAIT 状态的连接的新化身.(我仍然不知道它是如何阻止它的,即它是否重置了该连接,我们如何通过读取 tcpdump 来解决这个问题)

b) TCP will not initiate a new incarnation of a connection that is in TIME_WAIT state. (I still don't know how it prevents it, i.e. does it reset that connection, how can we figure this from reading tcpdump)

这篇关于在 TIME_WAIT 状态下接收套接字上的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆