计算机应用 ›› 2014, Vol. 34 ›› Issue (11): 3201-3205.DOI: 10.11772/j.issn.1001-9081.2014.11.3201

• 网络与通信 • 上一篇    下一篇

高速网络流采集系统的设计与实现

姜腊林1,杨嘉佳1,姜磊2,唐球2   

  1. 1. 长沙理工大学 计算机与通信工程学院,长沙 410114
    2. 中国科学院 计算技术研究所,北京 100190;
  • 收稿日期:2014-04-30 修回日期:2014-06-16 出版日期:2014-11-01 发布日期:2014-12-01
  • 通讯作者: 杨嘉佳
  • 作者简介:姜腊林(1964-),女,湖南岳阳人,副教授,主要研究方向:计算机网络;杨嘉佳(1988-),男,广西南宁人,硕士研究生,主要研究方向:信息安全、模式匹配;姜磊(1984-),男,山东烟台人,博士研究生,主要研究方向:网络安全、模式匹配;唐球(1985-),男,湖南怀化人,博士研究生,主要研究方向:信息安全、模式匹配。
  • 基金资助:

    国家863计划项目;中国科学院战略性先导科技专项基金资助项目

Design and implementation of high-speed network traffic capture system

JIANG Lalin1,YANG Jiajia1,JIANG Lei2,TANG Qiu2   

  1. 1. College of Computer and Communication Engineering, Changsha University of Science and Technology, Changsha Hunan 410114, China;
    2. Institute of Computing Technology, Chinese Academy of Sciences, Beijing 100190, China;
  • Received:2014-04-30 Revised:2014-06-16 Online:2014-11-01 Published:2014-12-01
  • Contact: YANG Jiajia

摘要:

针对基于软件的网络流采集系统不能高效处理高速网络流量,以及为了提高采集效率需要同时对多种网络流进行采集的问题,提出一种基于软硬件结合的高速网络流采集框架,探讨在NetFPGA-10G平台实现高速网络流采集系统,称之为HSNTCS。该系统在硬件上通过精确串匹配引擎或正则表达式匹配引擎过滤、分类出所需的多种网络流后,将其传至内核驱动层对应的数据缓冲区,然后直接拷贝至用户空间并存储至对应的数据库。经实验测试,在精确串匹配情况下,用硬件方式实现的高速网络流采集系统的用户数据报协议(UDP)、传输控制协议(TCP)吞吐率都达到1.2Gb/s,约是用软件方式实现的3倍;在正则表达式匹配情况下,用硬件方式实现的高速网络流采集系统的UDP、TCP吞吐率都达到640Mb/s,约是用软件方式实现的3倍。结果表明,相对于软件实现方式,硬件实现具有更高的采集性能。

Abstract:

Since high-speed network traffic can not be effectively coped with the network traffic capture system implemented by software, and the multiple network flow need to be collected simultaneously to improve the capturing efficiency, an high-speed network flow capture framework in combination of hardware and software was presented, and the implementation of network traffic capture system based on NetFPGA-10G, called HSNTCS, was discussed. A variety of network flow in hardware was filtered and classified by the exact string matching engine and the regular expression matching engine of this system. After being transmitted to the corresponding data buffer at the driver layer, the network flow was directly copied to the corresponding database in user space. The experiments show that the throughput of UDP (User Datagram Protocol)and TCP (Transmission Control Protocol)in the high-speed network traffic capture system implemented by the hardware under the condition of exact string matching achieved 1.2Gb/s, which is about 3 times of that implemented by the software; and the throughput of UDP and TCP in the system implemented by the hardware under the condition of regular expression matching achieved 640Mb/s, which is about 3 times of that implemented by the software. The results demonstrate that the capture performance by the method of hardware is better than the method of software.

中图分类号: