ficient implementation of the classification scheme in sev- eral configurations. Some instances of classification occur at layer 7-for example, looking up specific URL strings associated with the Hypertext Transfer Protocol (HTTP) protocol. However, classification usually occurs at layers 3 and 4. A typical example of a need for such a sophisticated classification would be in a Differentiated Services (DiffServ) environment. In this environment, the lookup must be executed based on multi- ple fields from the TCP and IP headers. This is where the classifier must apply the five-tuple lookup in order to extract the appropriate forwarding information based on data provided from a joint TCP/IP set of headers and, more specifically, from the following five distinct fields of data therein: The IP source address (32 bits). The IP destination address (32 bits). 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. PACKET PROCESSING PACKET PROCESSING 53 The specific IP protocol used bits). The TCP source port (16 bits). The TCP destination port (16 bits). We will revisit this case in more depth in Chapter 12, "Search Engines," and Chapter 13, "Classi- fication Processors." Returning to our DiffServ example, in this five-tuple lookup operation, the classifier will need to locate and extract 104 very specific bits from the combination of the IP and TCP header. It will then look into a CAM using these 104 bits as index in order to find a new bit field from the CAM, which will then be used as index to an associated data memory bank from where the exact result will be extracted. Based on that final result, the switch/router will decide which DiffServ flow it must allo- cate to the packet. To make a long story short, this is accomplished by the generation of the DiffServ Code Point (DSCP) bit pattern that is written by the switch into the type of service (TOS) fi