This Article 
 Bibliographic References 
 Add to: 
O(\log n) Dynamic Router-Tables for Prefixes and Ranges
October 2004 (vol. 53 no. 10)
pp. 1217-1230
Two versions of the Internet (IP) router-table problem are considered. In the first, the router table consists of n pairs of tuples of the form (p,a), where p is an address prefix and a is the next-hop information. In this version of the router-table problem, we are to perform the following operations: insert a new tuple, delete an existing tuple, and find the tuple with longest matching-prefix for a given destination address. We show that each of these three operations may be performed in O(\log n) time in the worst case using a priority-search tree. In the second version of the router-table problem considered by us, each tuple in the table has the form (r,a), where r is a range of destination addresses matched by the tuple. The set of tuples in the table is conflict-free. For this version of the router-table problem, we develop a data structure that employs priority-search trees as well as red-black trees. This data structure permits us to perform each of the operations insert, delete, and find the tuple with most-specific matching-range for a given destination address in O(\log n) time each in the worst case. The insert and delete operations preserve the conflict-free property of the set of tuples. Experimental results are also presented.

[1] S. Sahni and K. Kim, $O(\log n)$Dynamic Packet Routing Proc. IEEE Symp. Computers and Comm., pp. 443-448, 2002.
[2] C. Macian and R. Finthammer, An Evaluation of the Key Design Criteria to Achieve High Update Rates in Packet Classifiers IEEE Network, vol. 15, no. 6, pp. 24-29, Nov./Dec. 2001.
[3] A. Hari, S. Suri, and G. Parulkar, Detecting and Resolving Packet Filter Conflicts Proc. IEEE INFOCOM, 2000.
[4] M. Ruiz-Sanchez, E. Biersack, and W. Dabbous, Survey and Taxonomy of IP Address Lookup Algorithms IEEE 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] K. Sklower, A Tree-Based Routing Table for Berkeley Unix technical report, Univ. of California, Berkeley, 1993.
[7] M. Degermark, A. Brodnik, S. Carlsson, and S. Pink, Small Forwarding Tables for Fast Routing Lookups Proc. ACM SIGCOMM, pp. 3-14, 1997.
[8] W. Doeringer, G. Karjoth, and M. Nassehi, Routing on Longest-Matching Prefixes IEEE/ACM Trans. Networking, vol. 4, no. 1, pp. 86-97, 1996.
[9] S. Nilsson and G. Karlsson, Fast Address Look-Up for Internet Routers IEEE Broadband Comm., 1998.
[10] V. Srinivasan and G. Varghese, Faster IP Lookups Using Controlled Prefix Expansion ACM Trans. Computer Systems, pp. 1-40, Feb. 1999.
[11] 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.
[12] S. Sahni and K. Kim, Efficient construction of Variable-Stride Multibit Tries for IP Lookup Proc. IEEE Symp. Applications and the Internet (SAINT), 2002.
[13] M. Waldvogel, G. Varghese, J. Turner, and B. Plattner, Scalable High Speed IP Routing Lookups Proc. ACM SIGCOMM, pp. 25-36, 1997.
[14] M. Berg, M. Kreveld, and J. Snoeyink, Two- and Three-Dimensional Point Location in Rectangular Subdivisions J. Algorithms, vol. 18, no. 2, pp. 256-277, 1995.
[15] D.E. Willard, Log-Logarithmic Worst-Case Range Queries Are Possible in Space$\theta(n)$ Information Processing Letters, vol. 17, pp. 81-84, 1983.
[16] P.V. Emde Boas, R. Kass, and E. Zijlstra, Design and Implementation of an Efficient Priority Queue Math. Systems Theory, vol. 10, pp. 99-127, 1977.
[17] B. Lampson, V. Srinivasan, and G. Varghese, IP Lookup Using Multi-Way and Multicolumn Search Proc. IEEE INFOCOM, 1998.
[18] S. Suri, G. Varghese, and P. Warkhede, Multiway Range Trees: Scalable IP Lookup with Fast Updates Proc. GLOBECOM, 2001.
[19] S. Sahni and K. Kim, Efficient Dynamic Lookup for Bursty Access Patterns, 2003.
[20] F. Ergun, S. Mittra, S. Sahinalp, J. Sharp, and R. Sinha, A Dynamic Lookup Scheme for Bursty Access Patterns Proc. IEEE INFOCOM, 2001.
[21] G. Cheung, S. McCanne, Optimal Routing Table Design for IP Address Lookups under Memory Constraints Proc. IEEE INFOCOM, 1999.
[22] A. McAuley and P. Francis,"Fast Routing Table Lookup Using CAMs," Proc. IEEE Infocom, vol. 3, IEEE CS Press, Los Alamitos, Calif., 1993, pp. 1382-1391.
[23] G. Chandranmenon and G. Varghese, Trading Packet Headers for Packet Processing IEEE Trans. Networking, 1996.
[24] P. Newman et al., "IP Switching and Gigabit Routers," IEEE Comm., Vol. 35, No. 1, Jan. 1997, pp. 64-69.
[25] A. Bremler-Barr, Y. Afek, and S. Har-Peled, Routing with a Clue Proc. ACM SIGCOMM, pp. 203-214, 1999.
[26] P. Gupta and N. McKeown, Dynamic Algorithms with Worst-Case Performance for Packet Classification IFIP Networking, 2000.
[27] E. McCreight, Priority Search Trees SIAM J. Computing, vol. 14, no. 1, pp. 257-276, 1985.
[28] Merit, IPMA Statistics http://nic.merit.eduipma, 2000, 2001.
[29] K. Melhorn, Data Structures and Algorithms 3: Multi-Dimensional Searching and Computational Geometry. New York: Springer Verlag, 1984.
[30] H. Lu and S. Sahni, $O(\log n)$Dynamic Router-Tables for Prefixes and Ranges, 2003.

Index Terms:
Packet routing, dynamic router-tables, longest-prefix matching, most-specific-range matching, conflict-free ranges.
Haibin Lu, Sartaj Sahni, "O(\log n) Dynamic Router-Tables for Prefixes and Ranges," IEEE Transactions on Computers, vol. 53, no. 10, pp. 1217-1230, Oct. 2004, doi:10.1109/TC.2004.81
Usage of this product signifies your acceptance of the Terms of Use.