文档介绍:华中科技大学
硕士学位论文
千兆网络报文捕获平台的设计与实现
姓名:饶超
申请学位级别:硕士
专业:通信与信息系统
指导教师:何建华
20070208
摘要
随着互联网的迅猛发展,网络用户的数量及网络应用的种类不断增多。出于管理
和安全方面的考虑,需要对互联网中传输报文的内容实行实时监控。但由于网络传输
速度和数据流量的快速增长,目前大多数网络报文捕获方法已经难以满足网络监控的
实时性要求。结合常见的千兆网络环境,本文对如何提高报文捕获系统的实时性进行
了研究和探讨,并设计和实现了一种高性能报文捕获平台中的软件系统。
本文首先对基于 Linux 的报文捕获系统中广泛使用的 BPF(Berkeley Packet Filter)
进行了简要介绍,从系统总线、过滤算法、操作系统内核和应用进程等多个方面分析
了影响 BPF 报文捕获性能的主要因素。结合千兆网络环境的实际需求,本文设计了基
于一种高性能报文捕获硬件系统平台的 Linux 系统软件。所用到的关键技术包括零拷
贝、高效缓冲区管理和中断驱动结合轮询访问等,以保证内核数据传输、存储和检索
的实时性,具有缩短数据流经路径、促进数据共享、减少中断开销等优点,从软件系
统方面充分保证千兆网络环境中报文的实时捕获和处理。
在模拟的千兆网络环境中的系统测试结果表明,本文提出的系统软件与硬件系统
相结合,能够以较低的处理器占用率实现报文的实时捕获。
对于基于对称多处理器(SMP,Symmetric Multiple Processor)系统平台的高速报
文捕获系统,本文还提出了对软件系统进行改进的设想。
关键词:报文捕获, 高速网络, 零拷贝, 缓冲区管理, 中断服务, 轮询
I
Abstract
With the rapid development of , the number work users and the type of
network applications has been grown quickly. To take management and security into
consideration, it is necessary to monitor the content of packet through work.
However, the traditional methods to work packet can’t satisfy the performance
of real-time with the rapid growth work speed. The object of this thesis is to discuss
the way to improve the performance of real-time in packet capture system, and then design
and implement a high-performance software platform.
Firstly, this thesis introduces the BPF (Berkeley Packet Filter) that is widely used in
packet capture system based on Linux. And then it analyzes the main factors that affect
packet capture performance of BPF in the following aspects: system bus, filtering algorithm,
the kernel and application process. In order to satisfy the requirement of work,
we design the software platform that is used at high-performance hardware of packet
capture. We adopt the zero-copy, efficient buffer management and interrupt-driven
combination of polling technology in this software platform, it can guarantee real-time
processing of the kernel data in transmission, storage