4.1 Establishing a Connection

The following message exchanges show the steps taken by a system that is establishing a connection to a peer.

  1. The initiator (for example, an SMB2 client) sends a Negotiate message, indicating that it is capable of the 1.0 version of the protocol, can send and receive up to 1 KiB of data per Send operation, and can reassemble fragmented Sends up to 128 KiB.

    • The Negotiate request message fields are set to the following:

      • MinVersion: 0x0100

      • MaxVersion: 0x0100

      • Reserved: 0x0000

      • CreditsRequested: 0x000A (10)

      • PreferredSendSize: 0x00000400 (1 KiB)

      • MaxReceiveSize: 0x00000400 (1 KiB)

      • MaxFragmentedSize: 0x00020000 (128 KiB)

  2. The peer receives the Negotiate request and selects version 1.0 as the version for the connection. The negotiate response indicates that the peer can receive up to 1 KiB of data per Send operation, and requests that the requestor permit the same. The negotiate response also grants an initial batch of 10 Send Credits and requests 10 Send Credits to be used for future messages.

    • The Negotiate response message fields are set to the following:

      • MinVersion: 0x0100

      • MaxVersion: 0x0100

      • NegotiatedVersion: 0x0100

      • Reserved: 0x0000

      • CreditsRequested: 0x000A (10)

      • CreditsGranted: 0x000A (10)

      • Status: 0x00000000

      • MaxReadWriteSize: 0x00100000 (1MiB)

      • PreferredSendSize: 0x00000400 (1KiB)

      • MaxReceiveSize: 0x00000400 (1KiB)

      • MaxFragmentedSize: 0x00020000 (128KiB)

  3. The peer sends the first data transfer, typically an upper-layer SMB2 Negotiate Request.  The message grants an initial credit limit of 10, and requests 10 credits to begin sending normal traffic.

    • The Data Transfer message fields are set to the following:

      • CreditsRequested: 0x000A (10)

      • CreditsGranted: 0x000A (10)

      • Flags: 0x0000

      • Reserved: 0x0000

      • RemainingDataLength: 0x000000 (nonfragmented message)

      • DataOffset: 0x00000018 (24)

      • DataLength: 0x00000xxx (length of Buffer)

      • Padding: 0x00000000 (4 bytes of 0x00)

      • Buffer: (Upper layer message)

An SMB2 RDMA Transport Version 1.0 Protocol connection has now been established, and the initial message is processed.