Lecture-5 - Packet Classification
Lecture-5 - Packet Classification
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
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
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