Abstract:In order to solve the problems with computing resource and high-speed network traffic, it is necessary to deal with the network traffic by some measuring technologies, such as sampling measurement and load balance, etc, while the hash algorithm is one of the key measuring technologies. In this paper, firstly, a random metric is provided to evaluate the performance of the hash algorithms. Secondly, the randomicity of XOR and shift operations are analyzed, and it is proved that the two operations can improve the bit randomicity. Thirdly, this paper analyzes the four fields of IP packet, such as source IP, destination IP, source port, and destination port, and a hash algorithm named XOR_SHIFT is provided based on the analysis. Finally, using the CERNET backbone traffic and PMA traffic, this paper analyzes the character of the XOR_SHIFT hash algorithm and compares with the performance among XOR_SHIFT, IPSX and CRC32 hash algorithms. This study shows that the XOR_SHIFT hash function provided in this paper has two advantages: algorithm performance and hash randomicity, and it can be applied to measure the high-speed network traffic.