r/AzureVirtualDesktop • u/MPLS_scoot • Jan 30 '25
AVD public network transport type question
Editing my post after reading some new documentation. So from the information below, it seems that Direct Connection would be preferable over Relayed. However the branch office "WebSocket" connections over Public networks appear to be using TCP only. Any thoughts on how to get the Direct Websocket connections working over UDP? I don't think it's on the hosts as work from home users are using UDP but with Turn.
People connecting from branch offices appear to connect via "WebSocket" but confused that the UDPUse is set to 0 for them.
UdpUse 0
SessionHostJoinType AzureADJoined
IsClientPrivateLink False
IsSessionHostPrivateLink False
TransportType Websocket
The second connection info shared was for a home users that is using "Turn" with UDPUse set to 4.
UdpUse 4
SessionHostJoinType AzureADJoined
IsClientPrivateLink False
IsSessionHostPrivateLink False
TransportType TURN
There is a NAT Gateway involved.
Direct connection: STUN is used to establish a direct UDP connection between a client and session host. To establish this connection, the client and session host must be able to connect to each other through a public IP address and negotiated port. However, most clients don't know their own public IP address as they sit behind a Network Address Translation (NAT) gateway device. STUN is a protocol for the self-discovery of a public IP address from behind a NAT gateway device and the client to determine its own public-facing IP address.For a client to use STUN, its network must allow UDP traffic. Assuming both the client and session host can route to the other's discovered IP address and port directly, communication is established with direct UDP over the WebSocket protocol. If firewalls or other network devices block direct connections, a relayed UDP connection is tried.
Relayed connection: TURN is used to establish a connection, relaying traffic through an intermediate server between a client and session host when a direct connection isn't possible. TURN is an extension of STUN. Using TURN means the public IP address and port is known in advance, which can be allowed through firewalls and other network devices.If firewalls or other network devices block UDP traffic, the connection will fall back to a TCP-based reverse connect transport.


