skip to main content
article

Scalable high-speed prefix matching

Published:01 November 2001Publication History
Skip Abstract Section

Abstract

Finding the longest matching prefix from a database of keywords is an old problem with a number of applications, ranging from dictionary searches to advanced memory management to computational geometry. But perhaps today's most frequent best matching prefix lookups occur in the Internet, when forwarding packets from router to router. Internet traffic volume and link speeds are rapidly increasing; at the same time, a growing user population is increasing the size of routing tables against which packets must be matched. Both factors make router prefix matching extremely performance critical.In this paper, we introduce a taxonomy for prefix matching technologies, which we use as a basis for describing, categorizing, and comparing existing approaches. We then present in detail a fast scheme using binary search over hash tables, which is especially suited for matching long addresses, such as the 128 bit addresses proposed for use in the next generation Internet Protocol, IPv6. We also present optimizations that exploit the structure of existing databases to further improve access time and reduce storage space.

References

  1. ANDERSSON,A.AND NILSSON, S. 1994. Faster searching in tries and quadtrees-an analysis of level compression. In Second Annual European Symposium on Algorithms (1994), pp. 82-93.]] Google ScholarGoogle Scholar
  2. BRAUN, F., WALDVOGEL, M., AND LOCKWOOD, J. 2001. OBIWAN-An Internet protocol router in reconfigurable hardware. Technical Report WU-CS-01-11 (May), Washington University in St. Louis.]]Google ScholarGoogle Scholar
  3. BREMLER-BARR, A., AFEK,Y.,AND HAR-PELED, S. 1999. Routing with a clue. In Proceedings of ACM SIGCOMM '99 (Cambridge, Massachusetts, USA, Sept. 1999), pp. 203-213.]] Google ScholarGoogle Scholar
  4. CHANDRANMENON,G.AND VARGHESE, G. 1995. Trading packet headers for packet processing. In Proceedings of SIGCOMM '95 (Boston, Aug. 1995). Also in IEEE Transactions on Networking, April 1996.]] Google ScholarGoogle Scholar
  5. CRESCENZI, P., DARDINI, L., AND GROSSI, R. 1999. IP lookups made fast and simple. In 7th Annual European Symposium on Algorithms (July 1999). Also available as technical report TR-99-01, Dipartimento di Informatica, Universit~ di Pisa.]] Google ScholarGoogle Scholar
  6. DE BERG, M., VAN KREVELD, M., AND SNOEYINK, J. 1995. Two- and three-dimensional point location in rectangular subdivisions. Journal of Algorithms 18, 2, 256-277.]] Google ScholarGoogle Scholar
  7. DEERING,S.AND HINDEN, R. 1998. Internet protocol, version 6 (IPv6) specification. Internet RFC 2460.]] Google ScholarGoogle Scholar
  8. DEGERMARK, M., BRODNIK, A., CARLSSON,S.,AND PINK, S. 1997. Small forwarding tables for fast routing lookups. In Proceedings of ACM SIGCOMM '97 (Sept. 1997), pp. 3-14.]] Google ScholarGoogle Scholar
  9. DEUTSCH, L. P. 1996. GZIP file format specification. Internet RFC 1952.]] Google ScholarGoogle Scholar
  10. DIETZFELBINGER, M., MEHLHORN, K., ROHNERT, H., KARLIN, A., MEYER AUF DER HEIDE,F.,AND TARJAN,R.E. 1994. Dynamic perfect hashing: Upper and lower bounds. SIAM Journal of Computing 23,4, 748-761.]] Google ScholarGoogle Scholar
  11. EATHERTON, W. N. 1999. Hardware-based Internet protocol prefix lookups Master's dissertation, Washington University in St. Louis, St. Louis, MO, USA.]]Google ScholarGoogle Scholar
  12. FELDMEIER, D. C. 1988. Improving gateway performance with a routing-table cache. In Proceedings of IEEE Infocom '88 (New Orleans, March 1988), pp. 298-307.]]Google ScholarGoogle Scholar
  13. FREDMAN, M. L., KOML~S,J.,AND SZEMER~DI, E. 1984. Storing a sparse table with O(1) worst case access time. Journal of the ACM 31, 3, 538-544.]] Google ScholarGoogle Scholar
  14. FULLER, V., LI, T., YU,J.,AND VARADHAN, K. 1993. Classless Inter-Domain Routing (CIDR): An address assignment and aggregation strategy. Internet RFC 1519.]] Google ScholarGoogle Scholar
  15. GUPTA, P., LIN,S.,AND MCKEOWN, N. 1998. Routing lookups in hardware at memory access speeds. In Proceedings of IEEE Infocom (April 1998), pp. 1240-1247.]]Google ScholarGoogle Scholar
  16. GUPTA,P.AND MCKEOWN, N. 1999. Packet classification on multiple fields. In Proceedings of ACM SIGCOMM '99 (Cambridge, Massachusetts, USA, Sept. 1999), pp. 147-160.]] Google ScholarGoogle Scholar
  17. GWEHENBERGER, G. 1968. Anwendung einer bin~aren Verweiskettenmethode beim Aufbau von Listen (Use of a binary tree structure for processing files). Elektronische Rechenanlagen 10, 223- 226.]]Google ScholarGoogle Scholar
  18. HINDEN,R.AND DEERING, S. 1998. IP version 6 addressing architecture. Internet RFC 2373.]] Google ScholarGoogle Scholar
  19. HINDEN, R., O'DELL, M., AND DEERING, S. 1998. An IPv6 aggregatable global unicast address format. Internet RFC 2374.]] Google ScholarGoogle Scholar
  20. KNUTH, D. E. 1998. Sorting and Searching (2nd ed.) Volume 3 of The Art of Computer Programming. Addison-Wesley.]] Google ScholarGoogle Scholar
  21. KOBAYASHI, M., MURASE,T.,AND KURIYAMA, A. 2000. A longest prefix match search engine for multigigabit ip processing. In Proceedings of the International Conference on Communications (June 2000).]]Google ScholarGoogle Scholar
  22. LABOVITZ, C., MALAN,G.R.,AND JAHANIAN, F. 1997. Internet routing instability. In Proceedings of ACM SIGCOMM '97 (1997), pp. 115-126.]] Google ScholarGoogle Scholar
  23. LAMPSON, B., SRINIVASAN,V.,AND VARGHESE, G. 1998. IP lookups using multiway and multicolumn search. In Proceedings of IEEE Infocom '98 (San Francisco, 1998).]]Google ScholarGoogle Scholar
  24. MCAULEY,A.J.AND FRANCIS, P. 1993. Fast routing table look up using CAMs. In Proceedings of Infocom '93 (March-April 1993), pp. 1382-1391.]]Google ScholarGoogle Scholar
  25. MORRISON, D. R. 1968. PATRICIA practical algorithm to retrieve information coded in alphanumeric. Journal of the ACM 15, 514-534.]] Google ScholarGoogle Scholar
  26. NEWMAN, P., MINSHALL,G.,AND HUSTON, L. 1997. IP Switching and gigabit routers. IEEE Communications Magazine 35, 1 (Jan.), 64-69.]]Google ScholarGoogle Scholar
  27. NILSSON,S.AND KARLSSON, G. 1999. IP address look up using LC-tries. IEEE Journal on Selected Areas in Communications 15, 4 (June), 1083-1092.]]Google ScholarGoogle Scholar
  28. PARTRIDGE, C. 1996. Locality and route caches. In NSF Workshop on Internet Statistics Measurement and Analysis (San Diego, CA, USA, Feb. 1996). Available at http://www.caida.org/outreach/ 9602/positions/partridge.html.]]Google ScholarGoogle Scholar
  29. PARTRIDGE, C., CARVEY,P.P.,BURGESS, E., CASTINEYRA, I., CLARKE, T., GRAHAM, L., HATHAWAY, M., HERMAN, P. , KING, A., KOHALMI, S., MA, T., MCALLEN, J., MENDEZ, T., MILLIKEN,W.C.,PETTYJOHN, R., ROKOSZ, J., SEEGER, J., SOLLINS, M., STORCH,S.,AND TOBER, B. 1998. A 50-Gb/s IP router. IEEE/ACM Transactions on Networking 6, 3 (June), 237-248.]] Google ScholarGoogle Scholar
  30. PERLMAN, R. 1992. Interconnections: Bridges and Routers. Addison-Wesley.]] Google ScholarGoogle Scholar
  31. REKHTER, Y., DAVIE, B., KATZ, D., ROSEN, E., AND SWALLOW, G. 1997. Cisco Systems' tag switching architecture overview. Internet RFC 2105.]] Google ScholarGoogle Scholar
  32. REKHTER,Y.AND LI, T. 1995. A border gateway protocol 4 (BGP-4). Internet RFC 1771.]] Google ScholarGoogle Scholar
  33. ROSEN, E. C., VISWANATHAN, A., AND CALLON, R. 2001. Multiprotocol label switching architecture. Internet RFC 3031.]] Google ScholarGoogle Scholar
  34. RUIZ-SANCHEZ, M. A., BIERSACK,E.W.,AND DABBOUS, W. 2001. Survey and taxonomy of ip address look up algorithms. IEEE Network 15, 2 (March-April), 8-23.]]Google ScholarGoogle Scholar
  35. SHAH,D.AND GUPTA, P. 2000. Fast incremental updates on ternary-cams for routing lookups and packet classification. In Proceedings of Hot Interconnects (2000).]]Google ScholarGoogle Scholar
  36. SKLOWER, K. 1993. A tree-based packet routing table for Berkeley Unix. Technical report, University of California, Berkeley. Also at http://www.cs.berkeley.edu/ -sklower/routing.ps.]]Google ScholarGoogle Scholar
  37. SPINNEY, B. A. 1995. Address look up in packet data communications link, using hashing and content-addressable memory. U.S. Patent number 5,414,704. Assignee Digital Equipment Corporation, Maynard, MA.]]Google ScholarGoogle Scholar
  38. SRINIVASAN, V., SURI,S.,AND VARGHESE, G. 1999. Packet classification using tuple space search. In Proceedings of ACM SIGCOMM '99 (Cambridge, Massachusetts, USA, Sept. 1999), pp. 135-146.]] Google ScholarGoogle Scholar
  39. SRINIVASAN,V.AND VARGHESE, G. 1999. Fast address lookups using controlled prefix expansion. Transactions on Computer Systems 17, 1 (Feb.), 1-40.]] Google ScholarGoogle Scholar
  40. SRINIVASAN, V., VARGHESE, G., SURI,S.,AND WALDVOGEL, M. 1998. Fast and scalable layer four switching. In Proceedings of ACM SIGCOMM '98 (Sept. 1998), pp. 191-202.]] Google ScholarGoogle Scholar
  41. VAN EMDE BOAS, P. 1975. Preserving order in a forest in less than logarithmic time. In Proceedings of the 16th Annual Symposium on Foundations of Computer Science (1975), pp. 75-84.]]Google ScholarGoogle Scholar
  42. VAN EMDE BOAS, P., KAAS, R., AND ZULSTRA, E. 1977. Design and implementation of an efficient priority queue. Mathematical Systems Theory 10, 99-127.]]Google ScholarGoogle Scholar
  43. WALDVOGEL, M. 2000. Multi-dimensional prefix matching using line search. In Proceedings of IEEE Local Computer Networks (Nov. 2000), pp. 200-207.]] Google ScholarGoogle Scholar
  44. WALDVOGEL, M., VARGHESE, G., TURNER,J.,AND PLATTNER, B. 1997. Scalable high speed IP routing table lookups. In Proceedings of ACM SIGCOMM '97 (Sept. 1997), pp. 25-36.]] Google ScholarGoogle Scholar

Index Terms

  1. Scalable high-speed prefix matching

        Recommendations

        Comments

        Login options

        Check if you have access through your login credentials or your institution to get full access on this article.

        Sign in

        Full Access

        PDF Format

        View or Download as a PDF file.

        PDF

        eReader

        View online with eReader.

        eReader