基于Linux LQL流量控制系统的研究与实现

西安科技大学 计算机科学与技术学院,陕西 西安 710054

LQL; 流量控制; U32; TC; Linux操作系统

Research and implementation of traffic control system based on Linux LQL
GONG Shang-fu,BAI Long-biao,YUAN Shuai

(College of Computer Science and Technology,Xi'an University of Science and Technology,Xi'an 710054,China)

LQL; flow control; U32; traffic control; Linux operating system

备注

在网络资源有限的情况下,为了高效的管理和分配网络带宽和限制网络中的异常流量,保证重要用户的通信畅通,通常需要实时的网络流量控制。普遍采用的方法是Linux Traffic Control(TC)命令+IPTABLES,但这种方法结构繁琐、效率低下。通过分析Linux网络流量控制原理和LQL库结构的基础上,经过对流量模型策略的重新设计、LQL库的扩充以及U32过滤器的改进,提出了一种基于LQL库的流量控制方法。该方法摒弃了传统方法中所运用的TC命令解析,netlink传输,内核空间执行的3层结构,而直接在Linux内核的框架下,采用LQL库直接对内核进行操控,并改进了相关U32过滤器以对IP段的流量控制,从而实现对系统的智能流量控制。实验表明,这种方法能够大幅度提高Linux内核和用户空间命令解析及传输的时间效率,减少设备延时,增强设备的实时性,同时保证带宽合理利用。

Network traffic control is generally required to manage and allocate network bandwidth efficiently and limit abnormal network flow for guaranting the communication fluency of the important users under the condition of the limited network resources.The current popular method is Linux Traffic Control(TC)command combining with IPTABLES. It is widely used, but this method has tedious structure and low efficiency.Based on analyzing the principle of network traffic control of Linux and the LQL library structure, through redesigning traffic modeling strategy, expaning of LQL library and improving of U32 filter, this paper presents a new traffic controlling method based on LQL library.This method discards the three layer structure including TC command parsing, netlink transmission and kernel execution,while use the LQL library directly to manipulate Linux kernel under the framework of the Linux kernel, and improves correlational U32 filters to segment traffic control by IP in order to achieve the intelligent traffic control.Experimental results show that this method can greatly imporve the efficiency on transmission time of the Linux kernel and user space command parsing, reduce equipment delays, enhance real-time of devices in the meanwhile ensuring the rational use of bandwidth.