3.2.4.2.1 Connecting to the Target Server

The ServerName and the optional TransportIdentifier provided by the caller are used to establish the connection. The client SHOULD resolve the ServerName as described in [MS-WPO] section 7.1.4, and SHOULD attempt connections to one or more of the returned addresses. The client can attempt to initiate each such SMB2 connection on all configured transports that it allows<128>, most commonly Direct TCP and the other transports described in section 2.1.

The client can choose to prioritize the addresses and/or transport order and try each one sequentially, or try to connect on them all and select one using any implementation-specific heuristic<129>. The client can accept the TransportIdentifier parameter from the calling application, which specifies what transport to use, and then attempt to use the transport specified.

If IsMutualAuthOverQUICSupported is TRUE and the client initiates a connection to the server over QUIC, the client MUST look up a ClientCertificateMappingEntry with ClientCertificateMappingEntry.ServerName matching ServerName in ClientCertificateMappingTable. If an entry is found, the client MUST send ClientCertificateMappingEntry.Certificate to QUIC.

If the connection attempt is successful, a connection object MUST be created, as specified in section 3.2.1.2, with the following default parameters:

  • Connection.SessionTable MUST be set to an empty table.

  • Connection.OutstandingRequests MUST be set to an empty table.

  • Connection.SequenceWindow MUST be set to a sequence window, as specified in section 3.2.4.1.6, with a single starting sequence number available, which is "0".

  • Connection.GSSNegotiateToken MUST be set to an empty array.

  • Connection.Dialect, if implemented, MUST be set to "Unknown".

  • Connection.RequireSigning MUST be set to FALSE.

  • Connection.ServerName MUST be set to the application-supplied server name.

  • Connection.CompressionIds, if implemented, MUST be set to empty list.

This connection MUST be inserted into ConnectionTable, and processing MUST continue, as specified in section 3.2.4.2.2.

If the connection attempt fails, the client returns the error code to the calling application.