Configure DSCP Marking for Executables via Regedit
This guide explains how to configure Differentiated Services Code
Point (DSCP) packet marking for specific application executables using
the Windows Registry Editor (regedit). Implementing DSCP
values allows network equipment, such as managed switches and routers,
to prioritize or classify network traffic generated by critical software
on your Windows system.
Step 1: Enable TCP/IP DSCP Support
Before defining per-application QoS policies, you must ensure the Windows TCP/IP stack allows user-defined DSCP/TOS markings.
Press
Win + R, typeregedit, and press Enter.Navigate to the following path:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\ParametersCheck for a
DWORD (32-bit)value namedDisableUserTOSSetting.- If it does not exist, right-click the
Parametersfolder, select New > DWORD (32-bit) Value, and name itDisableUserTOSSetting.
- If it does not exist, right-click the
Double-click
DisableUserTOSSettingand set its value to0(Base: Hexadecimal or Decimal).
Step 2: Create the QoS Registry Policy
Quality of Service (QoS) rules can be injected directly into the Windows Policy registry structure.
In the Registry Editor, navigate to:
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\WindowsCheck if a key named
QoSexists underWindows. If not, right-click theWindowskey, select New > Key, and name itQoS.Right-click the
QoSkey, select New > Key, and give it a descriptive name for your application (e.g.,MyCustomApp).
Step 3: Configure the Application Traffic Rules
Inside your newly created application subkey (e.g.,
HKEY_LOCAL_MACHINE\SOFTWARE\Policies\Microsoft\Windows\QoS\MyCustomApp),
create the following string values (New > String
Value):
| Value Name | Value Type | Recommended Data | Description |
|---|---|---|---|
Version |
String (REG_SZ) | 1.0 |
Required schema version. |
Application Name |
String (REG_SZ) | appname.exe |
The exact name of your executable. |
DSCP Value |
String (REG_SZ) | 46 |
The decimal DSCP value (e.g.,
46 for Expedited Forwarding). |
Protocol |
String (REG_SZ) | * |
Specify * for all,
TCP, or UDP. |
Local Port |
String (REG_SZ) | * |
Source port (use * for
any). |
Local IP |
String (REG_SZ) | * |
Source IP (use * for
any). |
Local IP Prefix Length |
String (REG_SZ) | * |
Subnet prefix length (use *
for any). |
Remote Port |
String (REG_SZ) | * |
Destination port (use * for
any). |
Remote IP |
String (REG_SZ) | * |
Destination IP (use * for
any). |
Remote IP Prefix Length |
String (REG_SZ) | * |
Destination subnet prefix (use
* for any). |
Step 4: Apply the Changes
Registry-based QoS changes require the network stack or system to refresh before packets are marked:
Close the Registry Editor.
Restart your computer, or restart the target network adapter via PowerShell (Run as Administrator):
Restart-NetAdapter -Name "YourAdapterName"Use a packet analyzer such as Wireshark to verify that outbound IP packets from the specified executable contain your defined DSCP value in the
Differentiated Services Field.