image image image image image

On This Page

System Requirements

Operating Systems: Windows Server 2012, Windows Server 2012 R2 and Windows Server 2016.

QoS Configuration

Prior to configuring Quality of Service, you must install Data Center Bridging using one of the following methods:

To Disable Flow Control Configuration

Device manager → Network adapters → Mellanox ConnectX-3 Ethernet Adapter → Properties→ Advanced tab

To Install the Data Center Bridging using the Server Manager

  1. Open the 'Server Manager'.
  2. Select 'Add Roles and Features'.
  3. Click Next.
  4. Select 'Features' on the left panel.
  5. Check the 'Data Center Bridging' checkbox.
  6. Click 'Install'.

To Install the Data Center Bridging using PowerShell

Enable Data Center Bridging (DCB).

PS $ Install-WindowsFeature Data-Center-Bridging

To Configure QoS on the Host

The procedure below is not saved after you reboot your system. Hence, we recommend you create a script using the steps below and run it on the startup of the local machine. Please see the procedure below on how to add the script to the local machine startup scripts.


  1. Change the Windows PowerShell execution policy. To change the execution policy, please refer to Step 1 in PowerShell Configuration.

  2. Remove the entire previous QoS configuration.

    PS $ Remove-NetQosTrafficClass
    PS $ Remove-NetQosPolicy -Confirm:$False
  3. Set the DCBX Willing parameter to false as Mellanox drivers do not support this feature.

    PS $ set-NetQosDcbxSetting -Willing 0
  4. Create a Quality of Service (QoS) policy and tag each type of traffic with the relevant priority. In this example, TCP/UDP use priority 1, SMB over TCP use priority 3.

    PS $ New-NetQosPolicy "DEFAULT" -store Activestore -Default -PriorityValue8021Action 3
    PS $ New-NetQosPolicy "TCP" -store Activestore -IPProtocolMatchCondition TCP -Priority-Value8021Action 1
    PS $ New-NetQosPolicy "UDP" -store Activestore -IPProtocolMatchCondition UDP -Priority-Value8021Action 1
    New-NetQosPolicy “SMB” –SMB –PriorityValue8021Action 3
  5. Create a QoS policy for SMB over SMB Direct traffic on Network Direct port 445.

    PS $ New-NetQosPolicy "SMBDirect" -store Activestore -NetDirectPortMatchCondition 445 -PriorityValue8021Action 3
  6. [Optional] If VLANs are used, mark the egress traffic with the relevant VlanID. The NIC is referred as "Ethernet 4” in the examples below.

    PS $ Set-NetAdapterAdvancedProperty -Name "Ethernet 4" -RegistryKeyword "VlanID" -RegistryValue "55"
  7. [Optional] Configure the IP address for the NIC. If DHCP is used, the IP address will be assigned automatically.

    PS $ Set-NetIPInterface -InterfaceAlias “Ethernet 4” -DHCP Disabled
    PS $ Remove-NetIPAddress -InterfaceAlias “Ethernet 4” -AddressFamily IPv4 -Confirm:$false
    PS $ New-NetIPAddress -InterfaceAlias “Ethernet 4” -IPAddress 192.168.1.10 -Prefix-Length 24 -Type Unicast
  8. Set the DNS server (assuming its IP address is 192.168.1.2).

    PS $ Set-DnsClientServerAddress -InterfaceAlias “Ethernet 4” -ServerAddresses 192.168.1.2

    After establishing the priorities of ND/NDK traffic, the priorities must have PFC enabled on them.

  9. Disable Priority Flow Control (PFC) for all other priorities except for 3.

    PS $ Disable-NetQosFlowControl 0,1,2,4,5,6,7
  10. Enable QoS on the relevant interface.

    PS $ Enable-NetAdapterQos -InterfaceAlias "Ethernet 4"
  11. Enable PFC on priority 3.

    PS $ Enable-NetQosFlowControl -Priority 3
    PS $ New-NetQosPolicy -name "SMB class" -Priority 3
  12. Configure Priority 3 to use ETS.

    PS $ New-NetQosTrafficClass -name "SMB class" -priority 3 -bandwidthPercentage 50 -Algorithm ETS

To Add the Script to the Local Machine Startup Scripts

  1. From the PowerShell invoke.
  2. In the pop-up window, under the 'Computer Configuration' section, perform the following:
    1. Select Windows Settings
    2. Select Scripts (Startup/Shutdown)
    3. Double click Startup to open the Startup Properties
    4. Move to “PowerShell Scripts” tab
    5. Click Add. 
      The script should include only the following commands:

      PS $ Remove-NetQosTrafficClass
      PS $ Remove-NetQosPolicy -Confirm:$False
      PS $ set-NetQosDcbxSetting -Willing 0
      PS $ New-NetQosPolicy "SMB" -Policystore Activestore -NetDirectPortMatchCondition 445 -PriorityValue8021Action 3
      PS $ New-NetQosPolicy "DEFAULT" -Policystore Activestore -Default -PriorityValue8021Action 3
      PS $ New-NetQosPolicy "TCP" -Policystore Activestore -IPProtocolMatchCondition TCP -PriorityValue8021Action 1
      PS $ New-NetQosPolicy "UDP" -Policystore Activestore -IPProtocolMatchCondition UDP -PriorityValue8021Action 1
      PS $ Disable-NetQosFlowControl 0,1,2,4,5,6,7
      PS $ Enable-NetAdapterQos -InterfaceAlias "port1"
      PS $ Enable-NetAdapterQos -InterfaceAlias "port2"
      PS $ Enable-NetQosFlowControl -Priority 3
      PS $ New-NetQosTrafficClass -name "SMB class" -priority 3 -bandwidthPercentage 50 -Algorithm ETS
    6. Browse for the script's location.
    7. Click OK
    8. To confirm the settings applied after boot run:

      PS $ get-netqospolicy -policystore activestore

Enhanced Transmission Selection

Enhanced Transmission Selection (ETS) provides a common management framework for assignment of bandwidth to frame priorities as described in the IEEE 802.1Qaz specification: 
http://www.ieee802.org/1/files/public/docs2008/az-wadekar-ets-proposal-0608-v1.01.pdf


For further details on configuring ETS on Windows™ Server, please refer to: 
http://technet.microsoft.com/en-us/library/hh967440.aspx