Windows Server 2012: Which version of the SMB protocol (SMB 1.0, SMB 2.0, SMB 2.1 or SMB 3.0) are you using on your File Server?

Windows Server 2012: Which version of the SMB protocol (SMB 1.0, SMB 2.0, SMB 2.1 or SMB 3.0) are you using on your File Server?

  • Comments 5
  • Likes

Note: This blog post is obsolete. Please find the updated version at http://blogs.technet.com/b/josebda/archive/2013/10/02/windows-server-2012-r2-which-version-of-the-smb-protocol-smb-1-0-smb-2-0-smb-2-1-smb-3-0-or-smb-3-02-you-are-using.aspx

 


 

1. Introduction

With the upcoming release of SMB 3.0 as part of Windows 8 and Windows Server 2012, I am frequently asked about how older versions of Windows will behave when connecting to or from these new versions. Upgrading to a new version of SMB is something that happened a few times over the years and we established a process in the protocol itself by which clients and servers negotiate the highest version that both support.

 

2. Versions

There are several different versions of SMB used by Windows operating systems:

  • CIFS – The ancient version of SMB that was part of Microsoft Windows NT 4.0 in 1996. SMB1 supersedes this version.
  • SMB 1.0 (or SMB1) – The version used in Windows 2000, Windows XP, Windows Server 2003 and Windows Server 2003 R2
  • SMB 2.0 (or SMB2) – The version used in Windows Vista (SP1 or later) and Windows Server 2008
  • SMB 2.1 (or SMB2.1) – The version used in Windows 7 and Windows Server 2008 R2
  • SMB 3.0 (or SMB3) – The version used in Windows 8 and Windows Server 2012

Windows NT is no longer supported, so CIFS is definitely out. Windows Server 2003 R2 with a current service pack is under Extended Support until 2015, so SMB1 is still around for a little while. SMB 2.x in Windows Server 2008 and Windows Server 2008 R2 will be around at least until 2018, when Extended Support for those products is scheduled to expire. You can find the most current information on the support lifecycle page for Windows Server. The information is subject to the Microsoft Policy Disclaimer and Change Notice.  You can use the support pages to also find support policy information for Windows XP, Windows Vista and Windows 7.

 

3. Negotiated Versions

Here’s a table to help you understand what version you will end up using, depending on what Windows version is running as the SMB client and what version of Windows is running as the SMB server:

Client / Server OS Windows 8
Windows Server 2012
Windows 7
Windows Server 2008 R2
Windows Vista
Windows Server 2008
Previous versions
of Windows
Windows 8
Windows Server 2012
SMB 3.0 SMB 2.1 SMB 2.0 SMB 1.0
Windows 7
Windows Server 2008 R2
SMB 2.1 SMB 2.1 SMB 2.0 SMB 1.0
Windows Vista
Windows Server 2008
SMB 2.0 SMB 2.0 SMB 2.0 SMB 1.0
Previous versions
of Windows
SMB 1.0 SMB 1.0 SMB 1.0 SMB 1.0

 

 

4. Using PowerShell to check the SMB version

In Windows 8 or Windows Server 2012, there is a new PowerShell cmdlet that can easily tell you what version of SMB the client has negotiated with the File Server. You simply access a remote file server (or create a new mapping to it) and use Get-SmbConnection. Here’s an example:
 

PS C:\> Get-SmbConnection
ServerName   ShareName  UserName            Credential          Dialect   NumOpens
----------   ---------  --------            ----------          -------   --------
FileServer1  IPC$       DomainName\UserN... DomainName.Testi... 3.00      0
FileServer1  FileShare  DomainName\UserN... DomainName.Testi... 3.00      14
DomainCtrl1  netlogon   DomainName\Compu... DomainName.Testi... 2.10      1

 
In the example above, a server called “FileServer1” was able to negotiate up to version 3.0. That means that both the client and the server support the latest version of the SMB protocol. You can also see that another server called “DomainCtrl1” was only able to negotiate up to version 2.1. You can probably guess that it’s a domain controller running Windows Server 2008 R2.

If you just want to find the version of SMB running on your own computer, you can use a loopback share combined with the Get-SmbConnection cmdlet. Here’s an example:
 

PS C:\> dir \\localhost\c$
 
Directory:
\\localhost\c$
 
Mode                LastWriteTime     Length Name
----                -------------     ------ ----
d----         5/19/2012   1:54 AM            PerfLogs
d-r--          6/1/2012  11:58 PM            Program Files
d-r--          6/1/2012  11:58 PM            Program Files (x86)
d-r--         5/24/2012   3:56 PM            Users
d----          6/5/2012   3:00 PM            Windows

PS C:\> Get-SmbConnection -ServerName localhost

ServerName  ShareName  UserName            Credential          Dialect  NumOpens
----------  ---------  --------            ----------          -------  --------
localhost   c$         DomainName\UserN... DomainName.Testi... 3.00     0

 
Please note that you have about 10 seconds after you issue the “dir” command to run the “Get-SmbConnection” cmdlet. The SMB client will tear down the connections if there is no activity between the client and the server. It might help to know that you can use the alias “gsmbc” instead of the full cmdlet name.

 

5. Features and Capabilities

Here’s a very short summary of what changed with each version of SMB:

  • From SMB 1.0 to SMB 2.0 - The first major redesign of SMB
    • Increased file sharing scalability
    • Improved performance
      • Request compounding
      • Asynchronous operations
      • Larger reads/writes
    • More secure and robust
      • Small command set
      • Signing now uses HMAC SHA-256 instead of MD5
      • SMB2 durability
  • From SMB 2.0 to SMB 2.1
    • File leasing improvements
    • Large MTU support
    • BranchCache
  • From SMB 2.1 to SMB 3.0
    • Availability
      • SMB Transparent Failover
      • SMB Witness
      • SMB Multichannel
    • Performance
      • SMB Scale-Out
      • SMB Direct (SMB 3.0 over RDMA)
      • SMB Multichannel
      • Directory Leasing
      • BrachCache V2
    • Backup
      • VSS for Remote File Shares
    • Security
      • SMB Encryption using AES-CCM (Optional)
      • Signing now uses AES-CMAC
    • o Management
      • SMB PowerShell
      • Improved Performance Counters
      • Improved Eventing

You can get additional details on the SMB 2.0 improvements listed above at
http://blogs.technet.com/b/josebda/archive/2008/12/09/smb2-a-complete-redesign-of-the-main-remote-file-protocol-for-windows.aspx

You can get additional details on the SMB 3.0 improvements listed above at
http://blogs.technet.com/b/josebda/archive/2012/05/03/updated-links-on-windows-server-2012-file-server-and-smb-3-0.aspx

   

6. Recommendation

We strongly encourage you to update to the latest version of SMB, which will give you the most scalability, the best performance, the highest availability and the most secure SMB implementation. The motto we used at SDC 2011 for the new version was “Bigger. Faster. Scalier.”

Please note that Windows Server 2012 Hyper-V only supports SMB 3.0 for remote file storage. This is due mainly to the availability features (SMB Transparent Failover, SMB Witness and SMB Multichannel), which did not exist in previous versions of SMB. The additional scalability and performance is also very welcome in this scenario. The Hyper-V Best Practices Analyzer (BPA) will warn you if an older version is detected.

   

7. Conclusion

We’re excited about SMB 3.0, but always concerned about keeping as much backwards compatibility as possible. This release brings several must-have new capabilities and we encourage you to learn more about them. We hope you will be convinced to start planning your upgrades as early as possible.

 


 

Note 1: SMB 2.2

You might have heard of an SMB version 2.2. We actually used that version number in some pre-release versions of Windows 8 and Windows Server 2012 and several events that happened before April 2012. However, we decided to rename SMB 2.2 to SMB 3.0 to better convey the amount of change included in this new release. You can get details about that version number change at http://blogs.technet.com/b/windowsserver/archive/2012/04/19/smb-2-2-is-now-smb-3-0.aspx.

 

Note 2: Protocol Documentation

If you consider yourself an SMB geek and you actually want to understand the SMB NEGOTIATE command in greater detail, you can read the [MS-SMB2-Preview] protocol documentation (which covers SMB 2.0, 2.1 and 3.0), currently available from http://msdn.microsoft.com/en-us/library/ee941641.aspx. In regards to protocol version negotiation, you should pay attention to the following sections of the document:

  • 1.7: Versioning and Capability Negotiation
  • 2.2.3: SMB2 Negotiate Request
  • 2.2.4: SMB2 Negotiate Response

Section 1.7 includes this nice state diagram describing the inner workings of protocol negotiation:

SMB 3.0 Protocol Negotiation

 

Note 3: Third-party implementations

There are several implementations of the SMB protocol from someone other than Microsoft. If you use one of those implementations of SMB, you should ask whoever is providing the implementation which version of SMB they implement for each version of their product.

During the keynote at the SNIA’s Storage Developers Conference in September 2011, two major storage vendors (NetApp and EMC) announced their commitment to implementing SMB 3.0 (back then called SMB 2.2) by the time Windows Server 2012 is generally available. You can view the recording of that keynote at http://www.snia.org/news_events/multimedia/video/events/featured#pfenning_pinkerton_file_protocols (watch the entire keynote and or fast forward to minute 50 to see the partner comments).

Also, a member of the Samba team posted a blog in March 2012 about their work on a Samba implementation of SMB 3.0 (back then called SMB 2.2) at http://blog.obnox.de/samba-team-visits-microsoft-for-smb2-2-interop-event/. Samba runs on several non-Windows operating systems and it’s the default SMB implementation for Linux.

We are hoping for many more implementations and we’ll all be meeting at the next SMB Plugfest in Santa Clara, CA in September 2012.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • Awesome blog posts on SMB 3.0 !!!   Keep it up !!!

  • Strangely enough even within the 10 seconds when I run Get-SmbConnection there is no output. Any known reason?

  • @Boian

    SMB will quickly tear down the connection if not in use. To keep the session in use, you could run an application that keeps an open file on the share or you can you map a drive to the share (using the New-SmbMapping cmdlet or the old NET.EXE tool) to create a stable connection.

  • Dear Jose,

    thank you for the hint. The problem was on the server side though: Get-SmbConnection is "SMB-client-affiliated", that is I can check the different dialects from the client to diverse servers; but not from different clients to one server (from the server's perspective). This is actually sad, since a sysadmin is normally interested in the latter scenario.

    Please correct if I am wrong.

  • @Boian

    Get-SmbConnection is for the client side, listing all servers the client is accessing.

    You can use Get-SmbSession from the server, which lists who is connected.