rch was examined in the previous chapter. For our purposes, it is assumed that a mechanism will always be provided that will perform one of two tasks when the classification process is initiated: It will either sieve through a database of rules or it will consult a lookup table (where the rules are stored) to provide a result that may be used for indexing into some other data structure, which will ultimately provide the answer to the classification problem. In network processing, a systems designer faces two general classification problems: Downloaded from Digital Engineering Library @ McGraw-Hill (www.digitalengineeringlibrary.com) Copyright © 2004 The McGraw-Hill Companies. All rights reserved. Any use is subject to the Terms of Use as given at the website. CLASSIFICATION PROCESSORS 238 NETWORK PROCESSORS Let us first look at what is commonly known as lookup and classification. This all-encompassing term, which is almost de facto used loosely to refer to one of three terms: layer 2, layer 3, or even routing classification and forwarding. It is mainly used in simple packet routing/switching contexts. The word classification has other connotations in network processing and is usually used as a synonym for forwarding. Classification consists of the identification of the correct output port/channel/interface of a piece of network gear (a switch/router) to which the packet must be for- warded. This decision is made when the packet's destination address matches the content of a lookup table, as shown in Figure 13.1. This lookup table is invariably known in this context as the routing or forwarding table. It summarizes routing information based on prefixes. The term classification or deep packet classification is used when a packet must be distinguished among several others (usually for purposes other than just routing or switching). This should not be done simply based on its destination address; it should also be based on several internal bit fields of variable length or format. Notice that some interesting words ha