0% found this document useful (0 votes)
36 views

Lecture-5 - Packet Classification

This document discusses packet classification and algorithms for efficient classification. It describes how packets are classified based on fields like source IP, destination IP, protocol, and ports. Trie-based algorithms like hierarchical tries and set pruning tries are presented for fast classification of packets based on rules. These tries store rules in a tree structure to allow matching packets to rules in order of priority. The challenges of high-speed classification and scaling the number of rules and fields are also discussed.

Uploaded by

kkameswari11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Lecture-5 - Packet Classification

This document discusses packet classification and algorithms for efficient classification. It describes how packets are classified based on fields like source IP, destination IP, protocol, and ports. Trie-based algorithms like hierarchical tries and set pruning tries are presented for fast classification of packets based on rules. These tries store rules in a tree structure to allow matching packets to rules in order of priority. The challenges of high-speed classification and scaling the number of rules and fields are also discussed.

Uploaded by

kkameswari11
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 21

Packet Classification

Dr. Neminath Hubballi


Department of CSE, IIT Indore

1
IP Service
❑ Best effort packet delivery
❑ Destination IP address is the key
❑ Differentiated service

2
Packet Delivery

10.10.10.1 20.20.20.1

10.10.10.2
20.20.20.2

10.10.10.3 30.20.20.1
3
IPv4 Header

4
Practical QoS Requirements
❑ Admission control
❑ Resource reservation
❑ Per flow queuing
❑ Fair scheduling

5
IP Flows
❑ Flows are specified by rules
❑ Classifier: A collection of rules

6
Classifier Rules for Router-3

S. No SIP DIP Protocol SPort DPort Action

R1 10.10/16 20.20/16 TCP 5000 181 Deny

R2 30.30.30.30 20.20/16 TCP * 80 Forward to


Port III
R3 10.10.10.1 10.10.10.2 UDP * * Forward to
Port II with
Priority
R4 20.20.20.1 20.20.20.1 TCP 1000 25 Drop if Rate
is > 10 Mbps

7
Packet Classification in Action

8
Classifier
❑ C = {R1, R2, ….. RN}
❑ Rj has a predicate Rj[i] (1<= i <= d) on d dimension, Pri(Rj),
Action(Rj)
❑ A packet P has d attributes and match a rule Rj[i] if all d values
match
❑ Packet classification problem- Given a packet P, extract d fields and
find the rule Rk applicable to this packet with highest priority

9
Classifier Rule Conflict

10
Challenge

S. No SIP DIP Protocol S Port D Port Action

R1 10.10/16 20.20/16 TCP [1-10] 181 Deny

R2 30.30.30.30 20.20/16 TCP * 80 Forward to


Port III
R3 10.10.10.1 10.10.10.2 UDP * * Forward to
Port II with
Priority
R4 20.20.20.1 20.20.20.1 TCP [1000-2000] [25-35] Drop if Rate
is > 10 Mbps

11
Packet Classification Requirements
❑ Search speed
❑10 Gbps links -> 32.2 mpps
❑ Storage requirement
❑ Scalability of Classifier – more rules
❑ Scalability of header fields
❑ Update time
❑ Flexibility of specification

12
Trie based Packet Classification Algorithms:
Hierarchical Trie

13
Trie based Packet Classification Algorithms:
Hierarchical Trie

Rule d1 d2
R1 00* 110*
R2 00* 11*
R3 10* 1*
R4 0* 01*
R5 0* 10*
R6 0* 1*
R7 * 00*

14
Trie based Packet Classification Algorithms:
Hierarchical Trie

Rule d1 d2
R1 00* 110*
R2 00* 11*
R3 10* 1*
R4 0* 01*
R5 0* 10*
R6 0* 1*
R7 * 00*

15
Trie based Packet Classification Algorithms:
Hierarchical Trie

Rule d1 d2
R1 00* 00*
R2 10* 0*
R3 10* 10*
R4 11* 11*
R5 * 00*

16
Performance
q Storage: O(d * W)
q Searching: O(W^d) backtracking e.g : d1=00* and d2= 00*

17
Trie based Packet Classification Algorithms:
Set Pruning Trie

18
Trie based Packet Classification Algorithms:
Set Pruning Trie

Rule d1 d2
R1 00* 00*
R2 10* 0*
R3 10* 10*
R4 11* 11*
R5 * 00*

19
Trie based Packet Classification Algorithms:
Set Pruning Trie
Rule d1 d2
R1 00* 110*
R2 00* 11*
R3 10* 1*
R4 0* 01*
R5 0* 10*
R6 0* 1*
R7 * 00* R3
R6

R2
R7 R4 R4 R5 R7

R7
R5 R1
R7 20
Performance
q Storage: O(N^d * d * W)
q Searching: O(W * d) backtracking e.g : d1=00* and d2= 00*

21

You might also like