200 likes | 1.01k Views
Packet Classification Packet Classification, D.-C. Fleury & D. Francis, 2002-03-14. This document was prepared by Denis-Claude Fleury & Dany Francis in partial fulfillment of the requirements for the course ELG/CEG4183. Presentation Summary What is Packet Classification
E N D
Packet Classification Packet Classification, D.-C. Fleury & D. Francis, 2002-03-14. This document was prepared by Denis-Claude Fleury & Dany Francis in partial fulfillment of the requirements for the course ELG/CEG4183.
Presentation Summary • What is Packet Classification • Application fields of Packet Classification • Background and problem definition • Classification Example • Algorithm of Packet Classification
What is Packet Classification? Packet Classification is: • The function of identifying and categorizing packets of data moving across the network. [1] • It allows network equipment to recognize the application and determine the Quality of Service (QoS) required.
Application fields of Packet Classification Packet classification is important for applications such as: • Those that require security features such as Firewalls; • Intrusion detection; • Internet Telephony; • Audio over IP and video over IP; • Differentiated services.
Background and problem definition Background: Internet: Mesh of Routers [2]
Background and problem definition (Cont’d) Background: • Flow-aware router: keeps track of flows and perform similar processing on packets in a flow • Flow-unaware router (packet-by-packet router): treats each incoming packet individually
Background and problem definition (Cont’d) Background: Motivation of Packet Classification is the need for Differentiated Services [3]
Background and problem definition (Cont’d) Problem Definition [4]: Given a classifier C with N rules, Rj, 1 j N, where Rj consists of three entities: • A regular expression Rj[i], 1 i d, on each of the d header fields, • A number, pri(Rj), indicating the priority of the rule in the classifier, and • An action, referred to as action(Rj).
Background and problem definition (Cont’d) HEADER Forwarding Engine Action Packet Classification Classifier (policy database) Predicate Action ---- ---- ---- ---- Incoming Packet ---- ----
Classification Example Direction of transmission of packet L4-SP L4-DP L4-PROT L3-SA L3-DA L3-PROT L2-SA L2-DA PAYLOAD Transport layer header Network layer header MAC header DA = Destination Address SA = Source Address PROT = Protocol SP = Source port DP = Destination port L2 = layer 2 (e.g., Ethernet) L3 = layer 3 (e.g., IP) L4 = layer 4 (e.g., TCP)
Algorithm of Packet Classification Performance metrics for classification algorithms [5] • Search speed - Faster links require faster classification. • Low storage requirements - Small storage requirements enable the use of fast memory technologies like SRAM (Static Random Access Memory). • Ability to handle large real-life classifiers
Algorithm of Packet Classification (Cont ’d) • Fast updates - As the classifier changes, the data structure needs to be updated. We can categorize data structures into those which can add or delete entries incrementally, and those which need to be reconstructed from scratch each time the classifier changes. • Scalability in the number of header fields used for classification • Flexibility in specification - A classification algorithm should support general rules, including prefixes, operators (range, less than, greater than, equal to, etc.) and wildcards.
Algorithm of Packet Classification (Cont ’d) Classification algorithms [6] One possible Algorithm: Use binary tree paths to encode prefixes. E.g. 001xx 2 01000x 3 10xxx 1 01100 5 Here using IP addressing rules: 128.16.120.xxx 1 12.82.xxx.xxx 3 12.82.100.xxx 2
Algorithm of Packet Classification (Cont ’d) Packet with destination address 12.82.100.101 is sent to interface 2, as 12.82.100.xxx is the longest prefix matching packet's destination address: 12.82.100.101 2 • Advantage: simple to implement • Disadvantage: one lookup may take O(m), where m is number of bits (32 in the case of IPv4)
References List • [1] Pankaj Gupta and Nick McKeown. Packet Classification on Multiple Fields. http://www.acm.org/sigcomm/sigcomm99/papers/session4-3.html. • [2] Seungune Lee. Overview of Router & Switch Architecture. http://monet.skku.ac.kr/research/data/Router.pdf. January 11th, 2001 • [3] Pankaj Gupta and Nick McKeown. Dynamic Algorithms with Worst-case Performance for Packet Classification. http://klamath.stanford.edu/~pankaj/talks/ifip00.slides.ppt • [4] Florin Babeoscu and George Varghese. Scalable Packet Classification. http://www.acm.org/sigcomm/sigcomm2001/p16-baboescu.pdf. • [5] Pankaj Gupta and Nick McKeown. Algorithms for Packet. http://tiny-tera.stanford.edu/~nickm/papers/classification_tutorial_01.pdf. • [6] T.V. Lakshman and D. Stiliadis. Packet classification algorithms for gigabit internet routers. Technical Report 113470-980202-02T, Lucent Technologies - Bell Laboratories, January 1998.