三次握手
来源:互联网 发布:客户跟进系统源码 编辑:程序博客网 时间:2024/04/29 15:34
三次握手(three times handshake;three-way handshaking)所谓的“三次握手”即对每次发送的数据量是怎样跟踪进行协商使数据段的发送和接收同步,根据所接收到的数据量而确定的数据确认数及数据发送、接收完毕后何时撤消联系,并建立虚连接。为了提供可靠的传送,TCP在发送新的数据之前,以特定的顺序将数据包的序号,并需要这些包传送给目标机之后的确认消息。TCP总是用来发送大批量的数据。当应用程序在收到数据后要做出确认时也要用到TCP。
编辑本段基本简介
在TCP/IP协议中,TCP协议提供可靠的连接服务,采用三次握手建立一个连接。 第一次握手:建立连接时,客户端发送syn包(syn=j)到服务器,并进入SYN_SEND状态,等待服务器确认;SYN:同步序列编号(Synchronize Sequence Numbers)。 第二次握手:服务器收到syn包,必须确认客户的SYN(ac三次握手
三次握手协议
编辑本段基本原理
三次握手协议
编辑本段TCP头结构
面向连接的TCP三次握手是Syn Flood存在的基础。 TCP协议头最少20个字节,包括以下的区域(由于翻译不尽相同,文章中给出相应的英文单词): TCP源端口(Source Port):16位的源端口其中包含初始化通信的端口。源端口和源IP地址的作用是标示报文的返回地址。 TCP目的端口(Destination port):16位的目的端口域定义传输的目的。这个端口指明报文接收计算机上的应用程序地址接口。 TCP序列号(序列码,Sequence Number):32位的序列号由接收端计算机使用,重新分段的报文成最初形式。当SYN出现,序列码实际上是初始序列码(ISN),而第一个数Tcp三次握手与四次挥手网络技术
编辑本段标志控制
URG:紧急标志 紧急(The urgent pointer) 标志有效。紧急标志置位, ACK:确认标志 确认编号(Acknowledgement Number)栏有效。大多数情况下该标志TCP三次握手是Syn Flood存在的基础
编辑本段数据传输
发送序列变量 SND.UNA : 发送未确认 SND.NXT : 发送下一个 SND.WND : 发送窗口 SND.UP : 发送优先指针 SND.WL1 : 用于最后窗口更新的段序列号 SND.WL2 : 用于最后窗口更新的段确认号三次握手
编辑本段序列标识
序列号 在TCP连接中发送的字节都有一个序列号。因为编了号,所以可以确认它们的收到。对序列号的确认是累积性的。TCP必须进行的序列号比较操作种类包括以下几种: ①决定一些发送了的但未确认的序列号。 ②决定所有的序列号都已经收到了。 ③决定下一个段中应该包括的序列号。 对于发送的数据TCP要接收确认,确认时必须进行的: SND.UNA = 最老的确认了的序列号。 SND.NXT = 下一个要发送的序列号。三次握手数据
#bk-album-collection-box-1003841 { width: 687px; height: 228px; border-right: 1px solid rgb(198, 225, 245); border-width: 2px 1px 1px; border-style: solid; border-color: rgb(38, 139, 215) rgb(198, 225, 245) rgb(198, 225, 245); margin-bottom: 30px; overflow: hidden; }.bacb-head { height: 28px; background-color: rgb(245, 251, 255); padding-left: 10px; position: relative; }.bacb-title { font-size: 14px; font-weight: bold; line-height: 28px; }.bacb-more { text-decoration: none; position: absolute; font-size: 12px; line-height: 1; top: 8px; right: 8px; padding-right: 11px; background: url("http://img.baidu.com/img/baike/s/arr.gif") no-repeat scroll 54px -22px transparent; }.bacb-more:hover { text-decoration: none; }#bacb-left-btn-1003841, .bacb-window-outer, #bacb-right-btn-1003841 { float: left; }#bacb-left-btn-1003841, #bacb-right-btn-1003841 { display: block; text-decoration: none; border: 1px solid rgb(255, 255, 255); width: 17px; height: 53px; background: url("http://img.baidu.com/img/baike/bkalbumbtn.gif") no-repeat scroll 0% 0% transparent; cursor: default; }#bacb-left-btn-1003841 { margin: 59px 3px 0pt 6px; background-position: 3px 16px; }#bacb-right-btn-1003841 { margin: 59px 5px 0pt 6px; background-position: -27px 16px; }#bacb-left-btn-1003841.enable:hover { background-position: -61px 16px; border: 1px solid rgb(221, 221, 221); cursor: pointer; }#bacb-right-btn-1003841.enable:hover { background-position: -91px 16px; border: 1px solid rgb(221, 221, 221); cursor: pointer; }.bacb-window-outer { width: 628px; height: 185px; position: relative; overflow: hidden; margin-top: 15px; }#bacb-window-inner-1003841 { position: absolute; top: 0pt; left: 0pt; padding-left: 6px; }#bacb-window-inner-1003841 .item { float: left; width: 156px; height: 195px; }#bacb-window-inner-1003841 .img { height: 145px; position: relative; }#bacb-window-inner-1003841 .img .b1, #bacb-window-inner-1003841 .img .b2, #bacb-window-inner-1003841 .img .b3, #bacb-window-inner-1003841 .img .img-wrapper { position: absolute; background-color: rgb(255, 255, 255); }#bacb-window-inner-1003841 .img .b1 { left: 0pt; bottom: 0pt; border: 1px solid rgb(205, 205, 205); }#bacb-window-inner-1003841 .img .b2 { left: 3px; bottom: 3px; border: 1px solid rgb(205, 205, 205); }#bacb-window-inner-1003841 .img .b3 { left: 6px; bottom: 6px; border: 1px solid rgb(170, 170, 170); }#bacb-window-inner-1003841 .img .img-wrapper { left: 9px; bottom: 9px; display: block; text-decoration: none; line-height: 1px; }#bacb-window-inner-1003841 .item .desc { text-align: center; font-family: 宋体; width: 145px; margin-top: 7px; font-size: 12px; line-height: 1; }#bacb-window-inner-1003841 .item .count { color: rgb(153, 153, 153); white-space: nowrap; }
- 参考资料
- 1
DIY部落
http://www.diybl.com/course/6_system/linux/Linuxjs/20090317/162287.html
- 2
太平洋电脑网
http://www.pconline.com.cn/pcjob/nettech/cisco/others/0408/436919.html
- 1
- 三次握手
- 三次握手
- 三次握手
- ”三次握手“
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- 三次握手
- bus,device,driver三者关系
- 浅析dev目录下设备文件mknod节点gid,uid和mode的如何方便设置
- CloseHandle 释放线程句柄后,线程仍可用
- THE HISTORY OF THE INTERNET
- 基本XML的DELPHI解析基本搞定了!
- 三次握手
- GCC后端及汇编发布(16)
- GCC's bacl-end & assemble emission (16)
- GCC后端及汇编发布(17)
- ubuntu 软件安装几种方法
- GCC's bacl-end & assemble emission (17)
- GCC后端及汇编发布(18)
- 链表和数组的区别
- 原来代码可以写成爱情故事