MORE INFORMATION
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.
Warning Serious problems might occur if you modify the registry incorrectly by using Registry Editor or by using another method. These problems might require that you reinstall your operating system. Microsoft cannot guarantee that these problems can be solved. Modify the registry at your own risk.
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:
- Start Registry Editor (Regedt32.exe).
- Go to the following key:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\TcpIp\Parameters
- If you are running Windows 2000, follow these steps:
- On the Edit menu, click Add Value.
- In the Value name box, type DisableUserTOSSetting.
- In the Data Type list, click REG_DWORD, and then click OK.
- In the Data box, type a value of 0 (zero), and then click OK.
If you are running Windows XP or Windows Server 2003, follow these steps:- On the Edit menu, point to New, and then click DWORD Value.
- Type DisableUserTOSSetting as the entry name, and then press ENTER.
When you add this entry, the value is set to 0 (zero). Do not change the value.
- Quit Registry Editor, and then restart the computer.
For information about the use and application of the Quality of Service (QoS) Application Programming Interfaces (APIs), which have effectively replaced the IP_ToS option, see MSDN Online and search for QoS.
For more information about traffic prioritization, click the following article numbers to view the articles in the Microsoft Knowledge Base:
222102
Traffic prioritization using IP precedence
222020 Description of 802.1P signaling
For more information about the DisableUserTOSSetting registry entry in Windows Server 2003, visit the following Microsoft Web site: