TCP 四次握手 [英] TCP four-way handshake

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

问题描述

四路握手连接终止可以减少到三路甚至两路一.三向握手连接建立是否有可能扩展到四向?

Four-way handshake connection termination can be reduced to three-way and even two way one. Is it possible the three-way handshake connection establishment would be extended to four-way?

SYN=>
<=ACK
<=SYN
ACK=>

推荐答案

鉴于 SYN 和 ACK 的语义,应该可以在不同的数据包中发送 SYN+ACK 并且延迟握手.例如.客户端发送 SYN,服务器回复 ACK 以确认客户端希望建立新连接,但它尚未授予该愿望.稍后服务器发送 SYN 并从客户端获取匹配的 ACK 并建立连接.但我怀疑是否有人以这种方式建立连接,而且可能是某些操作系统会在其上发出吱吱声.

Given the semantics of SYN and ACK it should be possible to send SYN+ACK in different packets and those delay the handshake. E.g. client sends a SYN, server replies with an ACK to acknowledge the wish of the client for a new connection, but it does not grant the wish yet. Later the server sends a SYN and gets the matching ACK back from the client and the connection is established. But I doubt that anybody does connection establishment this way and it might be, that some OS will croak on it.

但是,四次握手还有另一种情况,但是数据包的顺序不同.如果双方尝试同时与另一方建立连接,则可能会发生这种情况,例如两者都向对等方发送 SYN,并返回 ACK.它在 RFC 793 (TCP) 第 3.4 节中进行了描述.但我怀疑您永远不会看到这样的握手,因为它不适合一端等待连接而另一端进行连接的典型客户端-服务器-场景.

But, there is another scenario for a four-way-handshake, however with a different ordering of the packets. It could happen, if both side try to establish a connection to the other side at the same time, e.g. both send a SYN to the peer, and get an ACK back. It is described in the RFC 793 (TCP) section 3.4. But I doubt you will ever see such a handshake, because it does not fit into the typical client-server-scenario where one end is waiting for connects and the other end does the connect.

你想象的握手存在,它被称为分裂握手".请参阅 http://hackmageddon.com/2011/04/17/tcp-split-handshake-attack-explained/ .正如我所料,它并未得到普遍支持.

the handshake you envision exists and it is called "split handshake". See http://hackmageddon.com/2011/04/17/tcp-split-handshake-attack-explained/ . And like I expected, it is not universally supported.

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

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