Enable Windows Server SMB 2.0 or 3.0 Alias (CNAME)
If you have an existing Windows 2008 R2 or Windows 2012 R2 file server and would like to add an alternate name or alias for file share access, an SMB alias needs to be created.
Example: Your existing server is named: server1 and has a fully qualified domain name of server1.mydomain.local. You would like to be able to access file shares on the server as: \\server1 as well as \\fileserver.
In previous version of Windows 2000 and 2003, a registry setting was all that was required in order to enable SMB aliasing, see Microsoft KB281308, but this only works with SMB 1.0 and not SMB 2.0. Computers that run Windows Server 2008, Windows Server 2008 R2, Windows Vista, and Windows 7 support both SMB 1.0 and SMB 2.0. Windows includes an SMB client component (Client for Microsoft Windows) and an SMB server component (File and Printer Sharing for Microsoft Windows). By default, SMB 2.0 is the file sharing protocol that is used when both client and server support it. For more information on SMB 2.0 click here.
To add a SMB alias in Windows 2008 R2 which supports SMB 2.0, do as follows:
1. Add a CNAME record in your DNS pointing at the primary server name, e.g. fileserver.mydomain.local CNAME server1.mydomain.local.
2. Open the Registry Editor (regedit) on the server and browse to: HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\LanmanServer\Parameters
3. Add a new REG_DWORD 32bit entry using the edit menu.
Value name: DisableStrictNameChecking
Data type : REG_DWORD
Radix : Decimal
Value : 1
4. Exit the registry editor then reboot your server.
5. Once the server reboots you need to add a Service Principal Name (SPN) as follows:
a. Open the command prompt.
b. Type: setspn -a host/fileserver server 1 (where ‘server1’ is the primary name of your server and ‘fileserver’ is the alternate name)
b. Type: setspn -a host/fileserver.mydomain.local server1 (where fileserver.mydomain.local is the fully qualified domain name alias and server1 is the primary name of your server)
Example:
setspn -a host/<NEW_CNAME_Server> <NetBIOS_Name_Server>
setspn -a host/<NEW_CNAME_FQDN_Server> <NetBIOS_Name_Server>
Your new SMB 2.0 alias should now be configured. Browse to \\your-new-alias to confirm.
Updated 2014/03/30 – These instructions have been confirmed to work with Windows Server 2012 R2 with SMB 3.
Great post,
I’m still not able to open with alias, do I have to do something more?
Thank you,
donAL