280 likes | 407 Views
Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers. Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter: Chen-Yu Chang Date: 2009/6/17. Outline. Introduction A shared FIB data structure Prototype implementation in click router
E N D
Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter: Chen-Yu Chang Date: 2009/6/17
Outline • Introduction • A shared FIB data structure • Prototype implementation in click router • Experiment setup • Experiment evaluation
Introduction (1/4) • Virtual Router • Large ISPs usually have a large number of customers, to satisfy customers’ needs accordingly, ISPs should provide customer-specific routes depending on their requirements. • To provide more flexible customer route selection, an ISP needs to have a router for each of its customers, which can be expensive if dedicated physical routers are used. • Therefore, having multiple virtual routers on the same physical router is an attractive alternative.
Introduction (2/4) • Virtual Router • A physical router supports tens and hundreds of virtual routers. • Local forwarding information bases (FIBs).
Introduction (3/4) • Separated FIB data structure • Hardware approaches • Requires large TCAMs • Can not support all VRs • Software routers • High memory requirements • Inadequate cache and SRAM sizes • Cache pollution and high cache miss rates • Poor lookup performance
Introduction (4/4) • Why a shared FIB? • Benefits of a shared FIB • Lowers the requirements on TCAMs • Reduces the memory usage • Lowers the cache miss rates • Increases the lookup speed
Outline • Introduction • A shared FIB data structure • Prototype implementation in click router • Experiment setup • Experiment evaluation
A strawman approach to a shared FIB • A strawman approach is to store multiple FIBs directly on a single trie. • Needs twomemory references • Next-hop address and pointer to the child nodes
Our approach to a shared FIB(1/7) • The goal of our approach is to support a single memory referencefor each trie node traversal. • The solution is to turn the longest-prefix match into an exact match. • In this way, all prefixes are stored in leaf nodes of the trie; since internal nodes do not contain prefixes, they do not need to store P.
Our approach to a shared FIB(2/7) • The first step in constructing a shared data structure is to transform the set of prefixes in all FIBs into a common prefix set. • In addition, the common prefix set should be both disjoint and complete.
Our approach to a shared FIB(4/7) • When a common prefix set is obtained from the FIBs, a shared lookup data structure can be constructed. • The data structure contains a trie node array, a shared next-hop table and all FIBs’ next-hop tables.
Our approach to a shared FIB(5/7) • Trie node array • The branch factor represents the number of descendants of the node. EX:Branch = 2 → It has 22 = 4 child nodes • The trie root node is stored in T[0]. • For a leaf node, the pointer points to an element in the shared next-hop table. • As the number of trie nodes and the number of elements in the shared next-hop table both are significantly smaller than 227, therefore, each trie node only requires 4 bytes (5 bits for the branch factor, 27 bits for the pointer).
Our approach to a shared FIB(6/7) • Shared next-hop table • In the shared next-hop table, each element contains P for all virtual routers. • We assume that the number of next-hops in a virtual router is less than 256, then one byte is enough for each P. • The size of each element also depends on the number of virtual routers.
Our approach to a shared FIB(7/7) • Constructing the data structure • First, all virtual routers’ nexthop tables are constructed in a straightforward way. • The shared next-hop table can be constructed by going through all prefixes in the common prefix set, for each prefix, an entry can be created if no similar entry exists. • The last step is to construct the trie node array. • We used a fixed branching at the root node independentof the fill factor.The fixed branching to 216 children gives the best performance.
Lookup algorithm • The lookup function takes the virtual router ID and the destination IP address as arguments, and returns the correct next-hop pointer P.
Outline • Introduction • A shared FIB data structure • Prototype implementation • Experiment setup • Experiment evaluation
Prototype implementation(1/3) • We implemented a prototype of the shared data structure and the lookup algorithm in the Click modular router. • The Click modular router is an architecture for building flexible software routers. • A Click router is assembled from packet processing modules called elements. • Each element implements packet processing functions like classification, queuing, scheduling and interface with the network device.
Prototype implementation(3/3) • Note that a virtual router’s Click graph may contain more than a single element, and Click graphs in different virtual routers may vary. • To allow CPU and bandwidth sharing, the virtual routers’ Click graph can be executed by different threads, each being active for a period of time.
Outline • Introduction • A shared FIB data structure • Prototype implementation in click router • Experiment setup • Experiment evaluation
Experiment setup • Routing tables • FUNET tables • SUNET tables • Route Views project • Packet traces • A real packet trace from FUNET • Random network traces • Experimental platform • PC300 computer from Emulab • 3.0 GHz, 8kB L1, 2MB L2 cache, and 2 GB RAM
Outline • Introduction • A shared FIB data structure • Prototype implementation in click router • Experiment setup • Experiment evaluation
Data structure size(1/2) • Trie node array + shared next-hop table + FIBs’ next-hop tables
Packet lookup time(1/2) • Instruction execution time + data access time • Instruction execution time • Number of executed instructions • Time to execute a single instruction • Data access time • L1 cache: 2 ns • L2 cache: 8 ns • Main memory: 60 ns