Skip to main content

IP Address LookupMade Fast and Simple

  • Conference paper
  • First Online:
Algorithms - ESA’ 99 (ESA 1999)

Part of the book series: Lecture Notes in Computer Science ((LNCS,volume 1643))

Included in the following conference series:

Abstract

The IP address lookup problem is one of the major bottlenecks in high performance routers. Previous solutions to this problem first describe it in the general terms of longest prefix matching and, then, are experimented on real routing tables T. In this paper, we follow the opposite direction. We start out from the experimental analysis of real data and, based upon our findings, we provide a new and simple solution to the IP address lookup problem. More precisely, our solution for m-bit IP addresses is a reasonable trade-off between performing a binary search on T with O(log |T|) accesses, where |T| is the number of entries in T, and executing a single access on a table of 2m entries obtained by fully expanding T. While the previous results start out from space-efficient data structures and aim at lowering the O(log |T|) access cost, we start out from the expanded table with 2m entries and aim at compressing it without an excessive increase in the number of accesses. Our algorithm takes exactly three memory accesses and occupies O(2m/2 + |T|2) space in the worst case. Experiments on real routing tables for m = 32 show that the space bound is overly pessimistic. Our solution occupies approximately one megabyte for the MaeEast routing table (which has |T| ≈ 44; 000 and requires approximately 250 KB) and, thus, takes three cache accesses on any processor with 1MB of L2 cache. According to the measurement obtained by the VTune tool on a Pentium II processor, each lookup requires 3 additional clock cycles besides the ones needed for the memory accesses. Assuming a clock cycle of 3.33 nanoseconds and an L2 cache latency of 15 nanoseconds, search of MaeEast can be estimated in 55 nanoseconds or, equivalently, our method performs 18 millions of lookups per second.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. S. Deering and R. Hinden. Internet protocol, version 6 (IPv6). RFC 1883 (http://www.merit.edu/internet/documents/rfc/rfc1883.txt), 1995.

  2. M. Degermark, A. Brodnik, S. Carlsson, and S. Pink. Small forwarding tables for fast routing lookups. ACM Computer Comm. Review, 27(4):3–14, 1997.

    Google Scholar 

  3. V. Fuller, T. Li, J. Yu, and K. Varadhan. Classless inter-domain routing (CIDR): an address assignment and aggregation strategy. RFC 1519 (http://www.merit.edu/internet/documents/rfc/rfc1519.txt), 1993.

  4. Intel. Vtune. http://developer.intel.com/design/perftool/ vtune/, 1997.

  5. B. Lampson, V. Srinivasan, and G. Varghese. IP lookups using multi-way and multicolumn search. In ACM INFOCOM Conference, April 1998.

    Google Scholar 

  6. A. McAuley, P. Tsuchiya, and D. Wilson. Fast multilevel hierarchical routing table using content-addressable memory. U.S. Patent Serial Number 034444, 1995.

    Google Scholar 

  7. Merit. IPMA statistics. http://nic.merit.edu/ipma, 1998.

  8. D. R. Morrison. PATRICIA-Practical Algorithm To Retrieve Information Coded In Alfanumeric. Journal of ACM, 15(4):514–534, October 1968.

    Article  MathSciNet  Google Scholar 

  9. M. Nelson. The Data Compression Book. M&T Books, San Mateo, CA, 1992.

    Google Scholar 

  10. P. Newman, G. Minshall, T. Lyon, and L. Huston. IP switching and gigabit routers. IEEE Communications Magazine, January 1997.

    Google Scholar 

  11. S. Nilsson and G. Karlsson. Fast address look-up for internet routers. In ALEX, pages 9–18. Università di Trento, February 1998.

    Google Scholar 

  12. C. Partridge. A 50-Gb/s IP router. IEEE/ACM Transactions on Networking, 6(3):237–247, June 1998.

    Article  Google Scholar 

  13. T.-B. Pei and C. Zukowski. Putting routing tables into silicon. IEEE Network, pages 42–50, January 1992.

    Google Scholar 

  14. J. Postel. Internet protocol. RFC 791 (http://www.merit.edu/internet/ documents/rfc/rfc0791.txt), 1981.

  15. V. Srinivasan and G. Varghese. Fast address lookups using controlled prefix expansion. In ACM SIGMETRICS Conference, September 1998. Full version to appear in ACM TOCS.

    Google Scholar 

  16. W. R. Stevens and G. R. Wright. TCP/IP Illustrated, Volume 2 The Implementation. Addison-Wesley Publishing Company, Reading, Massachusetts, 1995.

    Google Scholar 

  17. M. Waldvogel, G. Varghese, J. Turner, and B. Plattner. Scalable high speed IP routing lookups. ACM Computer Communication Review, 27(4):25–36, 1997.

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1999 Springer-Verlag Berlin Heidelberg

About this paper

Cite this paper

Crescenzi, P., Dardini, L., Grossi, R. (1999). IP Address LookupMade Fast and Simple. In: Nešetřil, J. (eds) Algorithms - ESA’ 99. ESA 1999. Lecture Notes in Computer Science, vol 1643. Springer, Berlin, Heidelberg. https://doi.org/10.1007/3-540-48481-7_7

Download citation

  • DOI: https://doi.org/10.1007/3-540-48481-7_7

  • Published:

  • Publisher Name: Springer, Berlin, Heidelberg

  • Print ISBN: 978-3-540-66251-8

  • Online ISBN: 978-3-540-48481-3

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics