TCP握手可靠性 [英] TCP handshake reliability

查看:37
本文介绍了TCP握手可靠性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我实际上想知道,在 tcp 握手中,为什么客户端需要 ack 来完成握手.post syn和syn-ack,双方都有足够的信息启动数据,tcp仍然要求client的ack进入已建立状态.

I actually wanted to know, in a tcp handshake, why do client needs to ack back to complete the handshake. Post syn and syn-ack, both parties have sufficient information to start the data, still tcp asks for client's ack to move to established state.

问题是,为什么这种三向握手是实现可靠性的必要和充分条件,即使我们在第二条消息本身后同步序列号也是如此.

The question, is why this three way handshake is necessary and sufficient condition to achieve reliability, even tough we have sequence number synchronized post second message itself.

有什么见解吗?

推荐答案

服务器如何知道客户端收到了 SYN-ACK?服务器无法知道这一点,除非客户端明确发送 ACK 以确认它收到了 Syn-ack.

How does the server know that the client received the SYN-ACK? The server has no way to know this unless the client explicitly sends an ACK to acknowledge that it got the syn-ack.

如果这第三个 ACK​​ 被丢弃,服务器将重新发送一个 SYN-ACK,当客户端收到重复的 SYN-ACK 时,它会说哦,嘿,我之前的 ACK 肯定已经被丢弃了,所以我会只需重新发送 ACK".这将一直持续到服务器获得 AKC.

If this third ACK is dropped, the server will resend a SYN-ACK, and when the client gets that duplicate SYN-ACK, it'll say "oh hey, my previous ACK must have been dropped, so I'll just resend the ACK". This will continue until the server gets the AKC.

这篇关于TCP握手可靠性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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