This paper expounded the basic principle of sampling measurement based on mask matching, and provided the basic method and Top architecture for capturing the traffic of Intranet export. It also designed and implemented the cooperation algorithm between the two computers with java, so as to realize continuous sampling measurement for a long time. Finally, the authors proposed multi-sampling based on the mask matching to delete some traffic data gradually and smoothly without losing its character. Analysis of the traffic data shows that the length distribut...