41
cs6390 summer 2000 Tr adeoffs for Packet Classi fication 1 Tradeoffs for Packet Classification Members: Jinxiao Song & Yan Tong

Tradeoffs for Packet Classification Members: Jinxiao Song & Yan Tong

  • Upload
    kennan

  • View
    42

  • Download
    2

Embed Size (px)

DESCRIPTION

Tradeoffs for Packet Classification Members: Jinxiao Song & Yan Tong. To present an algorithm for solving the packet classification(PC) problem that allows various access time vs. memory tradeoffs concentrate on software solution for flow control: algorithm, data structure…etc. Objectives. - PowerPoint PPT Presentation

Citation preview

Page 1: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

1

Tradeoffs for Packet Classification

Members: Jinxiao Song & Yan Tong

Page 2: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

2

Objectives

• To present an algorithm for solving the packet classification(PC) problem that allows various access time vs. memory tradeoffs

concentrate on software solution for flow control: algorithm, data structure…etc

Page 3: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

3

What’s the packet classification problem?

• Identifies the flow a packet belongs to, based on one or more fields in the packet header

Page 4: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

4

How to classify the packets?

• packet header fields (dimensions)– destination and source IP addresses– protocol type– source and destination port numbers

• rules for classification– valid ranges for any of the header fields

Page 5: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

5

Approaches to the problem

multi-dimensional

PC problem

one-dimensional

PC problem

reduce

dynamic PC problem

static

PC problem

reduce

Page 6: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

6

Requirements for packet classificationSince this algorithm can be engineering to particular applications, so let find

what is problem requirement from software engineering

– Resource limitations• tradeoff time to perform the classification per packet

vs.memory used

– Number of rules to be supported• expect to scale up

– Number of fields( dimensions ) used– Nature of rules

• some current routers use one field destination IP address

Page 7: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

7

requirements (cont.)

– Updating the set of rules• the number of change to the rules either due to a

route or policy change• solutions must adapt gracefully and quickly to such

updates without hurting access performance– Worse case vs.Average case

– focus on worst case rather than average case

Page 8: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

8

Problem specification• given

– a rule set R={ r1,…,rn } of rules over d fields

– each rule consists of ranges ri=[Fi1,..,Fi

d] Fijis a range

of values the field j may take– each rule with a cost– each query is a packet p={f1,…,fd} where fi is a single

value• find

– The least cost rule applies to the packet

Page 9: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

9

What’s the key of authors’ algorithm?

• reduces the multi-dimensional packet classification problem to solving a few instances of the one-dimensional IP look up problem

• rules have a natural geometric interpretation in d-dimensions.

Page 10: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

10

1-D 2-D 3D

Page 11: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

11

What’s the one-dimensional PC problem?

• Given:– a set of n rules possibly overlapping intervals

from [1…U]• U-----the range of IP addresses

– each rule with a cost

Page 12: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

12

cont.

• find:– look up queries for point q [ 1..U ] by

identifying the smallest cost rule that contains q

One dimensional PC problem has two special cases, they are bases for solving general one dimensional PC problem

Page 13: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

13

Two special cases

• The IP Lookup(IPL) problem• The Range Location(RL) problem

Page 14: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

14

IP Look up problem( IPL )

• classify packet based on the destination IP addresses

• each range is a prefix of an IP address• goal:determine the least cost rule that is a prefix of

q • each query q is an IP address

Basically, the IPL problem is giving a set of prefixes and address d(packet address), we want to find the longest matching prefix of d in routing table

Page 15: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

15

Range Location problem( RL )

• ranges are non-overlapping(elementary interval)

• completely cover the specified series of left end points of the intervals

• in the sorted order• each query is an integer• goal:determine the interval that contains q

Page 16: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

16

Example: elementary intervals

Elementary

Intervals

Intervals

Ranges for rule

Page 17: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

17

How to solve the RL?• Reduce the RL to IPL• based on a theorem:

– Consider any instance I of the RL problem with N point in the range 1..U.We can derive an instance I’ of IPL with at most 2N prefixes,each a string of length at most a = logU .Each query I for the PL problem can be transformed into an IP address of length at most a for the IPL problem on set I’

Page 18: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

18

Example:reduction of RL to IPL

0000 0010

1000

1110

1111

RL problem: {0000, 0010, 1000, 1110, 1111}

Page 19: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

19

RL IPL cont. converted IPL problem with prefixes:{000x, 001x, 0xxx, 1xxx, 10xx, 11xx, 1110, 1111) routing table:

  

prefix next hop0xxx R11xxx R410xx R511xx R8000x R2001x R31110 R71111 R6

 

Page 20: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

20

Benefit of solution from RL to IPL

• used in the reduction: one-dimensional PC with arbitrary range

rules PC with only prefix while increasing the number of rules by at most a factor of two

• using the best known solutions for IPL to solve RL

Page 21: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

21

Two - dimensional classification

Page 22: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

22

What’s the two-dimensional PC problem?

• Given: a two-dimensional grid point q• find : the smallest cost rectangle in R

Page 23: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

23

1-D 2-D 3D

Page 24: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

24

Data structure: FIS tree ( fat , inverted, segment tree )

data structure to support tradeoffs between access time and memory space

• S - a set of m segments• t-ary tree • l -level

Page 25: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

25

FIS (cont.)• balanced , inverted t-ary tree with l level• leaves correspond to the elementary

intervals in order• larger interval is the union of the

elementary intervals• canonical set: the set of segments stored

with a node

Page 26: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

26

Properties of FIS

• the depth is log(m)/log(t) = l• each segment is stored in at most 2t-1 nodes

per level• the collection of segments containing any

point p is the union of l sets,the canonical subsets of the nodes on the search path of p in T; these sets are disjoint.

Page 27: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

27

Preprocessing: according to 2-D PC problem construct:• x-FIS tree• y-set

How to build the FIS tree

Page 28: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

28

Example:construct of an x-FIS tree

ElementaryIntervals

x-FIStree

12

34

5

8 6

7

9

10

(3,4)

(2,8,1)

(9,10)

3-ary

Page 29: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

29

Example:construct of the y-FIS tree of one node v

12

8

node v :canonical set (2,8,1)

5

x

y

Page 30: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

30

Query Processing:

• With 2-dimensional query point q = (qx, qy)• Reduce it to single instance of RL problem

take advantage of the FIS tree• Increase search speed

Page 31: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

31

Steps for query processing• Solve the RL problem on the x-set with query qx , get the

leaf Lx in the FIS tree representing the elementary interval containing qx

• Consider all successive parent of Lx

• Search the y-sets associated with each parent of Lx by solving the RL problem with qy for each nod. This determines the set of elementary interval that contain q from all y-sets. The smallest cost rectangle associated with these elementary intervals is returns as the solution.???

• This can be thought of as solving the one-dimensional problem on the y-sets of the parents of Lx , using FIS trees of only one level.

Page 32: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

32

Theoretical results from query processing

l-level x-FIS tree, n is the number of rules• Memory space: O(ln1+1/l)• Access time: (l+1)RLt(2n, U)

The larger l is, the smaller the memory use and the larger the number of memory accesses

Page 33: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

33

Multi-Dimensional classification

• construct a FIS tree on the first dimension and recursively construct our data structure on the remaining dimensions for each of the canonical sets in this FIS tree.

• The FIS TREE for the last dimension will be of level one just as in the two -dimensional case .

Page 34: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

34

Dynamic PC problem:

• dynamic RL problem: at most twice the number of memory access as the solution to the static RL problem. (the penalty can be avoided by using a cacheline twice as wide).

• incremental classification: relax the degree of the FIS tree, • dynamic classification: relax the delta canonical set of

node and the degree of the FIS tree

 

dynamic PC dynamic RLinsert (incremental classification) split

delete(dynamic classification) merge

  

Page 35: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

35

Example:construct of an x-FIS tree

ElementaryIntervals

x-FIStree

12

34

5

8 6

7

9

10

(3,4)

(2,8,1)

(9,10)

3-ary

Page 36: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

36

Principle for solving dynamic PC: Make data structure(FIS tree) flexible but not destroy its

global stability:

• dynamic PC dynamic RL static RL• relax the degree of the FIS tree:the cost of lookup remains

essential unchanged while increase the use of memory• maintain the current data structure so that delta canonical

sets are small• incremental classification: incremental FIS tree

Page 37: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

37

Various Tradeoffs in classification:

• static PC problem: the larger l (levels of FIS tree) is, the small the memory use and the larger the number of memory access will be

• choose appropriate solutions for the subproblems

• the order in which the dimensions must be considered

Page 38: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

38

Additional considerations for dynamic PC problem:

• choice of the branching factor.• multiplex the updating of the tree with performing the

lookups, although this requires careful implementation.• batch updates and perform them more efficiently than

doing each individual update separately.

Page 39: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

39

Experimental study:• algorithms tested• performance metrics:measuring the memory accesses,

measuring the memory usage• For small rulesets (up to a few K rules), one level FIS tree

suffices. The space used is a few 100k bytes and the number of memory accesses is less than 10.

• For few 10 K rules, 2 level FIS tree, space is a few Mbytes, memory access is about 15.

• For very large dataset(10^6 rules), 2-3 level FIS tree, space 100 Mbytes, memory access is up to 18

Page 40: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

40

Related work:

• Many research in this area• Motivation is to explore if software based

solutions can perform lookups at high linespeed.

Page 41: Tradeoffs for Packet Classification Members: Jinxiao Song  & Yan Tong

cs6390 summer 2000 Tradeoffs for Packet Classification

41

Conclusions:1. Using a “fat” hierarchy of canonical sets to decrease the

number of sets to be searched per query2. Locating the canonical sets to be searched by processing

up from the leaves using the inverted edges of FIS tree3. Locating the leaves in FIS trees using the standard IPL

problem, thereby leveraging off best known hardware and software solutions for it

4. Using FIS tree nodes with flexible degree to allow moderate number of updates without degrading the lookup performance significantly

5. Reducing the universe size using IPL problem before applying our solutions thereby reducing the memory accesses for each consequent IPL solution