Packet classification algorithms have been studied by many authors. Most of these algorithms are developed based on tree structure, rather than linear data structure which is appropriate for network processors (NPs). With the development of networks, more and more NPs are used to execute various tasks in the network. In this paper, a multidimensional packet classification algorithm called classification based on network processors (CBNPs) is put forward. This algorithm uses parallel tuple search and multi-threaded concurrency of NPs to enhance the classification speed, and also gets much less space and time complexity than other parallel algorithms. The simulation shows that CBNPs is high-speed, multidimensional and scalable, and its comprehensive performance is much better than that of the existing packet classification algorithms.