传统的基于流量整形的流量控制算法通常需要建立对应的队列模型,实施起来极为复杂,而且所有数据包都要进入整形队列,加大了网络延时。本文从TCP协议拥塞控制和数据包组包机制出发,提出了基于TCP滑动窗口的串行流量控制算法,通过改变TCP发送端窗1:7的大小来达到流量控制的目的。本文在Linux内核Netfilter/iptables框架中实现了该流量控制方法,在部署的网络环境中,比较了不同参数设置下的算法效果。与CBQ算法相比,该方法降低了数据包在队列中排队整形的延时。
The traditional traffic control algorithms based on traffic shaping, usually require a corresponding queueing model, which leads to the complexity of implementation. Furthermore, all datagram have to wait in the shaping queues, which increases the delay time. This article starts from the TCP congestion control protocol and the datagram grouping mechanism, puts forth a serial traffic control algorithm based on the TCP sliding window, which changes the sender's win- dow size for the purpose of controlling the traffic as well as reducing the shaping and queueing delay time. The implementation and experimentation of this algorithm in the Netfilter/Iptables framework, via comparing different sets of parameters for the performance and comparing with the CBQ algorithm, show the effectiveness and efficiency.