问题
What happens, in below scenarios, when a socket in TIME_WAIT receives a segment
- a) When it receives lost 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.
Will it ignore/drop it, sends a reset or reuse the TIME_WAIT socket?
Thanks
M
回答1:
a) When it receives lost 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.
Nothing.
Neither of these cases corresponds to your title.
回答2:
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) 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 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)
来源:https://stackoverflow.com/questions/14666740/receive-data-on-socket-in-time-wait-state