如果最后一个 ack 在 TCP 终止时丢失了怎么办? [英] How if the last ack is lost in TCP termination?

查看:45
本文介绍了如果最后一个 ack 在 TCP 终止时丢失了怎么办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

A 发送一个 finB,然后 B 发送一个 ack和一个 finA.然后 B 进入状态 LAST_ACKA 进入状态 TIME_WAIT,现在,B 如果A的最后一个ack丢失,B的重传请求也丢失了?B 会继续发送重传请求还是关闭套接字?(我们知道,如果A设置SO_LINGER为0,当A关闭它的socket时,会导致RESETB 上.)

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屋!

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