Enabling Remote Work

Improve your End-User Experience with RDP ShortPath for AVD

Table of Contents

In this blog, we are going to look at the process of enabling a new feature of the RDP protocol called RDP Short Path..

Overview

The standard way your clients connect to your session hosts is something called reverse connect which creates a TCP outbound connection to your client through the AVD gateway to keep things secure, as highlighted below in Red arrows...

This is a great solution but since you’re using TCP the connection can result in higher latency
RDP short path, on the other hand, uses the UDP protocol on port 3390 and allows you to connect directly to your session hosts, as highlighted below in Yellow arrows… this greatly reduces latency since UDP is a much more efficient protocol for this kind of traffic but there’s more to RDP short path than just turning on UDP.

RDP short path was only allowed on private connections like over an express route or VPN but as of today all that changes
Now you can use RDP short path over the public internet to achieve lower latency to your AVD environments and i’ll show you step by step how you can test it different options to roll it out  and how to secure it and then how to monitor it which will help you validate if your users are using it

Enable RDP ShortPath for AVD Clients that uses Public Network

The setup here is very easy all you have to do is add one registry key and then you’re all ready to start
REG ADD "HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\WinStations" /v ICEControl /t REG_DWORD /d 2 /f
Or you can just download the registry file from the following link and merge it to your AVD session host

Network Configuration

by default RDP ShortPath works without any additional configuration unless you have firewall restrictions, you have to configure your firewall to allow some ports and IPs over UDP protocol for outbound connection. please follow the below tables to configure set the required rules on the session host network and client network

Session host virtual network

Name
Source
Destination Port
Protocol
Destination
Action
RDP Shortpath Server Endpoint
VM Subnet
1024-65535
UDP
*
Allow
STUN Access
VM Subnet
3478
UDP
Allow

Client network

Name
Source
Destination Port
Protocol
Destination
Action
RDP Shortpath Server Endpoint
Client network
1024-65535
UDP
Public IP addresses assigned to NAT Gateway or Azure Firewall
Allow
STUN Access
Client network
3478
UDP
Allow

Network Security group – Setting

Your VM/SNET Network Security group should look like the below screenshot.

User-Defined Routing for AVD

Also, it’s recommended to configure your session host UDR to be routed directly to the internet, as shown in the below screenshot

Monitor RDP Shortpath Using Log Analytics

You can, go into the Log Analytics console and run the following query
//You can verify if RDP Shortpath is enabled for a specific user session by running the following Log Analytics query:
WVDCheckpoints 
|where Name contains "Shortpath"
On the results where it says “ShortpathRequested” and Parameters says (udpType : ShorthPathPublic)

Testing and validating RDP ShortPath for AVD Clients that uses Public Network

To validate the RDP ShortPath functionality in the connection bar at the top of the AVD session, when you click this icon, you can see you’re using the udp protocol and we’re getting low latency

Troubleshooting RDP Shortpath STUN Connectivity Using PowerShell

If you’re unable to establish the connection using the RDP Shortpath transport, you use the following PowerShell script to validate connectivity to STUN servers
As shown in the below screenshot I’m able to reach one of STUN Server IPs

Mahmoud A. ATALLAH

Microsoft MVP & MCT | Azure Service Delivery Lead with over 12 years of experience in Microsoft solutions and Professional services, Leading the Azure team to help our customers to build successful Azure practices, Blogger, Speaker, and Community leader. Focus on Azure, Cloud Security, Modern Workspace, AVD, Infrastructure as Code, Endpoint Management, Office 365, EMS.

Recent Posts

Secure your Application with Azure Web Application Firewall

Description: Join us for an insightful session on securing your web applications with Azure Web…

7 days ago

Microsoft MVP Summit 2024 Experience: A Journey to Seattle

A few weeks ago, Microsoft MVPs (Most Valuable Professionals) and RDs (Regional Directors) got together…

2 months ago

Web Summit Qatar | AI Copilots: Driving startup success

Description: Join us at Web Summit Qatar for an engaging session on how Azure AI…

3 months ago

My 2023 Highlights: A Year of Growth and Achievements 🌟

As the year 2023 draws to a close, it's the perfect time to reflect on…

5 months ago

Investigate and Respond to Incidents with Microsoft Security Copilot

Introduction Imagine harnessing the power of GPT-powered natural language to seamlessly investigate and respond to…

6 months ago

Introducing Microsoft Applied Skills – Your Fast Track to Verify Tech Proficiency

Introduction: In a dynamic tech landscape, Microsoft continues to pioneer innovative ways to empower individuals…

6 months ago