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

Andreas Schneider asn at samba.org
Thu Jul 27 16:30:47 UTC 2017


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
www.samba.org



More information about the cifs-protocol mailing list