在 P4 實體交換機上設計與實作深度封包檢測
Design and Implementation of a Deep Packet Inspection Scheme in P4 Switches
摘要
深度封包檢測方案可以檢查封包的內容以偵測入侵嘗試。它對於
網路安全而言是一個必要的功能。在傳統的作法上,深度封包檢測方
案是被實作在一個獨立的伺服器上,伺服器則從硬體交換機那裡接收
並檢查被複製的封包。雖然一個基於軟件的深度封包檢測方案,例如
Snort,可以在硬體伺服器上靈活地執行,但是它的處理速度會大幅
受限於中央處理器的速度與連接中央處理器和網絡介面卡的系統匯流
排的頻寬。在本篇論文中,我們在 P4 交換機的資料平面上設計與實
作出深度封包檢測方案,此方案可以藉由兩種方法來完成。我們的深
度封包檢測方案藉由在 P4 交換機上的匹配與動作的管道執行精確的
簽章匹配。實驗結果顯示我們的深度封包檢測方案的方法一可以達到
100 Gbps 的處理速度,這已達到我們使用的 P4 交換機的線路速度。
網路安全而言是一個必要的功能。在傳統的作法上,深度封包檢測方
案是被實作在一個獨立的伺服器上,伺服器則從硬體交換機那裡接收
並檢查被複製的封包。雖然一個基於軟件的深度封包檢測方案,例如
Snort,可以在硬體伺服器上靈活地執行,但是它的處理速度會大幅
受限於中央處理器的速度與連接中央處理器和網絡介面卡的系統匯流
排的頻寬。在本篇論文中,我們在 P4 交換機的資料平面上設計與實
作出深度封包檢測方案,此方案可以藉由兩種方法來完成。我們的深
度封包檢測方案藉由在 P4 交換機上的匹配與動作的管道執行精確的
簽章匹配。實驗結果顯示我們的深度封包檢測方案的方法一可以達到
100 Gbps 的處理速度,這已達到我們使用的 P4 交換機的線路速度。
A deep packet inspection (DPI) scheme can check the content of packets to detect intrusion attempts. It is an essential function for network security. Traditionally, a DPI scheme is implemented as a stand-alone server that receives and scans cloned packets from network switches. Although a software-based DPI scheme such as Snort can flexibly run on a hardware server, its processing throughput is severely limited by the CPU speed and the bandwidth of the system bus that connects the CPU with the network interface card. In this thesis, we design and implement a DPI scheme in the data plane of a P4 switch, which can use two different methods. Our DPI scheme performs exact matches of signatures via the match-action pipeline of the P4 switch. Experimental results show that the achieved throughputs of the method 1 of our DPI scheme can reach 100 Gbps, which is the line rate of the used P4 switch.