Packet Classification
Packet classification allows a
network device (such as a router, a switch, or even an accelerator) to partition
network traffic into multiple priority levels or classes of service based on a
variety of match conditions. These match conditions help the network device to
differentiate flows from one another based on packet, flow, or application
characteristics. With regard to the QoS behavioral model, as packets enter a
device, they undergo classification such that the device is able to discern what
application the flow represents and how to appropriately handle that traffic.
This serves as the foundation by which a device can provide differentiated
service among equal or unequal flows.
Most
network devices provide an array of match conditions that can be used to examine
traffic for purposes of classification. The most common classifiers include the
following:
-
Access
control lists (ACL): ACLs (standard, extended, or
otherwise) allow for explicit permission or denial of a packet to be matched
based on the match conditions defined within the ACLs as parameters. These match
conditions include IP protocol number, routing protocol parameters, ICMP, IGMP,
source or destination IP address, source or destination TCP or UDP port
assignment, and more. Some of these characteristics can be used as match
conditions without the use of an ACL. These match conditions are the most
frequently used, as they cover nearly the entire set of Layer 3 and Layer 4
parameters used by a packet or flow.
-
MAC address: The link layer addresses contained in the frame being
examined by the network device can be used as a match condition for
classification.
-
VLAN identifier: The VLAN ID of a tagged frame can be used as a match
condition to identify which VLAN a packet was received on. This allows for
differentiated handling of packets and flows based on VLAN.
-
Input interface: The interface that the packet was received from on the
network device itself can be used as a match condition. This allows for
differentiated handling of packets and flows based on the physical interface
being used.
-
Previous DSCP/ToS settings: Previously marked differentiated services code point
(DSCP) bits within the type of service (ToS) field can be used for packet
classification for packets received by the network device.
-
Class of service: The class of service (CoS) bits previously marked
within a link layer header can be used as a means of classification.
-
Packet length: The length of the packet received can be used as a
classifier. For instance, it may be desirable to classify small packets and
large packets to adjust the way the network device handles packets based on
their size.
-
NBAR:
NBAR is used not only for protocol discovery and to identify which applications
are found on the network, but also to provide classification for those
applications. NBAR, when used for classification, can provide standard Layer 4
classification (based on port identification) or Layer 7 classification (by
examining the payload of a packet).