TCP中ECN的工作原理分析二(摘自:RFC3168)
英文源:http://www.icir.org/floyd/ecn.html
发送端和接收端处理:
The TCP Sender
For a TCP connection using ECN, new data packets are transmitted with an ECT codepoint set in the IP header. When only one ECT codepoint is needed by a sender for all packets sent on a TCP connection, ECT(0) SHOULD be used. If the sender receives an ECN-Echo (ECE) ACK packet (that is, an ACK packet with the ECN-Echo flag set in the TCP header), then the sender knows that congestion was encountered in the network on the path from the sender to the receiver. The indication of congestion should be treated just as a congestion loss in non- ECN-Capable TCP. That is, the TCP source halves the congestion window "cwnd" and reduces the slow start threshold "ssthresh". The sending TCP SHOULD NOT increase the congestion window in response to the receipt of an ECN-Echo ACK packet.
对于使用ECN的TCP连接,需要在数据包的IP包头上设置ECT位。当TCP连接中发送端发送的数据包
仅需要一个ECT位时,应该使用ECT(0)。如果发送端接收到了一个带有ECE的ACK包(也就是说,这
个ACK包带有设置在TCP头上的ECE标记),那么发送端就知道该包在网络中从发送端到接收端的途中
经历了拥塞。此拥塞指示应该被看作和没有启用ECN的TCP的拥塞丢包是一个意思。也就是说,TCP发
送端应该减半发送窗口和降低慢启动阈值。即发送端对接收端返回的带有ECE位的ACK包的相应不应该是
增加发送窗口。
TCP should not react to congestion indications more than once every window of data (or more loosely, more than once every round-trip time). That is, the TCP sender's congestion window should be reduced only once in response to a series of dropped and/or CE packets from a single window of data. In addition, the TCP source should not decrease the slow-start threshold, ssthresh, if it has been decreased within the last round trip time. However, if any retransmitted packets are dropped, then this is interpreted by the source TCP as a new instance of congestion.
同时,TCP也不应该在一个数据往返时间的窗口内对拥塞指示做出多余一次的响应(或者更多的丢包,
每个往返时延多余一次)。也就是说,对于一系列的丢包或ACK包的ECE指示,在一个往返时延内,TCP
发送端拥塞窗口应该只降低一次。除此之外,如果阈值在上一个往返时延内已经被减少,这次就不应该再
降低慢启动阈值。然而,如果出现任何重传的包丢失,TCP发送端就可以把它作为拥塞指示做出响应。
After the source TCP reduces its congestion window in response to a CE packet, incoming acknowledgments that continue to arrive can "clock out" outgoing packets as allowed by the reduced congestion window. If the congestion window consists of only one MSS (maximum segment size), and the sending TCP receives an ECN-Echo ACK packet, then the sending TCP should in principle still reduce its congestion window in half. However, the value of the congestion window is bounded below by a value of one MSS. If the sending TCP were to continue to send, using a congestion window of 1 MSS, this results in the transmission of one packet per round-trip time. It is necessary to still reduce the sending rate of the TCP sender even further, on receipt of an ECN-Echo packet when the congestion window is one. We use the retransmit timer as a means of reducing the rate further in this circumstance. Therefore, the sending TCP MUST reset the retransmit timer on receiving the ECN-Echo packet when the congestion window is one. The sending TCP will then be able to send a new packet only when the retransmit timer expires.
源端TCP作为对ECE位的ACK包做出减少窗口的响应后,已经减少的发送窗口把后续即将到来的ACK包看作是“下班”的包(无效指示)(?)如果拥塞窗口仅是一个MSS大小(最大报文段字节数),发送端接收到一个带有ECE位的ACK包,那么,原则上来说,源端TCP仍然应该减少发送窗口。但是发送窗口的值已经到达了最少一个MSS的下限。如果发送端想要用一个报文段大小的窗口继续发送数据,就会导致每个RTT仅传送一个包。但拥塞窗口是一个MSS且受到来自接收端返回的带有ECE位的ACK后,TCP发送端甚至需要进一步减少发送速率。在这种情况下,我们用重传定时器作为一个进一步减少发送速率的方式。因此,但拥塞窗口是1个MSS且又收到ECE位的ACK时,发送端TCP必须复位重传定时器。如此,只有重传定时器超时时TCP才能发送一个新的数据包。
TCP中ECN的工作原理分析二(摘自:RFC3168)的更多相关文章
- TCP 重置攻击的工作原理
原文链接:https://fuckcloudnative.io/posts/deploy-k3s-cross-public-cloud/ TCP 重置攻击 是使用一个单一的数据包来执行的,只有几个字节 ...
- SPI协议及工作原理分析
说明.文章摘自:SPI协议及其工作原理分析 http://blog.csdn.net/skyflying2012/article/details/11710801 一.概述. SPI, Serial ...
- Hadoop生态圈-Zookeeper的工作原理分析
Hadoop生态圈-Zookeeper的工作原理分析 作者:尹正杰 版权声明:原创作品,谢绝转载!否则将追究法律责任. 无论是是Kafka集群,还是producer和consumer都依赖于Zoo ...
- 原理剖析-Netty之服务端启动工作原理分析(下)
一.大致介绍 1.由于篇幅过长难以发布,所以本章节接着上一节来的,上一章节为[原理剖析(第 010 篇)Netty之服务端启动工作原理分析(上)]: 2.那么本章节就继续分析Netty的服务端启动,分 ...
- AQS工作原理分析
AQS工作原理分析 一.大致介绍1.前面章节讲解了一下CAS,简单讲就是cmpxchg+lock的原子操作:2.而在谈到并发操作里面,我们不得不谈到AQS,JDK的源码里面好多并发的类都是通过Sy ...
- Azure WAF防火墙工作原理分析和配置向导
Azure WAF工作原理分析和配置向导 本文博客地址为:http://www.cnblogs.com/taosha/p/6716434.html ,转载请保留出处,多谢! 本地数据中心往云端迁移的的 ...
- getaddrinfo工作原理分析
getaddrinfo工作原理分析 将域名解析成ip地址是所有涉及网络通讯功能程序的基本步骤之一,常用的两个接口是gethostbyname和getaddrinfo,而后者是Posix标准推荐在新应用 ...
- TCP可靠传输的工作原理
TCP可靠传输的工作原理 一.停止等待协议 1.1.简介 在发送完一个分组后,必须暂时保留已发送的分组的副本. 分组和确认分组都必须进行编号. 超时计时器的重传时间应当比数据在分组传输的平均往返时间更 ...
- Security:蠕虫的行为特征描述和工作原理分析
________________________ 参考: 百度文库---蠕虫的行为特征描述和工作原理分析 http://wenku.baidu.com/link?url=ygP1SaVE4t4-5fi ...
随机推荐
- thrift实现js与C#通讯
利用thrift实现js与C#通讯的实例代码 1.为什么要用thrift js C#? 1.1 首先,js 通过 thrift 访问C#,实际上是一种c/s模式.thrift是通信工具,js是客户端, ...
- python文本文件,生成指定的文件格式
import os import sys import string #在一个特定的模式打开指定的文件,获取文件句柄 def getFileIns(filePath,model): print(&qu ...
- C++多线程分析
我们开始谈论的线程之前先看看这些线载波前-进程. 进程,它是一个正在执行的程序的实例.是一个程序在其自身的地址空间的一次执行活动.进程是资源申请.调度.和独立执行的基本单位.进程有两部分组成: 1.操 ...
- iOS_23_undress Girl
最后效果图: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvcHJlX2VtaW5lbnQ=/font/5a6L5L2T/fontsize/400/fill ...
- [译]Java 设计模式之命令
(文章翻译自Java Design Pattern: Command) 命令设计模式在进行执行和记录的时候需要一个操作及其参数和封装在一个对象里面.在下面的例子中,命令是一个操作,它的参数是一个Com ...
- Ubuntu12.04环境搭建遇到的问题和建议(一个)
后的新公司需要在Ubuntu12.04在结构Android开发环境,在这个过程中,我们还是会遇到很多问题,这里记录.为了方便自己的未来,有人谁需要参考.从网络! 1. Q:在终端: sudo apt- ...
- 项目管理工具 Redmine 安装试用手记
原文:项目管理工具 Redmine 安装试用手记 项目管理工具 Redmine 安装试用手记 分类: Redmine2009-06-01 10:12 996人阅读 评论(1) 收藏 举报 项目管理工具 ...
- Office文档在线编辑的实现之二
讲述了如何通过iis的webdav支持实现客户端的office直接编辑服务器上的文件,本篇将讲解如何实现客户端的office直接编辑数据库中的二进制形式保存的office文件. 实现的关键:模拟IIS ...
- DDD 回归具体的业务场景,Domain Model 再再重新设计
DDD 回归具体的业务场景,Domain Model 再再重新设计 首先,把最真挚的情感送与梅西,加油! 写在前面 阅读目录: 重申业务场景 Domain Model 设计 后记 上一篇<设计窘 ...
- 学习Sass之安装Sass
学习Sass之安装Sass 为什么使用Sass 作为前端(html.javascript.css)的三大马车之一的css,一直以静态语言存在,HTML5火遍大江南北了.javascript由于NODE ...