efficient ip-address lookup with a shared forwarding table for multiple virtual routers author: jing...

28
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

Post on 20-Dec-2015

228 views

Category:

Documents


2 download

TRANSCRIPT

Page 1: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers

Author: Jing Fu, Jennifer RexfordPublisher: ACM CoNEXT 2008Presenter: Chen-Yu ChangDate: 2009/6/17

Page 2: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Outline

Introduction

A shared FIB data structure

Prototype implementation in click router

Experiment setup

Experiment evaluation

Page 3: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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.

Page 4: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Introduction (2/4)

Virtual Router A physical router supports tens and hundreds of virtual router

s.

Local forwarding information bases (FIBs).

Page 5: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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

Page 6: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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

Page 7: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Outline

Introduction

A shared FIB data structure

Prototype implementation in click router

Experiment setup

Experiment evaluation

Page 8: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

A strawman approach to a shared FIB

A strawman approach is to store multiple FIBs directly on a single trie.

Needs two memory references Next-hop address and pointer to the child nodes

Page 9: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Our approach to a shared FIB(1/7)

The goal of our approach is to support a single memory reference for 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.

Page 10: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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.

Page 11: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Our approach to a shared FIB(3/7)

Page 12: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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.

Page 13: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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).

Page 14: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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.

Page 15: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Our approach to a shared FIB(7/7)

Constructing the data structure First, all virtual routers’ nexthop tables are constructed in a s

traightforward 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 independent of the fill factor.The fixed branching to 216 children gives the best performance.

Page 16: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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.

Page 17: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Outline

Introduction

A shared FIB data structure

Prototype implementation

Experiment setup

Experiment evaluation

Page 18: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Prototype implementation(1/3) We implemented a prototype of the shared data struc

ture 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.

Page 19: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Prototype implementation(2/3)

Page 20: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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.

Page 21: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Outline

Introduction

A shared FIB data structure

Prototype implementation in click router

Experiment setup

Experiment evaluation

Page 22: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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

Page 23: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Outline

Introduction

A shared FIB data structure

Prototype implementation in click router

Experiment setup

Experiment evaluation

Page 24: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Data structure size(1/2)

Trie node array + shared next-hop table + FIBs’ next-hop tables

Page 25: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Data structure size(2/2)

Page 26: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

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

Page 27: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Packet lookup time(2/2)

Page 28: Efficient IP-Address Lookup with a Shared Forwarding Table for Multiple Virtual Routers Author: Jing Fu, Jennifer Rexford Publisher: ACM CoNEXT 2008 Presenter:

Packet forwarding speed