03 May, 2021 #Citrix

Multistream ICA

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 NameDescriptionPriority Stream Assignment
CTXCAMAudio00
CTXEUEMEnd User Experience Monitoring11
CTXCTLICA Control11
CTXIMEInput Method Editor11
CTXLICLicense Management11
CTXMTOPMicrosoft Teams / WebRTC Redirection11
CTXMOBMobile Receiver11
CTXMTCHMultiTouch11
CTXTWISeamless (Transparent Window Integration)11
CTXSENSSensor and Location11
CTXSCRDSmart Card11
CTXTWThinwire Graphics11
CTXDND**Drag & Drop11
CTXNSAP**App Flow22
CTXCSBBrowser Content Redirection22
CTXCDMClient Drive Mapping22
CTXCLIPClipboard22
CTXFILEFile Transfer (HTML5)22
CTXFLS2*Flash v222
CTXFLSH*Flash22
CTXGDT**Generic Data Transfer22
CTXPFWDPort Forwarding22
CTXMMRemote Audio and Video Extensions (RAVE)22
CTXTUITransparent UI Integration / UI Status22
CTXTWNTWAIN Redirection22
CTXGUSBUSB22
CTXZLC**Zero Latency Data Channel22
CTXZLFK**Zero Latency Font and Keyboard22
CTXCCMClient COM Port Mapping33
CTXCPMClient Printer Mapping33
CTXCOM1Legacy Client Printer Mapping (COM1)33
CTXCOM2Legacy Client Printer Mapping (COM2)33
CTXLPT1Legacy Client Printer Mapping (LPT1)33
CTXLPT2Legacy Client Printer Mapping (LPT2)33
* 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.


Happy configuring!

Interesting articles regarding ICA Multistream:
CTX128190.
https://www.basvankaam.com/inside-citrix-chapter-nineteen-the-one-with-the-ica-hdx-protocol/
https://docs.citrix.com/en-us/citrix-virtual-apps-desktops/policies/reference/ica-policy-settings/multistream-connections-policy-settings.html

0 Comments on Multistream ICA

Leave a Comment

Your email address will not be published. Required fields are marked *

You Might Be Interested In