如果最后一个 ack 在 TCP 终止时丢失了怎么办? [英] How if the last ack is lost in TCP termination?
问题描述
A
发送一个 fin
给 B
,然后 B
发送一个 ack
和一个 fin
到 A
.然后 B
进入状态 LAST_ACK
,A
进入状态 TIME_WAIT
,现在,B
如果A
的最后一个ack
丢失,B
的重传请求也丢失了?B
会继续发送重传请求还是关闭套接字?(我们知道,如果A
设置SO_LINGER
为0,当A
关闭它的socket时,会导致RESET
在 B
上.)
A
send a fin
to B
, then B
send a ack
and a fin
to A
. Then B
goes to state LAST_ACK
, and A
goes to state TIME_WAIT
, and now, what will happen to B
if the last ack
from A
is lost, and the retransmission request from B
is lost too? Will B
continue send retransmission request or close socket or else? (We know, if A
set SO_LINGER
to 0, when A
close its socket, it will cause a RESET
on B
.)
推荐答案
与任何数据段相同.TCP 会重试发送一定次数,然后重置连接.
Same as with any data segment. TCP will retry the send a certain number of times and then reset the connection.
这篇关于如果最后一个 ack 在 TCP 终止时丢失了怎么办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!