




已阅读5页,还剩3页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
目录:1tcp out-of-order(tcp有问题)2tcp segment of a reassembled PDU3Tcp previous segment lost(tcp先前的分片丢失)4Tcp acked lost segment(tcp应答丢失)5Tcp window update(tcp窗口更新)6Tcp dup ack(tcp重复应答)7Tcp keep alive(tcp保持活动)8Tcp retransmission(tcp 重传)1. tcp out-of-order(tcp有问题)解答:1)、 应该有很多原因。但是多半是网络拥塞,导致顺序包抵达时间不同,延时太长,或者包丢失,需要重新组合数据单元 因为他们可能是通过不同的路径到达你电脑上面的。2)、 CRM IT 同仁上礼拜来跟我反应一个问题,由他们客服系统藉由邮件主机要寄送给客户的信件,常常会有寄送失败的问题,查看了一下 Log,发现正常的信件在主机接收 DATA 完成后会记录收到的邮件大小,然后开始进行后续寄送出去的处理,但这些有问题的寄送,都会发生 DATA 没有传送完,Server 就记录已读取到 EOF,然后结束连线,也因此这封信就不算顺利的送到 Server 上来。初步看了一下排除是 Timeout 问题,因为连线断的时间都还未达设定的连线 Timeout 时间,由于 CRM 系统是外面厂商写的,为了厘清问题我只好抓封包来看是不是用户端送出来结束传送的指令的。抓了一下结果如下:整封邮件的传送过程,包含了大量的 TCP Retransmission 或是 Segment Lost,到后来还有跑出 TCP Out-Of-Order,看起来是网路的问题,网路上对于 TCP Out-Of-Order 的建议是说,有些 Packet 可能 Lost,所以重新传送造成,另一个可能是因为 Client 到 Server 间有两条网路路径,像是 Load Balance 之类的架构,因此若两个封包走不同路径,晚送的封包却比早送的到达,就会发生 Out-Of-Order。因此在断定有可能是网路造成,加上 CRM 系统上的网卡同事是把两张做成一张 Virtual,再请他拿掉 Bonding 只用单一张跑以后,问题就不存在了,观察流量还跑的比原本两张合起来的 Virtual 单张跑的高,所以 M$ 在 Bonding 网卡上是不是还有什么需要调整的就不得而之了,至少找出造成大量寄送失败的原因就好。2. tcp segment of a reassembled PDU解答:1)在连个连接建立的时候,SYN包里面会把彼此TCP最大的报文段长度,在局域网内一般都是1460. 如果发送的包比最大的报文段长度长的话就要分片了,被分片出来的包,就会被标记了“TCP segment of a reassembled PDU”,可以参考下图,看一下,被标记了的包的SEQ和ACK都和原来的包一致:2)上周在公司里遇到一个问题,用wireshark抓系统给网管上报的数据发现里面有好多报文被标识为“TCP segment of a reassembled PDU”,并且每一段报文都是180Byte,当时看到这样的标识,觉得是IP报文分片,以为系统的接口MTU值为设置小了,通过命令查询发现是1500,没有被重设过,当时有点想不通。 回来查了一下,发现自己的理解是错的,“TCP segment of a reassembled PDU”指的不是IP层的分片,IP分片在wireshark里用“Fragmented IP protocol”来标识。详细查了一下,发现“TCP segment of a reassembled PDU”指TCP层收到上层大块报文后分解成段后发出去。于是有个疑问,TCP层完全可以把大段报文丢给IP层,让IP层完成分段,为什么要在TCP层分呢? 其实这个是由TCP的MSS(Maximum Segment Size,最大报文段长度)决定的,TCP在发起连接的第一个报文的TCP头里通过MSS这个可选项告知对方本端能够接收的最大报文(当然,这个大小是TCP净荷的大小),以太网上这个值一般设置成1460,因为1460Byte净荷+20Byte TCP头+20Byte IP头 1500字节,正好符合链路层最大报文的要求。 至于收到一个报文后如何确定它是一个TCP segment?如果有几个报文的ACK序号都一样,并且这些报文的Sequence Number都不一样,并且后一个Sequence Number为前一个Sequence Number加上前一个报文大小再加上1的话,肯定是TCP segment了,对于没有ACK标志时,则无法判断。 既然收到的TCP报文都是180Byte的segment,那么应该是协商的时候PC端告知了MSS为180Byte,至于为什么这样,只能等抓包后确认是MSS的问题再排查了。另外,有一种情况也可能导致这个问题:被测系统因为MTU为220Byte而设置MSS为180Byte,但是这种情况现在可以排除,因为前面讲过,已经查询过MTU值为1500。3. Tcp previous segment lost(tcp先前的分片丢失)解答:(1)、“TCP Previous segment lost” errors are not “fatal” errors. They simply indicate that the sequence number in the arriving packet is higher than the next-expected sequence number, indicating that at least one segment was dropped/lost. The receiving station remedies this situation by sending duplicate ACKs for each additional packet it receives until the sender retransmits the missing packet(s). TCP is designed to recover from this situation, which is why the image is downloaded correctly despite having a (briefly) missing packet.If you are getting a large number of lost packets, then there is likely a communication problem between the sender and receiver. A common cause of this is un-matched duplex settings between the PC and the switch.We (our lab) recently upgraded to Ethereal 0.10.14 with WinPCap 3.1. If I remember correctly, we had previously been using 0.10.2 with WinPCap 3.0. However, since the upgrade we have been noticing several issues.The first issue is with TCP Previous segment lost and TCP CHECKSUM INCORRECT messages appearing in the Packet Listing window. We do not remember seeing these in the previous version of Ethereal, or at least not nearly as many as we are seeing now. For example, one task for the student instructional part of the lab involves visiting a website containing two images and observing the network activity. After the two GET requests are sent for the images, it is not uncommon for one image to be returned with a typical 200 OK response packet, but the response packet for the other image will be displayed as TCP Previous segment lost. However, both images are downloaded and displayed perfectly fine in the browser. I would think that the segment lost error would mean the object wasnt returned correctly and shouldnt be able to be displayed, but apparently that is not the case. (The cache had been cleared when this was performed, so it was not defaulting to a local copy of the image.) Another problem weve been noticing is that some packets simply arent displayed in the Packet Listing window, even when they are obviously received. Using the same example as above, after the two GET requests are sent for the images, it is not uncommon for one image to be returned with a typical 200 OK response, but the other response will not appear. Yet both images are successfully displayed in the browser. Is this a problem with Ethereal not detecting the packets? Im not sure how typical this is, but we seem to be experiencing these issues often with 0.10.14 while we never did with 0.10.2. Could it also be an issue with WinPCap, and not necessarily Ethereal? Im just trying to find some answers as to why we are seeing a sudden abundance of TCP related errors and uncaptured packets. Thanks. (2)、I have a network client application that runs fine while I am debugging (no TCP errors),but when I run the release version, it runs incredibly slow. It runs as a series oftransactions, where each transaction is a separate connection to the server. Wiresharkanalysis has determined that about 50% of all transactions involve the series:TCP Previous Segment LostTCP Dup ACKRSTThe RST consumes 3 seconds per transaction, which is a Big Deal. So to prevent it, I mustprevent the initial TCP Previous Segment Lost (which seems, on the surface, to merely bea time-out on a particular segment).In the following clip, the SYN packet suffers from the TCP Previous Segment Lost condition.0.000640 seconds seems like too short of a time to declare this condition, as many previoussuccessful transactions took much longer to be successfully SYN-ACKed.Can somebody explain TCP Previous Segment Lost in this context to help me troubleshoot myproblem?Any help would be appreciated.Here is a clip of a problem transaction:No. Time Source Destination Protocol Info834 *REF* 89.194.102.223 89.89.200.210 TCP 1137 1152 SYN Seq=0 Len=0 MSS=1460835 0.000640 89.194.102.223 89.89.200.210 TCP TCP Previous segment lost 1137 1152 SYN Seq=21767 Len=0 MSS=1460836 0.001345 89.89.200.210 89.194.102.223 TCP 1152 1137 SYN, ACK Seq=0 Ack=1 Win=5840 Len=0 MSS=1460837 0.001360 89.194.102.223 89.89.200.210 TCP 1137 1152 RST Seq=1 Len=0838 0.001371 89.89.200.210 89.194.102.223 TCP TCP Dup ACK 836#1 1152 1137 ACK Seq=1 Ack=1 Win=5840 Len=0839 0.001379 89.194.102.223 89.89.200.210 TCP 1137 1152 RST Seq=1 Len=0840 2.993571 89.194.102.223 89.89.200.210 TCP 1137 1152 SYN Seq=21767 Len=0 MSS=1460841 2.994880 89.89.200.210 89.194.102.223 TCP TCP Previous segment lost 1152 1137 SYN, ACK Seq=2993603 Ack=21768 Win=5840 Len=0 MSS=1460842 2.994909 89.194.102.223 89.89.200.210 TCP 1137 1152 ACK Seq=21768 Ack=2993604 Win=17520 Len=0843 2.995387 89.194.102.223 89.89.200.210 TCP 1137 1152 PSH, ACK Seq=21768 Ack=2993604 Win=17520 Len=9844 2.996103 89.89.200.210 89.194.102.223 TCP 1152 1137 ACK Seq=2993604 Ack=21777 Win=5840 Len=0845 3.084802 89.89.200.210 89.194.102.223 TCP 1152 1137 PSH, ACK Seq=2993604 Ack=21777 Win=5840 Len=22846 3.084829 89.89.200.210 89.194.102.223 TCP 1152 1137 FIN, ACK Seq=2993626 Ack=21777 Win=5840 Len=0847 3.084853 89.194.102.223 89.89.200.210 TCP 1137 1152 ACK Seq=21777 Ack=2993627 Win=17498 Len=0848 3.085844 89.194.102.223 89.89.200.210 TCP 1137 1152 FIN, ACK Seq=21777 Ack=2993627 Win=17498 Len=0849 3.086408 89.89.200.210 89.194.102.223 TCP 1152 1137 ACK Seq=2993627 Ack=21778 Win=5840 Len=04. Tcp acked lost segment(tcp应答丢失)5. Tcp window update(tcp窗口更新)6. Tcp dup ack(tcp重复应答)TCP may generate an immediate acknowledgment (a duplicate ACK) when an out- of-order segment is received. This duplicate ACK should not be delayed. The purpose of this duplicate ACK is to let the other end know that a segment was received out of order, and to tell it what sequence number is expected.当收到一个出问题的分片,Tcp立即产生一个应答。这个相同的ack不会延迟。这个相同应答的意图是让对端知道一个分片被收到的时候出现问题,并且告诉它希望得到的序列号。Since TCP does not know whether a duplicate ACK is caused by a lost segment or just a reordering of segments, it waits for a small number of duplicate ACKs to be received. It is assumed that if there is just a reordering of the segments, there will be only one or two duplicate ACKs before the reordered segment is processed, which will then generate a new ACK. If three or more duplicate ACKs are received in a row, it is a strong indication that a segment has been lost. TCP then performs a retransmission of what appears to be the missing segment, without waiting for a retransmission timer to expire.7. Tcp keep alive(tcp保持活动)在TCP中有一个Keep-alive的机制可以检测死连接,原理很简单,TCP会在空闲了一定时间后发送数据给对方: 1.如果主机可达,对方就会响应ACK应答,就认为是存活的。 2.如果可达,但应用程序退出,对方就发RST应答,发送TCP撤消连接。 3.如果可达,但应用程序崩溃,对方就发FIN消息。 4.如果对方主机不响应ack, rst,继续发送直到超时,就撤消连接。这个时间就是默认 的二个小时。uses WinSock2;procedure TForm1.IdTCPServer1Connect(AThread: TIdPeerThread);typeTCP_KeepAlive = record OnOff: Cardinal; KeepAliveTime: Cardinal; KeepAliveInterval: Cardinalend;varVal: TCP_KeepAlive;Ret: DWord;beginVal.OnOff:=1;Val.KeepAliveTime:=6000; /6sVal.KeepAliveInterval:=6000; /6sWSAIoctl(ATh
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 2025安徽芜湖市特种设备检验研究院招聘编外人员6人模拟试卷及答案详解(新)
- 2025湖南开放大学高层次人才招聘25人考前自测高频考点模拟试题及答案详解(新)
- 2025北京大兴区庞各庄镇中心卫生院招聘临时辅助用工考前自测高频考点模拟试题完整参考答案详解
- 2025桂林银行校园招聘模拟试卷及一套答案详解
- 2025贵州务川自治县应急管理局、林业局和医保局招聘城镇公益性岗位人员模拟试卷有完整答案详解
- 2025年河北科技工程职业技术大学选聘工作人员52名模拟试卷及答案详解(全优)
- 2025广西南宁市武鸣区乡村振兴局招聘公益性岗位工作人员1人模拟试卷有完整答案详解
- 2025江苏无锡市锡山区卫生健康系统招聘事业编制卫生人才15人(校园招聘)考前自测高频考点模拟试题及参考答案详解1套
- 2025黑龙江佳木斯市建三江湿地机场消防应急救援大队招聘消防车司机1人模拟试卷及答案详解(各地真题)
- 2025年宝鸡文理学院硕士招聘(21人)模拟试卷(含答案详解)
- 2023年检验检测机构质量手册(依据2023年版评审准则编制)
- 变化点(4M变更)管理管控表
- 洪恩识字配套字库完整版识字启蒙200字-生字组词句子完整版可打印-点读指读
- 辽宁省2023年中考语文试题【6套】(含真题答案)
- 虚拟现实技术在物流与快递配送中的应用与创新
- 《小儿支气管肺炎》课件
- 技能认证输油工初级考试(习题卷24)
- 食品小经营店、小食堂备案信息采集表
- 教科版小学四年级科学上册《2 呼吸与消化 第2课 呼吸与健康生活》课堂教学课件PPT公开课
- 生产型企业员工奖惩制度
- 电子商务运营PPT完整全套教学课件
评论
0/150
提交评论