none
[MS-RDPBCGR] mstsc doesn't pick up routing token from redirection packet RRS feed

  • Question

  • Hi!

    I'm implementing a sample software that will redirect RDP connections by issuing routing tokens to clients. When I send redirection packet to client (I'm using client version 7.1) it will parse, disconnect, reconnect to correct address, but won't provide routing token in X224 connection request packet. I know that client parses information from redirection packet right, as it provides username, password and domain that are mentioned in the redirection packet.

    Tuesday, February 14, 2012 1:52 AM

Answers

  • This issue has been resolved. The root cause is that the server redirection packet was including both LB_TARGET_NET_ADDRESS  and LB_LOAD_BALANCE_INFO. In order for the Windows 7 client to send the routingToken, the server needs to set only the LB_LOAD_BALANCE_INFO and also include the LoadBalanceInfo (see references below). The update in Section “2.2.13.1 Server Redirection Packet (RDP_SERVER_REDIRECTION_PACKET)” reflects the correct behavior.

    2.2.13.1 Server Redirection Packet (RDP_SERVER_REDIRECTION_PACKET)

    NOTE: this section has been updated, and the change will appear in a future release of the document.

    LoadBalanceInfoLength (4 bytes):  A 32-bit unsigned integer. The length, in bytes, of the LoadBalanceInfo field.

    LoadBalanceInfo (variable):  A variable-length array of bytes containing load balancing information that MUST be treated as opaque data by the client and passed to the server if the LB_TARGET_NET_ADDRESS (0x00000001) flag is not present in the RedirFlags field and a reconnection takes place. See section 3.2.5.3.1 for details on populating the routingToken field of the X.224 Connection Request PDU (section 2.2.1.1).

    3.2.5.3.1   Sending X.224 Connection Request PDU

    The routingToken field is optional. If the client is in possession of a routing token, it MUST populate the routingToken field. The primary source of a routing token is the LoadBalanceInfo field of the Server Redirection PDU (see section 2.2.13.1). However other methods, such as scriptable APIs or file input, can be used to provide a client with a routing token before a connection to an RDP server is initiated. For more information about the routing token format, see [MSFT-SDLBTS] "Routing Token Format".

    The cookie field is optional and MUST NOT be present if the routingToken field is present.<13> …

    NOTE: This Windows behavior note has been updated, and the change will appear in a future release of the document.

    <13> Section 3.2.5.3.1: Microsoft RDP 5.1, 5.2, 6.0, 6.1, 7.0, 7.1, and 8.0 clients always include the cookie field in the X.224 Connection Request PDU if a nonempty username can be retrieved for the current user and the routingToken field is not present (the IDENTIFIER used in the cookie string is the login name of the user truncated to nine characters).

    Thanks,

    Edgar
    Tuesday, February 21, 2012 8:26 PM
    Moderator

All replies

  • Hi,

    Thank you for your question regarding [MS-RDPBCGR] routing token. Please send a network trace to dochelp<at> microsoft <dot> com. I will investigate and help you on this issue. Refer to this thread when you sent the trace.

    Thanks,

    Edgar

    Tuesday, February 14, 2012 4:46 AM
    Moderator
  • This issue has been resolved. The root cause is that the server redirection packet was including both LB_TARGET_NET_ADDRESS  and LB_LOAD_BALANCE_INFO. In order for the Windows 7 client to send the routingToken, the server needs to set only the LB_LOAD_BALANCE_INFO and also include the LoadBalanceInfo (see references below). The update in Section “2.2.13.1 Server Redirection Packet (RDP_SERVER_REDIRECTION_PACKET)” reflects the correct behavior.

    2.2.13.1 Server Redirection Packet (RDP_SERVER_REDIRECTION_PACKET)

    NOTE: this section has been updated, and the change will appear in a future release of the document.

    LoadBalanceInfoLength (4 bytes):  A 32-bit unsigned integer. The length, in bytes, of the LoadBalanceInfo field.

    LoadBalanceInfo (variable):  A variable-length array of bytes containing load balancing information that MUST be treated as opaque data by the client and passed to the server if the LB_TARGET_NET_ADDRESS (0x00000001) flag is not present in the RedirFlags field and a reconnection takes place. See section 3.2.5.3.1 for details on populating the routingToken field of the X.224 Connection Request PDU (section 2.2.1.1).

    3.2.5.3.1   Sending X.224 Connection Request PDU

    The routingToken field is optional. If the client is in possession of a routing token, it MUST populate the routingToken field. The primary source of a routing token is the LoadBalanceInfo field of the Server Redirection PDU (see section 2.2.13.1). However other methods, such as scriptable APIs or file input, can be used to provide a client with a routing token before a connection to an RDP server is initiated. For more information about the routing token format, see [MSFT-SDLBTS] "Routing Token Format".

    The cookie field is optional and MUST NOT be present if the routingToken field is present.<13> …

    NOTE: This Windows behavior note has been updated, and the change will appear in a future release of the document.

    <13> Section 3.2.5.3.1: Microsoft RDP 5.1, 5.2, 6.0, 6.1, 7.0, 7.1, and 8.0 clients always include the cookie field in the X.224 Connection Request PDU if a nonempty username can be retrieved for the current user and the routingToken field is not present (the IDENTIFIER used in the cookie string is the login name of the user truncated to nine characters).

    Thanks,

    Edgar
    Tuesday, February 21, 2012 8:26 PM
    Moderator