SMB Protocol: Sessions, Shares and File Operations
Server Message Block (SMB) provides network file and service operations. A session moves through negotiation, authentication, share connection and file requests.
Updated · Editorial approach and simulation limits
Negotiate a dialect before using a share
An SMB client and server first negotiate a protocol dialect and capabilities. The negotiated version and security features determine which later messages are available. A TCP connection to a file server is only the transport path; the SMB session still needs to be established.
A trace can show a negotiate request and response, followed by session setup. If negotiation fails, the client and server may not share a compatible dialect or required feature. If it succeeds, authentication and share authorization can still fail independently.
Session setup and tree connect
Session Setup establishes an authenticated SMB session using the mechanism configured for the environment. Tree Connect then attaches the session to a share or other resource. A user can authenticate successfully and still lack permission to access a particular share or path.
After a tree connection, SMB messages can create, read, write, rename or close files. Correlate each operation with its message ID, session ID, tree ID and server status. A successful TCP acknowledgment does not mean a file write was accepted by the SMB server.
Signing, encryption and real-world inspection
SMB dialects and policy can support message signing and encryption. Which protections are active depends on the negotiated dialect and configuration. A network capture can expose endpoints and timing while concealing file operations when SMB encryption is enabled.
Use Microsoft’s Open Specifications and the server’s audit logs for authoritative behavior. Protocol Explorer simplifies the exchange and does not open a share, read a file or test credentials.
Explore SMB interactively
Follow the matching exchange packet by packet. The animation is a scripted teaching model with illustrative timing, not a capture of your network.
Specification and source
For exact protocol requirements, consult the primary document: Microsoft Open Specifications: SMB2 Protocol. This page summarizes selected behavior and is not a substitute for the specification.
Related protocol lessons
Browse all application protocols · Trace an application request beyond the transport connection