Multistream ICA

Door: Mick Hilhorst

ICA

Citrix utilizes the ICA(/HDX) protocol to transfer data from the VDA (virtual delivery agent) to the client computer. This protocol handles multiple types of data. Your keyboard/mouse and audio input/output for example get transferred within this protocol.

We call these separate elements ‘Virtual Channels’.

By default, all this data gets transferred over the same port. This means there is no way to optimize the data flow as it’s all encapsulated within the same packages. Luckily, there is a solution for that.

Multi-stream and Multi-Port ICA

It’s important to understand the difference between multi-stream and multi-port ICA.

Multi-Stream ICA is separated in 4 streams (0, 1, 2, 3).
These streams all have their own virtual channels bound to them.
For an updated list of these channels you can consult the following article from Citrix. I will post the copied graph below.

Multi-Port ICA allows you to assign a different port to every of the 4 streams (0, 1, 2, 3) so that these ports might get QoS tagging.

Quality of Service (QoS) is a mechanism to prioritize network traffic based on tagging. The way this works is by defining priorities to certain packages on your network devices. This can be done on a protocol and port level.

Virtual Channel Name Description Priority Stream Assignment
CTXCAM Audio 0 0
CTXEUEM End User Experience Monitoring 1 1
CTXCTL ICA Control 1 1
CTXIME Input Method Editor 1 1
CTXLIC License Management 1 1
CTXMTOP Microsoft Teams / WebRTC Redirection 1 1
CTXMOB Mobile Receiver 1 1
CTXMTCH MultiTouch 1 1
CTXTWI Seamless (Transparent Window Integration) 1 1
CTXSENS Sensor and Location 1 1
CTXSCRD Smart Card 1 1
CTXTW Thinwire Graphics 1 1
CTXDND** Drag & Drop 1 1
CTXNSAP** App Flow 2 2
CTXCSB Browser Content Redirection 2 2
CTXCDM Client Drive Mapping 2 2
CTXCLIP Clipboard 2 2
CTXFILE File Transfer (HTML5) 2 2
CTXFLS2* Flash v2 2 2
CTXFLSH* Flash 2 2
CTXGDT** Generic Data Transfer 2 2
CTXPFWD Port Forwarding 2 2
CTXMM Remote Audio and Video Extensions (RAVE) 2 2
CTXTUI Transparent UI Integration / UI Status 2 2
CTXTWN TWAIN Redirection 2 2
CTXGUSB USB 2 2
CTXZLC** Zero Latency Data Channel 2 2
CTXZLFK** Zero Latency Font and Keyboard 2 2
CTXCCM Client COM Port Mapping 3 3
CTXCPM Client Printer Mapping 3 3
CTXCOM1 Legacy Client Printer Mapping (COM1) 3 3
CTXCOM2 Legacy Client Printer Mapping (COM2) 3 3
CTXLPT1 Legacy Client Printer Mapping (LPT1) 3 3
CTXLPT2 Legacy Client Printer Mapping (LPT2) 3 3

* Virtual channel not available in CVAD 1912 LTSR and later
** Virtual channel not available in XAXD 7.15 LTSR

For reference, the following are the numerical priorities and their meaning:
Very High = 0
High = 1
Medium = 2
Low = 3

Enabling Multi-Stream ICA

If you use Citrix SD-WAN for QoS in your network, you need to configure the following policies to enable Multi-Stream ICA:

  1. Multi-Stream computer setting: Enabled
  2. Multi-Stream user setting: Enabled

In any other scenario, you need to configure the following Citrix Policies:

  1. Session reliability connections: Allowed
  2. Multi-Stream computer setting: Enabled
  3. Multi-Stream user setting: Enabled
  4. Multi-Port Policy: ports must be defined for each of the ICA streams

Do not forget to configure the QoS on your network devices!

Configuring Multi-Stream ICA

The stream that virtual channels are assigned to can be changed if required.
I will provide some of Citrix’s own text from article CTX131001. Please mind that the text shown below is a copy and might be outdated at the time you are reading this. Be sure to check Citrix’s own documentation as it is updated regularly.

If you are using VDA 2003+, or VDA 1912 LTSR CU1+, this is done using the policy setting “Multi-Stream virtual channel stream assignment”, which is available in Studio with Citrix Cloud as well as the VDAs’ corresponding on-prem Delivery Controllers.

If using older versions of XAXD/CVAD, this must be done in the VDAs’ registry by modifying the “VirtualChannels” value under the “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\icawd\MultiStreamIca” key. The format for this value is “vcName,stream#;”, where “vcName” is the name of the virtual channel, and “stream#” is the number of the stream the virtual channel is assigned to.

Please note that the “VirtualChannels” value will not work with VDA 2003+ nor VDA 1912 LTSR CU1+.

To change the stream assignment, change the stream number in the Virtual Channel Stream Pair for the appropriate virtual channel(s). Please note that the virtual channel names must contain seven characters. In the case that a virtual channel name is less than seven characters, spaces are added. Do not remove these spaces.
The default data in the “VirtualChannels” value is:
“CTXCAM ,0;CTXTW  ,1;CTXTWI ,1;CTXLIC ,1;CTXVFM ,1;CTXPN  ,1;CTXSBR ,1;CTXSCRD,1;CTXCTL ,1;CTXEUEM,1;CTXMM  2;CTXFLSH,2;CTXGUSB,2;CTXCLIP,2;CTXCDM ,2;CTXCCM ,3;CTXCM  ,3;CTXLPT1,3;CTXLPT2,3;CTXCOM1,3;CTXCOM2,3;CTXCPM ,3;OEMOEM ,3;OEMOEM2,3”

Also under the “HKLM\SYSTEM\CurrentControlSet\Control\Terminal Server\Wds\icawd\MultiStreamIca” key is a value named “Streams”, which applies to all versions of XAXD/CVAD. This value defines which of the four streams is the primary one and which are secondary. The format for this value is “stream#,streamType;”, where “stream#” starts with 0 and increments by 1, and streamType is either ‘P’ for primary or ‘S’ for secondary. Please note that there can only be one primary stream. The default data for this value is “0,S;1,P;2,S;3,S;”.

Note: Changes to the registry values mentioned in this article do not require a reboot to take effect. However, changes to the “Multi-Port Policy” setting do require a reboot.
Information on how to change the virtual channel priorities within the ICA stream can be found in CTX128190.