[cifs-protocol] SR# 117072516091337 :SMB2 ECHO request

Jeff McCashland jeffm at microsoft.com
Thu Jul 27 19:25:51 UTC 2017


Hi Andreas,

Normally, this type of information would go into the processing rules for the Client (Section 3.2). However, the gist of what I explained below is that SMB2 doesn't have any rules for the client to process the ECHO command. The client is free to use and process ECHO as needed, as long as the structure in section 2.2 is met. 

We could add something like:

2.2.1.1	SMB2 Packet Header - ASYNC
SessionId (8 bytes): Uniquely identifies the established session for the command. This field MUST be set to 0 for an SMB2 NEGOTIATE Request (section 2.2.3) and for an SMB2 NEGOTIATE Response (section 2.2.4). SessionId MAY be set to 0 for an SMB2 ECHO Request (section 2.2.28) and for an SMB2 ECHO Response (section 2.2.29).

2.2.1.2	SMB2 Packet Header - SYNC
SessionId (8 bytes): Uniquely identifies the established session for the command. This field MUST be set to 0 for an SMB2 NEGOTIATE Request (section 2.2.3) and for an SMB2 NEGOTIATE Response (section 2.2.4). SessionId MAY be set to 0 for an SMB2 ECHO Request (section 2.2.28) and for an SMB2 ECHO Response (section 2.2.29).

Would that be helpful? I welcome any suggestions you have of where/how we can improve the documentation in this area.

Best regards,
Jeff McCashland | Senior Escalation Engineer | Microsoft Protocol Open Specifications Team 
Phone: +1 (425) 703-8300 x38300 | Hours: 9am-5pm | Time zone: (UTC-08:00) Pacific Time (US and Canada)
Local country phone number found here: http://support.microsoft.com/globalenglish | Extension 1138300
We value your feedback.  My manager is Rama Ganesan (ramagane), +1 (425) 703-8712

-----Original Message-----
From: Andreas Schneider [mailto:asn at samba.org] 
Sent: Thursday, July 27, 2017 9:31 AM
To: Jeff McCashland <jeffm at microsoft.com>
Cc: cifs-protocol <cifs-protocol at lists.samba.org>; MSSolve Case Email <casemail at microsoft.com>
Subject: Re: SR# 117072516091337 :SMB2 ECHO request

On Wednesday, 26 July 2017 23:26:14 CEST Jeff McCashland wrote:
> Hi Andreas,

Hi Jeff,

> You are correct, Windows and SMB2 allow SessionId to be 0 for ECHO, 
> but do not require it. It is necessary to establish a Session, but the 
> ID does not need to be passed with the ECHO request. Non-zero 
> MessageId is also needed, but neither a Tree Connection nor TID are necessary for ECHO.
> 
> Client behavior in regards to ECHO is implementation-specific (there 
> is no mention in section 3.2). ECHO is merely a keep-alive ping to see 
> if the server is responsive, so any response could be considered 
> success. All the Server does (besides disconnecting the connection if 
> Connection.SessionTable is empty) is validate the structure of the request.
> If the server returns STATUS_INVALID_PARAMETER, this indicates the 
> Client formed the request incorrectly, but shows the Server is 
> responsive (as does any response, error or success).
> 
> SMB1 had a lot of ECHO processing, where all known servers were 
> regularly pinged, then the connection was disconnected if a server 
> didn't respond in a timely manner. SMB2 has significantly simplified 
> and reduced ECHO processing. Windows client doesn't initiate an ECHO 
> (as far as I've been able to find), and only checks the response for 
> valid structure, otherwise, receiving any response is considered 
> success. However, other clients may behave differently.
> 
> SMB2 Client also has a Request Expiration timer (3.2.2.1 - optional) 
> and Idle Connection Timer (3.2.2.2) which appear to serve the purpose 
> previously filled by ECHO.

Thank you very much for the clarification and your help! This answers my question.
Could you please update the docs accordingly?


All the best!


	Andreas

-- 
Andreas Schneider                   GPG-ID: CC014E3D
Samba Team                             asn at samba.org
https://na01.safelinks.protection.outlook.com/?url=www.samba.org&data=02%7C01%7Cjeffm%40microsoft.com%7C6c9f4519755148fb674508d4d50cd838%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C636367698528739917&sdata=WUZ1YcRUzCQzArHbovt3%2BgHj%2Ftbab7FFQhRXvCEMkRg%3D&reserved=0



More information about the cifs-protocol mailing list