Abstract:The closure of network equipment hardware makes scientific research and teaching staffs difficult to learn the details of the network device hardware. Hardware research and teaching face enormous challenges. To solve these problems, this paper proposes a hardware packet processing monitoring technology based on Finite State Machine called PktScope, to monitor the processing of packets in the hardware in real time by designing hardware packet processing state machine coding standard and formulating standard packet data and processing reporting interface, which can be effectively applied to the network equipment research and teaching field. The prototype system is implemented based on MagicRouter. The PktScope technology can effectively realize the real-time monitoring of network flows, and has the characteristic of low additional hardware resource consumption.