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:
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.
- 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:
ID článku: 248611 - Poslední kontrola: 15. 3. 2008 - Revize: 1