Article ID: 248611 - View products that this article applies to.
This article was previously published under Q248611
Microsoft Windows 2000, Microsoft Windows XP, and Microsoft Windows Server 2003 do not support the marking of Internet Protocol (IP) Type of Service (ToS) bits with the setsockopt function.
On Windows NT 4.0 and Windows 9x, Winsock applications can set the ToS bits in the IP header for UDP and ICMP packets by calling the setsockopt function with the IP_TOS option. The ping utility on those platforms also allows the ToS bits marking in the ICMP echo packets by using the "-v" option. Please note that the ToS bits marking for TCP packets has never been available to Winsock even although the setsockopt call with the IP_TOS option on TCP sockets returns 0 (SUCCESS).
On Windows 2000, Windows XP, and Windows Server 2003, the ToS bits marking functionality in Winsock applications and the ping utility is disabled by default. The attempt to set the IP_TOS option with the setsockopt function on these versions of Microsoft Windows still returns 0 (SUCCESS) to allow applications to continue to run; but the ToS bits in the IP header is not marked.
This design change is because the former ToS and precedence bits specified in Request For Comment (RFC) 1349 have been made obsolete by RFCs 2474 and 2475. These RFCs replaced ToS with Differentiated Services (DiffServ).
DiffServ Code Point (DSCP) enables packets that pass through network devices operating on layer 3 information, such as routers, to have their relative priorities differentiated from one another. DSCP is established by setting the first six bits of the ToS field in the IP header. DSCP has assumed the function of determining IP precedence, but maintains backward compatibility. With DSCP marking, layer 3 devices can establish aggregated precedence-based queues and provide better service to packets that have a higher relative priority.
This is particularly beneficial when packet services are subject to queuing, as is the case under significant network traffic loads associated with streaming media presentations and other real-time data streams. For DSCP to be effective, layer 3 devices must be DSCP-enabled.
On Windows 2000-based, Windows XP-based, or Windows Server 2003-based host devices, the Generic Quality of Service (GQOS) implementation determines the DSCP marking. A Winsock GQOS program triggers the RSVP service provider to submit policy and resource checks to determine the policy control and the availability of resources along a network data path. If the intended resource usage is approved, the QOS Packet Scheduler service marks the DSCP prioritization in the IP packet headers. The IP_TOS option with the setsockopt function would bypass Windows 2000, Windows XP, or Windows Server 2003 QOS policy control, and thus is disabled by default on these versions of Windows.
Microsoft recommends that you implement GQOS in your Winsock programs to take advantage of the Windows 2000, Windows XP, and Windows Server 2003 GQOS capabilities. However, to allow for behavior similar to Windows NT 4.0 IP_TOS on Windows 2000, Windows XP, or Windows Server 2003 for backward compatibility, a new registry key has been added.
Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems might occur if you modify the registry incorrectly. Therefore, make sure that you follow these steps carefully. For added protection, back up the registry before you modify it. Then, you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click the following article number to view the article in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/322756/ )How to back up and restore the registry in Windows
Follow these steps to enable the IP_TOS option for the Winsock setsockopt function and the -v option for the ping utility on Windows 2000, Windows XP, or Windows Server 2003:
For more information about traffic prioritization, click the following article numbers to view the articles in the Microsoft Knowledge Base:
(http://support.microsoft.com/kb/222102/ )Traffic prioritization using IP precedence
(http://support.microsoft.com/kb/222020/ )Description of 802.1P signaling
233039For more information about the DisableUserTOSSetting registry entry in Windows Server 2003, visit the following Microsoft Web site:
(http://support.microsoft.com/kb/233039/ )QoS queuing techniques
Article ID: 248611 - Last Review: February 28, 2007 - Revision: 3.6
Contact us for more help