1
An Efficient IP Address Lookup Scheme Using Balanced Binary Search with Minimal Entry and
Optimal Prefix Vector
Author: Hyuntae PARK, Hyejeong HONG and Sungho KANG Publisher: IEICE TRANS. COMMUN. 2011 Presenter: Li-Hsien, HsuData: 12/28/2011
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.
To preform the binary search properly, the BST algorithm strictly restricts that the enclosure prefix is stored in a higher level than its enclosed prefix so that the enclosure is compared earlier, and this restriction makes the binary search tree highly unbalanced in case that are many levels of prefix nesting.
2
Introduction
3
P2P1
P3 P4
P0
P8
P9
P7
P5 P6
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: Leaf prefixes of the binary trie.
Ex : P0, P1, P2, P5, P6, P7 or P9
P0
Introduction
4
P2P1
P3 P4
P8
P9
P7
P5 P6
What is the prefix vector?Ex:
The prefix vector of P1 is [Y3, ø, ø, Y1, ø]
The prefix vector of P2 is [Y3, ø, ø, Y2, ø]
The prefix vector of P5 is [Y4, Y8, ø, ø, Y5]
The prefix vector of P6 is [Y4, Y8, ø, ø, Y6]
The prefix vector of P7 is [Y4, Y8, ø, Y7, ø]
P0
Introduction
5
P1
P3 P4
P8
P9
P7
P5 P6
What is the prefix vector?Ex:
The prefix vector of P1 is [Y3, ø, ø, Y1, ø]
The prefix vector of P2 is [Y3, ø, ø, Y2, ø]
The prefix vector of P5 is [Y4, Y8, ø, ø, Y5]
The prefix vector of P6 is [Y4, Y8, ø, ø, Y6]
The prefix vector of P7 is [Y4, Y8, ø, Y7, ø]
P0
Definition(1/3)
6
P1
P3 P4
P8
P9
P7
P5 P6
S(Px,j) : sub-string of the most significant j bits of prefix Px.
L(Px): length of prefix Px.
V(Px):the prefix vector of Px
V(Px): the k-th vector element in V(Px)
P0
Definition(2/3)
7
P1
P3 P4
P8
P9
P7
P5 P6
S(Px,j) : sub-string of the most significant j bits of prefix Px.
L(Px): length of prefix Px.
V(Px):the prefix vector of Px
V(Px): the k-th vector element in V(Px)
P0
Definition(3/3)
8
P1
P3 P4
P8
P9
P7
P5 P6
S(Px,j) : sub-string of the most significant j bits of prefix Px.
L(Px): length of prefix Px.
V(Px):the prefix vector of Px
V(Px): the k-th vector element in V(Px)
9
P2P1
P3 P4
P0
P8
P9
P7
P5 P6
10
P2P1
P3 P4
P0
P8
P9
P7
P5 P6
P4
P8
P5P7
P3
P6 P9
PM1
gray node: ordinary or iso-likeness prefixes.
black node: likeness prefixes.
Search(1/5)
11
Incoming address: 11001 best matching prefix length: 0 corresponding output port of the BMP: default
Search(2/5)
12
Incoming address: 11001 best matching prefix length: 0 corresponding output port of the BMP: default
Search(3/5)
13
Incoming address: 11001 best matching prefix length: 2 corresponding output port of the BMP: Y8
Search(4/5)
14
Incoming address: 11001 best matching prefix length: 2 corresponding output port of the BMP: Y8
Search(5/5)
15
Incoming address: 11001 best matching prefix length: 4 corresponding output port of the BMP: Y6
Performance Evaluation
16
The number of entries in each scheme
Ne
The average numbers of memory accesses
Tav
The maximum numbers of memory accesses
Tmx
The required memory size M