In RDP, how do static virtual channels differ from dynamic virtual channels, and where does the limit of 31 apply?
answer
- named up front versus opened later
- a cap that applies to one kind
- one static channel hosts the rest
- USB uses a single named channel
basics
~20 sStatic virtual channels are named during connection setup, at most 31, and joined before the session starts. Dynamic ones are opened later inside the static channel DRDYNVC, and the 31 limit does not cover them.
solid answer
~40 sA **static virtual channel** is listed by name in the client's request during the basic settings exchange, confirmed by the server, then joined during the channel connection. MS-RDPBCGR allows at most 31, and a client that asks for more can be sent the error info code `ERRINFO_VCHANNELSTOOMANY`. A **dynamic virtual channel** (MS-RDPEDYC) is created later by the DVC managers on each side, and its messages travel inside the dedicated static channel `DRDYNVC`, or inside a multitransport tunnel when one exists. The 31 cap therefore does not count dynamic channels. USB pass-through (MS-RDPEUSB) uses one dynamic channel named `URBDRC` with a control channel and one channel per device, so the connect-time list is not a full inventory of what a session redirects.
go deeper
Know that static channels are named at connect time and dynamic ones are opened later inside one of them.
Explain request, confirm and join for static channels, the 31 cap, DRDYNVC as the host of dynamic channels, and which redirections use which kind.
Know why a connect-time channel list is an incomplete inventory and where the authoritative answer to what a session may redirect lives.
Treat channel names as plumbing and make the exposure decision at the policy layer, where it can be audited per host.
## Static virtual channels A static virtual channel is fixed when the connection is built. The client lists the channels it wants in the Client Network Data block of the MCS Connect Initial PDU, in the basic settings exchange. Each entry gives a name of up to seven ANSI characters plus option flags, and MS-RDPBCGR caps the list at 31. The server answers in the Connect Response with the channel identifiers it assigned. The channels are then joined in the channel connection phase: after the user channel and the input/output channel, the client sends one MCS Channel Join Request per static channel and the server confirms each. MS-RDPBCGR adds that once joined, the two endpoints do not exchange channel data until the connection sequence has completed. A static channel carries data in chunks, and each channel is an independent stream. The chunk size is governed by the Virtual Channel Capability Set; the default chunk length in the specification is 1600 bytes. Static channels you meet most often are: - `CLIPRDR` for the clipboard (MS-RDPECLIP). - `RDPDR` for drives and the devices announced over it, including printers (MS-RDPEFS, MS-RDPEPC). - `RDPSND` for audio output (MS-RDPEA). - `DRDYNVC`, the channel that hosts the dynamic ones (MS-RDPEDYC). ## Dynamic virtual channels A dynamic virtual channel (DVC) is established over an existing static channel. There is a DVC manager on the server and one on the client; the server manager creates individual channels, which talk to listeners that applications on the client have registered by name. Messages flow symmetrically, so either side can send. Where the DVC messages travel: 1. If no multitransport connection is associated with the RDP connection, inside the static channel named `DRDYNVC`. 2. If one is present, they can be embedded inside `DRDYNVC` or inside a Tunnel Data PDU of the multitransport connection. This is the mechanism for features that appear after the session is up. USB redirection (MS-RDPEUSB) runs over a single named dynamic channel, `URBDRC`, and uses multiple channels within it: one control channel and one for each USB device. Audio output (MS-RDPEA) can use either the static `RDPSND` channel or a dynamic one named `AUDIO_PLAYBACK_DVC` (reliable transport) or `AUDIO_PLAYBACK_LOSSY_DVC` (unreliable UDP transport). ## Why the split exists A static channel must be named before the session starts, so every feature that needs one has to be anticipated at connect time. Dynamic channels let a feature open and close channels during the session: the server manager creates a channel when it is needed and the client manager connects it to a listener that an application on the client registered by name. The price of that flexibility is that the connection request stops being a complete list of what the session uses. ## Side by side | | Static | Dynamic | |---|---|---| | Named | In the client's request at connection time | When the server side creates it, after setup | | Defined in | MS-RDPBCGR 1.3.3 and 2.2.6 | MS-RDPEDYC | | Count limit | 31 at connection time | The 31 cap does not apply to them | | Carried in | The main RDP data connection | Inside `DRDYNVC` or a multitransport tunnel | | Examples | `CLIPRDR`, `RDPDR`, `RDPSND` | `URBDRC`, `AUDIO_PLAYBACK_DVC` | ## What the limit means in practice The cap is a protocol constant, not a setting. MS-RDPBCGR defines the Set Error Info code `ERRINFO_VCHANNELSTOOMANY` (0x000010F0) for a client that requests more than the allowed 31 static channels in its Client Network Data. Other codes next to it have different meanings: `ERRINFO_INVALIDCHANNELID` (0x000010EF) is about an invalid channel identifier in a virtual channel PDU, and `ERRINFO_INVALIDVCCOMPRESSIONTYPE` (0x000010ED) is about an invalid bulk compression type. ## What this means for a review - The static channel list in the connect request is a good but incomplete picture. A session that shows `RDPDR` and `CLIPRDR` may also open a USB channel later, so an inventory built only from the connect-time list will miss dynamic channels. - Policy, not channel count, is what limits what a session may redirect. The host settings that narrow the clipboard and drives are covered separately. - When you read a specification, identify the transport first. MS-RDPEA is defined over three transports (static, dynamic, and a UDP port), while MS-RDPECLIP is defined over a static channel and MS-RDPEUSB only over a dynamic one. ## Common mistakes - Saying the 31 limit covers all virtual channels, dynamic included. - Treating a dynamic channel as a separate connection; it rides the existing one. - Calling the channel name a setting that can be raised by an administrator. - Assuming every redirection is a static channel: USB is not.
- Where do dynamic channel messages travel when the connection has a multitransport tunnel?MS-RDPEDYC says the DVC messages can be embedded inside the dedicated DRDYNVC static channel or inside a Tunnel Data PDU of the multitransport connection. Without a multitransport connection they are always encapsulated in DRDYNVC. The tunnel option is about transport, not about what the channel carries.
- Why can a connect-time channel list fail to show that a session redirects USB devices?USB redirection uses a dynamic channel, URBDRC, which the server opens after the session is established, inside DRDYNVC. Only DRDYNVC itself would appear in the static list. An inventory of redirection exposure therefore has to come from the host's configuration, not only from the connection request.
- Says the 31 limit counts dynamic channels too
- Thinks a dynamic channel is a second connection to another port
- Believes administrators can raise the static channel limit
- Assumes every redirection, including USB, is a static channel
- Thinks channels are joined before the basic settings exchange