This Article 
 Bibliographic References 
 Add to: 
Enhanced Interval Trees for Dynamic IP Router-Tables
December 2004 (vol. 53 no. 12)
pp. 1615-1628
Haibin Lu, IEEE
We develop an enhanced interval tree data structure that is suitable for the representation of dynamic IP router tables. Several refinements of this enhanced structure are proposed for a variety of IP router tables. For example, the data structure called BOB (binary tree on binary tree) is developed for dynamic router tables in which the rule filters are nonintersecting ranges and in which ties are broken by selecting the highest-priority rule that matches a destination address. Prefix filters are a special case of nonintersecting ranges and the commonly used longest-prefix tie breaker is a special case of the highest-priority tie breaker. When an n-rule router table is represented using BOB, the highest-priority rule that matches a destination address may be found in O(\log ^2 n) time; a new rule may be inserted and an old one deleted in O(\log n) time. For general ranges, the data structure CBOB (compact BOB is proposed). For the case when all rule filters are prefixes, the data structure PBOB (prefix BOB) permits highest-priority matching as well as rule insertion and deletion in O(W) time, where W is the length of the longest prefix, each. When all rule filters are prefixes and longest-prefix matching is to be done, the data structure LMPBOB (longest matching-prefix BOB) permits longest-prefix matching in O(W) time; rule insertion and deletion each take O(\log n) time. On practical rule tables, BOB and PBOB perform each of the three dynamic-table operations in O(\log n) time and with O(\log n) cache misses. The number of cache misses incurred by LMPBOB is also O(\log n). Experimental results also are presented.

[1] C. Macian and R. Finthammer, “An Evaluation of the Key Design Criteria to Achieve High Update Rates in Packet Classifiers,” IEEE Network, pp. 24-29, Nov./Dec. 2001.
[2] F. Baboescu, S. Singh, and G. Varghese, “Packet Classification for Core Routers: Is There an Alternative to Cams?” Proc. IEEE INFOCOM, 2003.
[3] C. Labovitz, G. Malan, and F. Jahanian, “Internet Routing Instability,” IEEE/ACM Trans. Networking, 1997.
[4] M. Ruiz-Sanchez, E. Biersack, and W. Dabbous, “Survey and Taxonomy of IP Address Lookup Algorithms,” Network, vol. 15, no. 2, pp. 8-23, Mar./Apr. 2001.
[5] S. Sahni, K. Kim, and H. Lu, “Data Structures for One-Dimensional Packet Classification Using Most-Specific-Rule Matching,” Proc. Int'l Symp. Parallel Architectures, Algorithms, and Networks (ISPAN), May 2002.
[6] A. McAuley and P. Francis, “Fast Routing Table Lookups Using Cams,” Proc. IEEE INFOCOM, pp. 1382-1391, 1993.
[7] D. Shah and P. Gupta, “Fast Updating Algorithms for Tcams,” IEEE Micro, vol. 21, no. 1, pp. 36-47, 2001.
[8] C. Matsumoto, “Cam Vendors Consider Algorithmic Alternatives,” EETimes, May 2002.
[9] K. Sklower, “A Tree-Based Routing Table for Berkeley Unix,” technical report, Univ. of California, Berkeley, 1993.
[10] M. Degermark, A. Brodnik, S. Carlsson, and S. Pink, “Small Forwarding Tables for Fast Routing Lookups,” Proc. ACM SIGCOMM, pp. 3-14, 1997.
[11] W. Doeringer, G. Karjoth, and M. Nassehi, “Routing on Longest-Matching Prefixes,” IEEE/ACM Trans. Networking, vol. 4, no. 1, pp. 86-97, 1996.
[12] S. Nilsson and G. Karlsson, “Fast Address Look-Up for Internet Routers,” IEEE Broadband Comm., 1998.
[13] V. Srinivasan and G. Varghese, “Faster IP Lookups Using Controlled Prefix Expansion,” ACM Trans. Computer Systems, pp. 1-40, Feb. 1999.
[14] S. Sahni and K. Kim, “Efficient Construction of Fixed-Stride Multibit Tries for IP Lookup,” Proc. Eighth IEEE Workshop Future Trends of Distributed Computing Systems, 2001.
[15] S. Sahni and K. Kim, “Efficient Construction of Variable-Stride Multibit Tries for IP Lookup,” Proc. IEEE Symp. Applications and the Internet (SAINT), 2002.
[16] P. Gupta, S. Lin, and N. McKeown, “Routing Lookups in Hardware at Memory Access Speeds,” Proc. IEEE INFOCOM, 1998.
[17] M. Waldvogel, G. Varghese, J. Turner, and B. Plattner, “Scalable High Speed IP Routing Lookups,” Proc. ACM SIGCOMM, pp. 25-36, 1997.
[18] B. Lampson, V. Srinivasan, and G. Varghese, “IP Lookup Using Multi-Way and Multicolumn Search,” Proc. IEEE INFOCOM, 1998.
[19] A. Basu and G. Narlika, “Fast Incremental Updates for Pipelined Forwarding Engines,” Proc. IEEE INFOCOM, 2003.
[20] S. Suri, G. Varghese, and P. Warkhede, “Multiway Range Trees: Scalable IP Lookup with Fast Updates,” Proc. GLOBECOM, 2001.
[21] S. Sahni and K. Kim, “$O(\log n)$ Dynamic Packet Routing,” Proc. IEEE Symp. Computers and Comm., 2002.
[22] S. Sahni and K. Kim, “Efficient Dynamic Lookup for Bursty Access Patterns,”, 2003.
[23] F. Ergun, S. Mittra, S. Sahinalp, J. Sharp, and R. Sinha, “A Dynamic Lookup Scheme for Bursty Access Patterns,” Proc. IEEE INFOCOM, 2001.
[24] H. Lu and S. Sahni, “$O(\log n)$ Dynamic Router-Tables for Prefixes and Ranges,” Proc. IEEE Symp. Computers and Comm., 2003.
[25] E. Horowitz, S. Sahni, and D. Mehta, Fundamentals of Data Structures in C++. New York: W.H. Freeman, 1995.
[26] P. Gupta and N. McKeown, “Dynamic Algorithms with Worst-Case Performance for Packet Classification,” IFIP Networking, 2000.
[27] T. Cormen, C. Lieserson, R. Rivest, and C. Stein, Introduction to Algorithms, second ed. MIT Press, 2001.
[28] M.D. Berg, M.V. Kreveld, M. Overmars, and O. Schwarzkopf, Computational Geometry: Algorithms and Applications. Springer Verlag, 1997.
[29] S. Sahni, Data Structures, Algorithms, and Applications in Java. New York: McGraw-Hill, 2000.
[30] Merit, “IPMA Statistics,” http://nic.merit.eduipma, 2000, 2001.

Index Terms:
Interval trees, packet classification, packet routing, router tables, highest-priority matching, longest-prefix matching, dynamic rule-tables, rule insertion and deletion.
Haibin Lu, Sartaj Sahni, "Enhanced Interval Trees for Dynamic IP Router-Tables," IEEE Transactions on Computers, vol. 53, no. 12, pp. 1615-1628, Dec. 2004, doi:10.1109/TC.2004.116
Usage of this product signifies your acceptance of the Terms of Use.