A Two-Stage Packet Classificaton Algorithm

1 / 15

# A Two-Stage Packet Classificaton Algorithm - PowerPoint PPT Presentation

A Two-Stage Packet Classificaton Algorithm. W. T. Chen, Fellow, IEEE, S. B. Shih, and J. L. Chiang, Student Member, IEEE. Outline. The Proposed Two-Stage PC Algorithm Comment. The Proposed Two-Stage PC Algorithm. Step 1.1: Re-organize the rule table by grouping.

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

### A Two-Stage Packet Classificaton Algorithm

W. T. Chen, Fellow, IEEE, S. B. Shih, and J. L. Chiang, Student Member, IEEE

Outline
• The Proposed Two-Stage PC Algorithm
• Comment
The Proposed Two-Stage PC Algorithm

Step 1.1: Re-organize the rule table by grouping.

Step 1.2: Divide each group into sub-group according to protocol type.

Step 2: Construct the PMT with prefix-based fields.

Setp 3: Create the pointers for TCP and/or UDP.

Step 4.1: Define the elementary intervals with range-based fields.

Step 4.2: Construct the RMT according to the elementary intervals.

Step 4.3: Prune the RMT.

Classify packets(prefix-based searching scheme)

Process range-based fields(range-based scheme)

The Proposed Two-Stage PC Algorithm

Step 1.1: Re-organize the rule table by grouping.

PL: a prefix of length L

PL(n): the leading n bits in PL

R in group (Pi(m), Pj(m)): Given a rule R and its prefixes of SA and DA being Pi and Pj. If m = min(i, j) then R in group (Pi(m), Pj(m)).

EX:

R1,R2,R3

R4,R5,R6

R7,R8,R9

Group (0, 0)

R1, R2, R3

SA: Min(0**, 0**, 0**) -> 0 DA:Min(0**, 0**, 0**) -> 0

Group (00, 10)

R4, R5, R6

SA: Min(00*, 00*, 00*) -> 00 DA:Min(100, 10*, 10*) -> 10

Group (1, 0)

R7, R8, R9

SA: Min(1**, 10*, 10*) -> 1 DA:Min(01*, 0**, 0**) -> 0

The Proposed Two-Stage PC Algorithm

Step 1.2: Divide each group into sub-group according to protocol type.

According to the protocol field, partition each group into UDP and TCP sub-goups.

If protocol field = ‘*’ then duplicate the rule into TCP and UDP.

EX: group {R4, R5, R6} =>{R4, R6u}, {R5, R6t}

R1,R2,R3

R4,R5,R6

R7,R8,R9

R1,R2,R3

R4,R6u

R5,R6t

R7,R8,R9

The Proposed Two-Stage PC Algorithm

Step 2: Construct the Prefix-matching-tree(PMT) with prefix-based fields.

The i-th level in the k-bit PMT represents the combination of the i-th bit in the all k prefiexes.EX: group {R4, R5, R6}

SA

DA

SA

DA

1-st level

R4 00* 100

2-st level

R4 00* 100

01

00

R5 00* 10*

R5 00* 10*

R6 00* 10*

R6 00* 10*

10

00

01

00

The Prefix-matching-tree (PMT)

The Proposed Two-Stage PC Algorithm

Setp 3: Create the pointers for TCP and/or UDP.

10

00

01

00

TCP

UDP

TCP, UDP

The Prefix-matching-tree (PMT)

The Proposed Two-Stage PC Algorithm

R7 2, 3, 4, 5

R8 3

R9 3

Step 4.1: Define the elementary intervals with range-based fields.

Project to non-overlapping elementary intervals

Ex:

SP

R7 2, 3, 4, 5

R8 3

R9 3

2, 3, 4-5

DP

R7 1, 2, 3, 4, 5, 6

R8 2, 3, 4, 5

R9 3

1, 2, 3, 4-5, 6

The Proposed Two-Stage PC Algorithm

R7 2, 3, 4, 5

R8 3

R9 3

Step 4.2: Construct the RMT according to the elementary intervals.

The search space is reduced by 1/2k in each step.

Ex: group {R7, R8, R9}

6

4-5

3

2

1

2

3

4-5

The Proposed Two-Stage PC Algorithm

R7 2, 3, 4, 5

R8 3

R9 3

Step 4.2: Construct the RMT according to the elementary intervals.

Ex: group {R7, R8, R9}

2-3,1-3

2-3,4-6

3,3

2,1-2

2,4-5

3,6

2,3

2,6

3,1-2

3,4-5

2,2

2,1

3,1

3,2

6

3,3

2,3

2,3

4-5

3

2

1

2

3

4-5

Comment

Ex: group {R7, R8, R9}

6

R7 2, 3, 4, 5

R8 3

R9 3

4-5

3

2

1

2

3

4-5

Comment

3, 3

R7 2, 3, 4, 5

R8 3

R9 3

Step 1

R7, R8,R9

3, 3

Step 2

R7, R8,R9

3, 2

R7, R8

3, 3

Step 3

R7, R8,R9

3, 4-5

3, 2

R7, R8

R7, R8

Comment

R7 2, 3, 4, 5

R8 3

R9 3

3, 3

0

Step 4

R7, R8,R9

3, 4-5

3, 2

0

1

R7, R8

R7, R8

2, 1-6

0

R7

3, 3

2

Step 5

R7, R8,R9

0

3, 2

3, 4-5

2

R7, R8

R7, R8

2, 1-6

-1

R7

3, 1

0

R7

3, 3

1

R7, R8,R9

3, 1

3, 4-5

0

0

R7, R8

R7

3, 2

2, 1-6

0

0

R7

R7, R8

Comment

Step 6 insert 3,6

R7 2, 3, 4, 5

R8 3

R9 3

3, 3

0

R7, R8,R9

3, 1

3, 4-5

-1

0

R7, R8

R7

3, 6

3, 2

2, 1-6

0

0

0

R7

R7

R7, R8

Step 7 insert 4-5, 1-6

3, 3

0

3, 3

0

R7, R8,R9

3, 1

3, 4-5

-2

R7, R8,R9

0

3, 1

3, 6

R7, R8

0

R7

3, 6

0

-1

3, 2

2, 1-6

0

R7

R7

0

4-5, 1-6

R7

0

R7

3, 2

2, 1-6

R7, R8

3, 4-5

0

R7

R7

R7, R8

4-5, 1-6

0

R7,R8

0

R7

0