A multivariant, common basis classification method and apparatus for
classifying protocol data units in a network switching device is
disclosed. The method of classifying a protocol data unit (PDU) in the
preferred embodiment includes the steps of generating a first string and
a second string with which to characterize a PDU; mapping first and
second strings into a first index and second index, respectively, where
the first and second indices are selected from a plurality of indices;
and selecting an instruction to apply to the PDU by matching the first
and second indices. The plurality of strings are commonly generated from
the source and destination address in the packet as well as other indicia
with which to identify a traffic flow. The instructions specify how to
classify, route, switch, or otherwise process the PDU.