Methods directed to longest prefix matching and systems directed to IP
address lookups are presented. The methods and systems relate in
particular to IPv6 and comprise finding the longest prefix match (LPM)
for an IP address. The method of the invention results in the use of
filters to perform LPM. In embodiments of the invention, partial address
filtering is used to further reduce filtering requirements. Reducing the
number of filtering operations has the advantage of making the LPM
algorithm faster and less costly to implement than prior art approaches.
Also described is an "ideal offset filter" that extracts a fixed sized
sliding window of bits from the IP address being processed.