Windows 2003 QoS and ISA

Posted by: Joel Larkin

Tagged in: technology , microsoft

Recently I got the question of QoS at work.  There were a few questions that were asked surrounding it, most specifically the following:

  1. How does the QoS Engine Work?
  2. How does this compare to a Hardware based solution such as Cisco?
  3. Does this impact scalability?
I was unable to answer the questions off the cuff so I did some research.

I specifically wanted to know:

  1. How does the QoS Engine Work?
  2. How does this compare to a Hardware based solution such as Cisco?
  3. Does this impact scalability?
I was unable to answer the questions off the cuff so I did some research. 

QoS stands for Quality of Service, its specifically used in environments where bandwidth, latency, jitter, and data-loss must be controlled for mission critical applications.  These applications can be anything but most often its a voice, multimedia, or teleconferencing application.  There are a few RFC's that are relevant available here: http://www.rfc-editor.org/:
All the network elements along the path must support QoS.  If a network device along this path does not support QoS, the traffic flow recieves the standard first-come, first-servered treatment on that network segment. 

Windows 2003 IP Stack Architecture
Diagram 1 - IP Stack in Windows 2003

Windows QOS Detail
The following has been copied, almost verbatim, from Microsoft's QoS architecture description available from Technet or this link How QoS Works.  Some information has been removed, modified, or added.

Windows Server 2003 QoS Architecture

Traffic control (see diagram 1) in Windows Server 2003 consists of the following components:  Traffic Control (TC) API, Generic Packet Classifier (GPC), and the QoS Packet Scheduler. 

TC API
Traffic control uses standardized QoS parameters to segment packets into sequences and to regulate the sequences.  The TC API (traffic.dll) applies the QoS parameters to the appropriate packets.  Developers and Network Admins use the TC API to specificy the traffic that is to recieve preferential treatment, the traffic that is to be treated alike, and the QoS parameters that define the preferential treatment.  The traffic control uses the following specifications to define traffic:
  • A flowspec, which is the list of QoS parameters such as service type and token rate (the permitted transmission rate of packets) that applies to a sequence of packets.
  • A flow, which is a sequence of packets that is subject to a flowspec.  All of the packets in a flow recieve the same treatment.
  • A filterspec, which is a list of attributes, including source IP addresses, destination IP addresses, and port numbers that classifies packets into a single flow.
Using the filterspec and flowspec, traffic control filters packets into the appropriate flow and applies the appropriate QoS parameters to the flow.  QoS aware devices use the filterspec to determine how to handle packets.

Generic Packet Classifier
The Generic Packet Classifier (Msgpc.sys) classifies packets generated by an application so that the packets can subsequently be prioritized for sending across the network.

When an application or traffic management program invokes QoS, the Generic Packet Classifier on the sending host determines the service type (defined by the flowspec) to which each individual packet belongs and maps each packet to a queue (flow) based on the service type.  After packets are assigned to a queue, the QoS packet scheduler can manage the queue in accordance with the parameters specified int he flowspec.

QoS Packet Scheduler
The QoS Packet Scheduler (Psched.sys) is a kernel-level component that marks and schedules packets that the GPC has assigned into queues.  The QoS packet scheduler enforces QoS parameters for a given flow to achieve traffic shaping.

The QoS Packet scheduler retrieves packets from the queues and marks them with a priority and rate of flow.  The rate of flow is used to pace the tramission of packets to the network, thus mitigating the "send it all right now" nature of IP transmissions.  The priority is used to determine the order in which packets are submitted to the networkd uring periods of congestion, thus spreading bursts of traffic over time and creating a more uniform traffic flow.

Using the priority and rate of flow, the QoS Packet scheduler determines the delivery schedule for each queue and negotiates competition between any queud packets that simultaneously request access to the network.

To ensure preferential treatment throughout the network, packets must be marked so the network devices along the path can detect the priority and handle the packets appropriately.  Packets are marked with an 802.1p priority for prioritization by Layer 2 devices and witha  Diffserv Priority for Prioritization by Layer 2 devices.  The QoS packet scheduler provides 802.1p marking.  TCP/IP provides diffserv marking.

The QoS Packet Scheduler is not automatically installed with Windows Server 2003, you must install this component on any host you want to perform traffic marking of shaping on.  To use the QoS Packet Scheduler for 802.1p (layer2) markings, the network adapter must support 802.1p.  Select the option from advanced properties of the network adapter you wish to enable 802.1p support for.

QoS Protocols
Windows Server 2003 supports both 802.1p (Layer 2) and Diffserv (Layer 3) priority markings.  Network devices that support these protocols use the markings to provide end-to-end preferential treatment.

802.1p
The IEEE 802.1p signaling standard defines traffic priortization at Layer 2 of the OSI model.  Layer 2 network devices, such as switches, that ahdere to this standard can group incomming packets into seperate traffic classes.

The 802.1p priority marking for a packet are appended to the MAC header.  In W2k3 the QoS Packet Scheduler performs the 802.1p marking.

On Ethernet networks, 802.1p priority markings are carried in the VLAN tages.  The IEEE 802.1q standard defines VLANs and VLAN tags.  This standard specifies a 3-bit field for priority in the VLAN tag, but does not define the values for the field.  The 802.1p standard defines the values for the priority field.  The standard defines 8 priority clases (0-7). 
  • 000 (0) - Routine
  • 001 (1) - Priority
  • 010 (2) - Immediate
  • 011 (3) - Flash
  • 100 (4) - Flash Override
  • 101 (5) - Critical
  • 110 (6) - Internetwork Control
  • 111 (7) - Network Control
The VLAN tag is placed inside the Ethernet header, between the source address and either the Length Field (for an IEEE 802.3 frame) or the EtherType field (for an Ethernet II frame) in the MAC header.  The 802.1p marking determines the service level that a packet recieves when it crosses an 802.1p enabled network segment.

The Layer 2 priority values are defined by Group Policy.  Windows 2003 provides a default priority value for each service type on the host.  Sophisticated switches might direct hosts or routers to use different mappings.  The QoS packet scheduler in Windows 2003 uses the priority values listed below:
  • 000 (0) - Best Effort or Non-Conforming Packets
  • 100 (4) - Controlled Load
  • 101 (5) - Guaranteed Service
  • 111 (7) - Network Control
These default values can be modified by applying a computer configuration group policy setting for the host at administrative templets / Network / QoS Packet Scheduler / Layer-2 Priority Value.  These group policy settings create a corresponding registry subjey and values at HKLM\Software\Policies\Microsoft\Windows\PSched\UserPriorityMapping

Implementing 802.1p marking on a host requires the following:
  • The network adapter and device driver must support 802.1p
  • The option to enable 802.1p support is selected
  • The service types are defined within Group Policy
  • For a customized priority value, the default priority value has been changed with a group policy setting.
Differential Services
DiffServ (Differential Services) is a protocol that defines traffic prioritization at Layer 3 of the OSI model.  Layer 3 network devices, such as routers, that support this protocol use Diffserv markings to identify the forwarding treatment, or per-hop behavior (PHB), that marked traffic is to recieve.  Diffserv markings for a packet are placed in the IP header.  In Windows Server 2003, TCP/IP performs Diffserv markings.

RFC 2475 defines the architecture for Diffserv.  RFC 2474 also defines the bits in the Diffserv feld.  The Type of Service (ToS) field in IPv4 headers and the Traffic Class field in IPv6 headers are redefined for Diffserv Values.  The RFC redefines the IPv4 ToS octet as 6 bits for Diffserv value, also known as Diffserv code point or DSCP, followed by 2 unused bits. 

The first 3 bits of the TOS field were formely used for IP precedence, which indicated the importance of a packet.  DSCP values are backward-compatible with IP precedence values, which means that legacy routers that support only IP prcedence can interpret DSCP values.
DSCP Diagram

More information is available from the following link:  Quality of Service

As with Layer 2 prioritization, DSCP values are defined by Group Policy.  Windows Server 2003 provides a default SCP value for each service type as illustrated below:
  • Best Effort (0)
  • Controlled Load (24)
  • Guaranteed (40)
  • Network Control (48)
These defaults can be modified by applying a Computer Configuration Group Policy setting for the host at Administrative Templates / Network / QoS Packet Scheduler /.  The DSCP value of conforming packets subcategory supports settings for packets that conform to the flowspec. These GPO settings create corresponding registry subkeys at HKLM\Software\Policies\Microsoft\Windows\Psched\DiffservByteMappingConforming. The DSCP value of non-conforming packets subcategory supports settings for packets that do not conform to the flowspec. These Group Policy settings create corresponding registry subkeys and values at:  HKLM\Software\Policies\Microsoft\Windows\Psched\DiffservByteMappingNonConforming.

Diffserv differs from 802.1p prioritization in that Layer 3 devices can aggregate flows.  Routers, therefor, need to distinguish comparitively small number of aggregated flows instead of the thousands or millions of individual flows that compose them, and can provide better service to the packets that have higher priority.

ISA and QoS
Packet prioritization is a global Hypertext Transfer Protocol (HTTP) policy setting. It applies to all browser traffic that passes through ISA Server, rather than to traffic handled by a specific rule. The packet prioritization functionality is provided by the DiffServ Web filter, which scans the URL or domain and assigns the packet priority using DiffServ bits. You can create priorities in ISA Server whose DiffServ bits match those of the priorities on your corporate routers, thereby enabling the corporate routers to transmit the packets according to their priority.

This filter has a high priority, and is high in the ordered list of Web filters. This is because this filter has to be aware of the size of the request or response that is actually being sent, and therefore has to inspect the data at the point that it is sent or received by ISA Server.

ISA Server does not add DiffServ bits to traffic on protocols other than HTTP or Secure HTTP (HTTPS). ISA Server may not transmit existing DiffServ bits for traffic on other protocols. (That information may be removed from the packets.)

After you enable DiffServ, you configure the URLs and domains that will be subject to prioritization. You can configure packet prioritization for specific URLs or domains. When ISA Server forwards requests for URLs or domains to a router that supports QoS, it also forwards the DiffServ value that you specify for the priority assigned to the specific URL or domain.

Further Reading:
A Detailed QoS Explanation
http://www.rhyshaden.com/qos.htm

QoS and Windows 2003
http://technet2.microsoft.com/windowsserver/en/library/2464f7e3-f420-4702-a1a9-55c03f913cd61033.mspx?mfr=true

Diffserv Information in ISA 2006
http://www.microsoft.com/technet/isa/2006/diffserv.mspx

RFC Database
http://www.rfc-editor.org/

Windows 2003 TCP/IP Implementation Details
http://technet2.microsoft.com/windowsserver/en/library/823ca085-8b46-4870-a83e-8032637a87c81033.mspx?mfr=true
Comments (1)Add Comment
0
respond this topic
written by BeasleyBessie, July 16, 2010
I will recommend not to hold off until you get enough cash to order all you need! You should just get the loan or just short term loan and feel fine

Write comment

busy