Home > other >  TIME - how do you know each other a WAIT state have received the final ACK
TIME - how do you know each other a WAIT state have received the final ACK

Time:02-01

TCP communications actively disconnect side finally sends an ACK will enter the TIME_WAIT state after waiting 2 MSL, if the other party received retransmission,
Of this description is not very understanding, FIN is received by the other party of the ACK to determine whether you need to resend, how do you know each other that the final ACK is ever received?

CodePudding user response:

CSDN BBS is becoming more and more cold and cheerless

CodePudding user response:

This should tie in with the TCP state transition diagram to see more clearly,
(1). Shake hands four times, for example, take the initiative to shut down one side only after receiving from the side FIN will switch to the TIME_WAIT state from FIN_WAIT_2 state,
(2). After receiving legal FIN, sends an ACK, simple ACK packet will not be retransmitted,
(3). If the client is not receiving an ACK, will the retransmission FIN bag, after receiving a FIN bag and take the initiative to shut down side again ACK,
(4). If the passive side always failed to receive an ACK, will eventually exceed the maximum retransmission times, the connection is closed,

CodePudding user response:

refer to the second floor hlj_wsf response:
this to match the TCP state transition diagram to see more clearly,
(1). Shake hands four times, for example, take the initiative to shut down one side only after receiving from the side FIN will switch to the TIME_WAIT state from FIN_WAIT_2 state,
(2). After receiving legal FIN, sends an ACK, simple ACK packet will not be retransmitted,
(3). If the client is not receiving an ACK, will the retransmission FIN bag, after receiving a FIN bag and take the initiative to shut down side again ACK,
(4). If the passive side always failed to receive an ACK, will eventually exceed the maximum retransmission times, the connection is closed,

Retransmission mechanism between the FIN and an ACK I have no doubt, including failed attempt to most times, the above four points I agree, but I doubt the final step, not from the Internet kao for image annotation, finally sends an ACK entered TIME_WAIT etc after confirm receipt, otherwise repeat, I look at the state transition diagram, the other party may have no response,

CodePudding user response:

reference weinianjie1 reply: 3/f
Quote: refer to the second floor hlj_wsf response:

This should tie in with the TCP state transition diagram to see more clearly,
(1). Shake hands four times, for example, take the initiative to shut down one side only after receiving from the side FIN will switch to the TIME_WAIT state from FIN_WAIT_2 state,
(2). After receiving legal FIN, sends an ACK, simple ACK packet will not be retransmitted,
(3). If the client is not receiving an ACK, will the retransmission FIN bag, after receiving a FIN bag and take the initiative to shut down side again ACK,
(4). If the passive side always failed to receive an ACK, will eventually exceed the maximum retransmission times, the connection is closed,

Retransmission mechanism between the FIN and an ACK I have no doubt, including failed attempt to most times, the above four points I agree, but I doubt the final step, not from the Internet kao for image annotation, finally sends an ACK entered TIME_WAIT etc after confirm receipt, otherwise repeat, I look at the state transition diagram, the other party may have no response,


Active closed one party is unable to know whether the other received an ACK, so the widely adopted the retransmission strategy for several times and then abandoned, because in the two sides can't unreliable channel of communication agree on a certain event,
  • Related