QoS is a generic term that defines the level or measure of service that is provided for a particular application or network service. For example, consider the various passenger classes on an international air flight. Typically, first class, business class, and economy class exist. The first-class passengers get the highest degree of service (e.g., better food, bigger seats, personalized service) because these passengers pay extra for that service. Similarly, business-class passengers get a higher degree of service than economy-class passengers, but do not enjoy some of the service that first-class passengers enjoy. The business-class passenger pays more than an economy class passenger, but less than a first-class passenger. Taking this example a step further, those passengers on standby might be equated to a best-effort service.
The same concepts apply to data networks. Specific applications and services might be more important for an organization than others. These applications require a higher quality of service (QoS). Referring back to the airline example, certain characteristics of the whole flying experience define the level of service you receive. For example, these characteristics could include quality of food, leg room, in-flight entertainment, and baggage clearance priority. Each passenger class receives a varying level of service for each characteristic, with the overall quality of service being defined by the sum of these service levels.
On data networks, the characteristics of the network that define quality of service are described in Table 9-1.
Now that you understand a little about QoS, it is time to examine how network devices actually implement and apply QoS. The following topics are now discussed:
Three models define how quality of service can be implemented in modern networks today:
Cisco LAN switches implement the DiffServ model, where they inspect or mark QoS information contained within each frame or packet and apply QoS based upon these values.
The DiffServ model requires applications to indicate QoS requirements in every data packet that is sent. This means that applications do not need to explicitly signal QoS requirements to the network before sending data (which is required in the IntServ model). Figure 9-1 demonstrates the DiffServ approach.
Figure 9-1. The DiffServ Model
In Figure 9-1, the following steps occur:
The DiffServ model signals QoS requirements by using the following markers in each packet or frame transmitted:
Type of Service (ToS)
The most common form of QoS marking present in IP networks today is the use of the type of service (ToS) field. Interpreted by routers, the ToS field is a part of the IP header and allows for a QoS marking to be applied on a per-packet basis. Figure 9-2 illustrates the ToS field.
Figure 9-2. The Type of Service Field
Figure 9-2 shows two subfields that exist within the ToS field. The ToS subfield is not used, with the Precedence subfield being the only portion of the ToS field actually used today. The IP Precedence value is simply a 3-bit binary value, which in decimal terms represents a value of 0 through 7. The value indicates the relative priority of the packet, with 0 representing the lowest priority and 7 representing the highest priority. Each priority level is also assigned a name; for example, an IP Precedence value of 6 represents Internetwork Control traffic.
Class of Service (CoS)
Class of service (CoS) refers to the marking of Layer 2 frames to indicate the quality of service requirements of the frame. CoS is required for Layer 2 devices to apply QoS within a Layer 2 network. If we consider Ethernet as the Layer 2 technology, none of the various Ethernet frame types include a CoS field. A CoS field is created on tagged traffic, where the tag is primarily used to identify the VLAN that the tagged frame belongs to. Two major tagging techniques (trunking protocols) are supported by Cisco switches todayIEEE 802.1Q and ISL.
Figure 9-3 illustrates the tag format used for 802.1Q tags.
Figure 9-3. 802.1Q Tag Format
Notice that the tag is contained within the actual Ethernet frame and that a 3-bit 802.1p priority field exists that provides up to 8 CoS values.
Differentiated Services Code Point (DSCP)
The IP Precedence marking mechanism provides up to eight different indications of QofS. Eight levels of QoS is not sufficient for many large networks, causing scalability issues. Recently, the IETF has developed a new standard (see RFC 2474) that defines a Differentiated Services Field (DS Field) that obsoletes the old ToS and Precedence fields, and uses the first six high-order bits (up to 64 levels of QoS) for QoS marking. The value defined in the DS Field is known as the Differentiated Services Code Point (DSCP), and is designed to be backward compatible with older routers that only understand IP precedence. Figure 9-4 illustrates the DiffServ field.
Figure 9-4. The DiffServ Field
In the Diffserv model, each device that can provide QoS is able to provide a per-hop behavior (PHB) for different classes of traffic. The PHB is simply the way in which the queueing and scheduling mechanisms on a forwarding device are implemented for a particular class of traffic. Diffserv-compliant networks support the following PHBs:
In Table 9-2, each class of traffic is allocated a specific amount of bandwidth; for example, class 1 might be allocated 10% of the available bandwidth, whilst class 4 might be allocated 50% of the available bandwidth. Within each class, if the queue that services the class becomes full, packets are discarded according to their drop precedence. For example, packets with a DSCP value of 10, 12 or 14 are assigned to class 1. If the queue that these packets are placed into is full, packets in the class with a high drop precedence (for example, AF13 or DSCP 14) are discarded first, before packets with a medium and low drop precedence.
In previous sections, you have learned about the various QoS models. In the next few sections, you learn how each network device (in this case a LAN switch) implements QoS using the DiffServ model. Figure 9-5 summarizes the steps that occur when data is received by a LAN switch and how the appropriate QoS policy is determined and applied for that data.
Figure 9-5. QoS Process in a Catalyst Switch
As Figure 9-5 shows, certain functions are performed on the ingress port (the port that receives the packet), while other functions are performed at the egress port (the port the sends the packet towards its destination). These functions are discussed in Table 9-3.