![Page 1: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/1.jpg)
IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector
Author: Hyesook Lim, Hyeong-gee Kim, ChanghoonPublisher: IEEE TRANSACTIONS ON COMMUNICATIONS 2009Presenter: Chen-Yu ChangDate: 2009/4/22
![Page 2: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/2.jpg)
Outline
Introduction
Proposed algorithm
Performance
![Page 3: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/3.jpg)
Introduction
We propose an efficient binary search algorithm for IP address lookup in the Internet routers.
We propose a perfectly balanced search algorithm based on the binary search tree.
It provides excellent search performance and scalability toward large routing tables.
![Page 4: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/4.jpg)
Outline
Introduction
Proposed algorithm
Performance
![Page 5: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/5.jpg)
Proposed algorithm(1/9)
To construct a balanced binary search tree, we remove the prefix nesting relationship of nodes in the binary search tree and make each node hold a prefix vector containing the nesting information.
Definition: Pl : Leaf prefixes of the binary trie.
Ex : P0, P1, P3, P4 or P7
![Page 6: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/6.jpg)
Proposed algorithm(2/9)
What is the prefix vector?Prefix vector is composed of n(Pl) elements :V = [v1, v2, …, vn(Pl)
] , if S(Pl, k) = Pi for k = 1, …, n(Pl), vk = Yi where Yi is the output port. If there is no Pi such that S(Pl, k) = Pi , vk is a null element and is represented as ø. Ex : The prefix vector of P4 is [Y2, ø, ø, Y5, ø, Y4]
![Page 7: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/7.jpg)
Proposed algorithm(4/9) Building the routing table of the proposed algorithm h
as two steps : First : A prefix vector is constructed for each leaf
prefix of the binary trie.
Second : Leaf prefixes with a prefix vector are sorted in the ascending order and stored into a memory array.
![Page 8: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/8.jpg)
Proposed algorithm(3/9)
Since each leaf prefix is free from nesting, the restriction coming from the prefix nesting relationship in building the binary search tree is not applied.
The number of entries in the proposed algorithm is smaller than the actual number of routing prefixes.
![Page 9: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/9.jpg)
Proposed algorithm(5/9) Search algorithm
V(u) be the prefix vector of a node u. P(u) be the leaf prefix stored at the node u. K ∗ represent the best matching prefix length. O ∗ represent the corresponding output port of the BMP.
![Page 10: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/10.jpg)
Proposed algorithm(6/9)
Ex :1111100
K* : 0 O* : defaultK* : 1 O* : Y2K* : 5 O* : Y71110101
K* : 1 O* : Y2K* : 3 O* : Y6
![Page 11: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/11.jpg)
Proposed algorithm(7/9)
Update In inserting or deleting a prefix, we searching both the
start point and the end point, we can narrow down the range affected by the change.
If the start and the end are the same, by examining one entry up or down, we can find out the longest prefix of a new entry or an obsolete entry, and hence we can handle the required prefix vector.
![Page 12: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/12.jpg)
Proposed algorithm(8/9) Assume W=7
Ex : Insert 110* start : 1100000
end : 1101111
Ex : Insert 111110* start : 1111100
end : 1111101
Ex : Delete 1* start : 1000000
end : 1111111
![Page 13: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/13.jpg)
Proposed algorithm(9/9)
Search complexity : O(logN)
Space complexity : O(WN)
Update complexity : O(2 logN + α) α is the number of linear searches for entries in the affected ra
nge.
![Page 14: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/14.jpg)
Outline
Introduction
Proposed algorithm
Performance and discussion
![Page 15: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/15.jpg)
Performance(1/2)
Table I shows that the proposed algorithm is effective for large routing tables and hence provides good scalability.
![Page 16: IP Address Lookup for Internet Routers Using Balanced Binary Search with Prefix Vector Author: Hyesook Lim, Hyeong-gee Kim, Changhoon Publisher: IEEE TRANSACTIONS](https://reader030.vdocuments.us/reader030/viewer/2022032800/56649d365503460f94a0e640/html5/thumbnails/16.jpg)
Performance(2/2)