Traffic classification is an automated process which categorises computer network traffic according to various parameters into a number of traffic classes. Each resulting traffic class can be treated differently in order to differentiate the service implied for the data generator or consumer.
Typical uses
Packets are classified to be differently processed by the network scheduler. Upon classifying a traffic flow using a particular protocol, a predetermined policy can be applied to it and other flows to either guarantee a certain quality or to provide best-effort delivery. This may be applied at the ingress point with a granularity that allows traffic management mechanisms to separate traffic into individual flows and queue, police and shape them differently.
Classification methods
Classification is achieved by various means.
Port numbers
Fast
Low resource-consuming
Supported by many network devices
Does not implement the application-layer payload, so it does not compromise the users' privacy
Useful only for the applications and services, which use fixed port numbers
Signatures must be kept up to date, as the applications change very frequently
Encryption makes in many cases this method impossible
Matching bit patterns of data to those of known protocols is a simple, yet widely used technique. An example to match the BitTorrent protocolhandshaking phase would be a check to see if a packet began with character 19 which was then followed by the 19-byte string 'BitTorrent protocol'. A comprehensive comparison of various network traffic classifiers, which depend on Deep Packet Inspection, is shown in the Independent Comparison of Popular DPI Tools for Traffic Classification.
Statistical classification
Relies on statistical analysis of attributes such as byte frequencies, packet sizes and packet inter-arrival times.
Operators often distinguish three broad types of network traffic: Sensitive, Best-Effort, and Undesired.
Sensitive traffic
Sensitive traffic is traffic the operator has an expectation to deliver on time. This includes VoIP, online gaming, video conferencing, and web browsing. Traffic management schemes are typically tailored in such a way that the quality of service of these selected uses is guaranteed, or at least prioritized over other classes of traffic. This can be accomplished by the absence of shaping for this traffic class, or by prioritizing sensitive traffic above other classes.
Best-effort traffic
Best effort traffic is all other kinds of non-detrimental traffic. This is traffic that the ISP deems isn't sensitive to Quality of Service metrics. A typical example would be peer-to-peer and email applications. Traffic management schemes are generally tailored so best-effort traffic gets what is left after sensitive traffic.
Undesired traffic
This category is generally limited to the delivery of spam and traffic created by worms, botnets, and other malicious attacks. In some networks, this definition can include such traffic as non-local VoIP or video streaming services to protect the market for the 'in-house' services of the same type. In these cases, traffic classification mechanisms identify this traffic, allowing the network operator to either block this traffic entirely, or severely hamper its operation.
Peer-to-peer file sharing applications are often designed to use any and all available bandwidth which impacts QoS-sensitive applications that use comparatively small amounts of bandwidth. P2P programs can also suffer from download strategy inefficiencies, namely downloading files from any available peer, regardless of link cost. The applications use ICMP and regular HTTP traffic to discover servers and download directories of available files. In 2002, Sandvine Incorporated determined, through traffic analysis, that P2P traffic accounted for up to 60% of traffic on most networks. This shows, in contrast to previous studies and forecasts, that P2P has become mainstream. P2P protocols can and are often designed so that the resulting packets are harder to identify, and with enough robustness that they do not depend on specific QoS properties in the network. The encrypted BitTorrent protocol does for example rely on obfuscation and randomized packet sizes in order to avoid identification. File sharing traffic can be appropriately classified as Best-Effort traffic. At peak times when sensitive traffic is at its height, download speeds will decrease. However, since P2P downloads are often background activities, it affects the subscriber experience little, so long as the download speeds increase to their full potential when all other subscribers hang up their VoIP phones. Exceptions are real-time P2P VoIP and P2P video streaming services who need permanent QoS and use excessive overhead and parity traffic to enforce this as far as possible. Some P2P applications can be configured to act as self-limiting sources, serving as a traffic shaper configured to the user's traffic specification. Some vendors advocate managing clients rather than specific protocols, particularly for ISPs. By managing per-client, if the client chooses to use their fair share of the bandwidth running P2P applications, they can do so, but if their application is abusive, they only clog their own bandwidth and cannot affect the bandwidth used by other customers.