2

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

Mardanian
  • 191
  • 2
  • 11

2 Answers2

0

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.

user207421
  • 305,947
  • 44
  • 307
  • 483
  • by nothing do you mean it will drop it? I know I said, *data*, but I meant to say *receive anything* – Mardanian Feb 02 '13 at 23:40
  • @Mardanian By nothing I mean nothing. It's not an exotic word. – user207421 Feb 02 '13 at 23:45
  • @Mardanian: in other words, while the socket is in TIME_WAIT, it just ignores received data, but it takes it off the network, at least. A new connection cannot be established using the same src ip:port and dst ip:port until the socket leaves TIME_WAIT. – Remy Lebeau Feb 03 '13 at 02:48
0

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)

Mardanian
  • 191
  • 2
  • 11
  • (a) You didn't ask about FIN. (b) You can figure it out from `tcpdump` by observing whether an RST is sent, which I doubt, or nothing, which is what I said. – user207421 Feb 03 '13 at 03:25
  • (a) Yes, the question was wrong, but *nothing* wasn't the right answer. The correct answer would be to clarify if someone has misunderstanding i.e. in my case, the correct answer was 'NO, ACK isn't possible because of the way TCP termination works' (b) Nothing is not 'reset', because 'reset' is a thing, and not a *nothing*. – Mardanian Feb 03 '13 at 13:32
  • (a) I don't consider a tautological statement like 'isn't possible because of the way TCP termination works' an improvement over 'nothing' in any way. It doesn't explain anything, and is certainly no more 'correct'. (b) Of course 'nothing' is not 'reset', so if you observe an RST via wireshark I am wrong, and if you don't observe it I'm not. I can live with it. Which was it? – user207421 Feb 03 '13 at 22:50