In the previous discussion on QoS the Per-Hop Behaviors DiffServ uses to mark packets were identified. These where listed as:
- Expedited Forwarding (EF) – RFC 3246 – Provides a strict priority service
- Assured Forwarding (AF) – RFC 2597 – Provides a qualified delivery guarantee, and provides for over-subscription, markdown and dropping schemes for excess traffic
- Class Selectors (CS) – RFC 2474 – Provides code points that can be used for backward compatibility with IP Precedence models
- Best-Effort – Provides delivery when possible
Layer 3 packets are marked with IP Precedence or Differentiated Services Code Points (DSCP) in the Type-Of-Service (TOS) byte that is in the IP Header. In order to understand QoS we must take a look at the TOS byte and understand what the eight bits are doing within this byte.
IP Precedence – RFC 1812
IP Precedence (IPP) is viewed by many as a legacy technology, but must still be observed for backwards compatibility.
The second byte in an IPv4 packet is the TOS byte. The first 3 bits are referred to as the IP Precedence bits. The IP Precedence bit only allows for eight values (0-7), generally 6 and 7 are reserved for network control traffic such as routing protocols. The value of 0 is normally reserved for default behavior, leaving only 5 values for traffic other than best effort behavior.
- IPP Value of 5 is recommended for voice
- IPP Value of 4 is recommended for interactive and streaming video
- IPP Value of 3 is recommended for call control and signaling
The IPP value of 1 and 2 are remaining markings for all data applications. This is commonly found to be too restrictive resulting in a move to the more scalable 6 bit 64 value Differentiated Services Code Point (DSCP).
The IPP bits are mainly used to classify packets at the edge of the network into one of the eight possible categories. Packets of lower precedence (lower values) can be dropped in favor of higher precedence when there is congestion on the network.
Differentiated Services Code Point (DSCP) – RFC 2474
DSCP uses the same three bits as IP Precedence uses as well as the next three bits for a total of six bits. Six bits provides for a range of 64 different DSCP values. These values can be expressed in numeric form or by keyword names, called per-hop behaviors (PHB). A collection of packets that has the same DSCP value in the TOS byte, and crossing in a particular direction is called a Behavior Aggregate (BA).
A PHB refers to the packet scheduling, queuing, policing, or shaping behavior of a node on any given packet belonging to a BA. The four standard PHBs are available to construct a DiffServ enabled network and achieve end-to-end QoS. The four PHBs are:
- Best Effort (BE) or DSCP 0, also known as default
- Assured Forwarding (AFxy) – 12 AF PHBs exist
- Expedited Forwarding (EF) – EF PHB has a DSCP value of 46, for time sensitive traffic such as voice
- Class-Selector (CSx) which have been designed to be backward compatible with IP Precedence
Assured Forwarding (AF) – RFC 2597
AF defines a method by which packets can be given different forwarding assurances. Traffic can be divided into different classes and then each class given a certain percentage of bandwidth. For example, one class could have 50% of the available link bandwidth; one class could have 30% and another 20% of the bandwidth.
Assured forwarding is denoted by the letters AF and then two digits. The first digit denotes the AF class and can range from 1–4. These first 3 bits of the AF correspond to IPP. The second digit refers to the level of drop probability within the AF class.
Something interesting to note about AF is the first 3 bits are the same for the three drop probabilities for each group. Also notice that a Class 1 AF would correspond to an IPP of 1, and a Class 2 AF would correspond to an IPP of 2 and so on.
- Class 1 AF PHB = 001
- Class 2 AF PHB = 010
- Class 3 AF PHB = 011
- Class 4 AF PHB = 100
The second digit, or the drop probability, functions in the following way during periods of congestion: the higher the number, the more likely the packet is to be dropped. For example, packets assigned AF13 will be dropped before packets in the AF12 class. This method will penalize flows with a BA that exceeds the assigned bandwidth. Packets of these flows could also be marked again by a policer to a higher drop precedence.
As you can see in the chart above, there are four main classes of data traffic, plus the default of Best-Effort.
Best effort traffic should be marked with DSCP 0. Adequate bandwidth should be assigned to the Best-Effort class as a whole because the majority of applications default to this class. It is recommended to reserve at least 25% for best effort traffic. In most networks there are hundreds, if not thousands, of applications that assign their IP packets to a default of DSCP 0. Consequently, adequate bandwidth needs to be provisioned to allow for the sheer volume of packets that will be placed in the default class. Examples of best-effort data applications:
- Noncritical traffic
- HTTP web traffic
Bulk Data are applications that are non-interactive and not drop sensitive. These are applications such as FTP, e-mail, back up operations, database synchronization and replication. These applications perform their tasks in the background. Bulk Data should have a moderate bandwidth guarantee but should be constrained from dominating a link.
Bulk Data should be marked as AF11, and excess bulk data can be marked down by a policer to AF12 or AF13. Examples of bulk data AF1 applications:
- Database synchronization
- Lotus Notes
- Microsoft Outlook
- POP 3
Transactional Data/Interactive Data
Transactional Data are client/server applications where the user normally waits for the transaction to happen in the foreground before proceeding on with the next action – as with database entry. This kind of client/server operation is different from applications such as e-mail where the processing of the email happens in the background and the user normally does not notice delays. Transactional data should have adequate bandwidth guarantee for interactive foreground operations that are supported.
Transactional data should be marked as AF21, and excess data can be marked down by a policer to AF22 or AF23. Examples of interactive AF2 applications
- Yahoo Instant Messenger
- Oracle Thin Client
Examples of transactional AF2 applications
- Microsoft SQL
- Oracle Database
Mission-Critical data is a locally defined class of traffic that is a non-technical, business critical class of transactional data. The majority of employees within the enterprise believe their traffic should receive premium class of service from the network. This issue can often become a politically charged debate over which traffic should be assigned to the premium class of traffic. It is recommended that as few applications as possible are assigned to this class of traffic. Mission Critical data should have adequate bandwidth guarantee for the interactive, foreground operations that it supports.
Mission Critical data should be placed in AF31, and excess data can be marked down by a policer to AF32 or AF33. As a note of interest, Cisco IP Telephony equipment (i.e. IP Phones) marked all call signaling traffic as AF31. With Communications Manager 4.0 and higher the call signaling has been marked at CS3.
Expedited Forwarding – RFC 2598
EF PHB provides a low-loss, low-latency, low-jitter, and assured bandwidth service. Applications such as VoIP, Video, and other time sensitive applications require a robust network treatment like EF. EF can be implemented using priority queuing, along with rate limiting for these time sensitive packets. EF should only be used for only the most critical applications. If congestion exists it is possible to treat too much traffic as EF and oversubscribe the queues anyway.
Class Selector – RFC 2474
Class Selector (CS) is used to provide for backward compatibility with IP Precedence. Just like IPP CS has 0s in the 4th, 5th and 6th bits of the TOS byte. For example, if you are sending packets to a router that only understands IPP markings you could send CS marked packets of 101000. This value is 40 in DSCP values but is interpreted as IPP 5 in the router that only understands IPP.
Subsequent posts in this series will look at the tool for implementing QoS and the command lines to build QoS on Cisco routers.
- End-To-End QoS network Design by Tim Szigeti and Christina Hattingh
- DiffServ – The Scalable End-To-End QoS Model
- Integrated Services Architecture
- Definition of the Differentiated Services Field
- An Architecture for Differentiated Services
- Requirements for IP Version 4 Routers
- An Expedited Forwarding PHB (Per-Hop Behavior)
Author: Paul Stryer