Hello Vaibhav Patil,
Greetings! Welcome to Microsoft Q&A Platform.
Based on your error I would recommend testing and confirm Test-NetConnection succeeded in reaching port 445. The SMB protocol requires TCP port 445 to be open; connections will fail if port 445 is blocked. You can check if your firewall is blocking port 445 with the Test-NetConnection cmdlet. To learn about ways to work around a blocked 445 port, see the Cause 1: Port 445 is blocked section of our Windows troubleshooting guide.
To check if your firewall or ISP is blocking port 445, use the AzFileDiagnostics tool or Test-NetConnection cmdlet. SMB has always been a network file sharing protocol. As such, SMB requires network ports on a computer or server to enable communication to other systems. SMB uses either IP Port 445. 445 is an important port because it is used by default for all SMB communication. Windows uses it for various functions since SMB serves as the network protocol at the application level.
Also check if the SMB is enabled for your Windows 11 (on prem) machine - https://video2.skills-academy.com/en-us/windows-server/storage/file-server/troubleshoot/detect-enable-and-disable-smbv1-v2-v3?tabs=server
Azure Files exposes the following settings:
SMB versions: Which versions of SMB are allowed. Supported protocol versions are SMB 3.1.1, SMB 3.0, and SMB 2.1. By default, all SMB versions are allowed, although SMB 2.1 is disallowed if "require secure transit" is enabled, since SMB 2.1 does not support encryption in transit.
Authentication methods: Which SMB authentication methods are allowed. Supported authentication methods are NTLMv2 and Kerberos. By default, all authentication methods are allowed. Removing NTLMv2 disallows using the storage account key to mount the Azure file share.
Kerberos ticket encryption: Which encryption algorithms are allowed. Supported encryption algorithms are RC4-HMAC and AES-256.
SMB channel encryption: Which SMB channel encryption algorithms are allowed. Supported encryption algorithms are AES-256-GCM, AES-128-GCM, and AES-128-CCM.
Additional information: You can mount the file share on your local machine by using the SMB 3.1.1 protocol, or you can use tools like Storage Explorer to access files in your file share. From your application, you can use storage client libraries, REST APIs, PowerShell, or Azure CLI to access your files in the Azure file share.
The latest version of the Server Message Block (SMB) protocol is SMB 3.1.1. It offers improved performance, security features, and support for transparent failover. If you’re encountering issues with mounting your Azure file share, ensure that your local PC and Azure storage account both support SMB 3.1.1. Additionally, follow the troubleshooting steps mentioned earlier to address any connectivity or configuration issues. refer - https://video2.skills-academy.com/en-us/troubleshoot/azure/azure-storage/files/connectivity/files-troubleshoot-smb-connectivity?tabs=windows, https://video2.skills-academy.com/en-us/azure/storage/files/storage-how-to-use-files-windows
From your application, you can use storage client libraries, REST APIs, PowerShell, or Azure CLI to access your files in the Azure file share.
Hope this answer helps! Please let us know if you have any further queries. I’m happy to assist you further.
Please "Accept the answer” and “up-vote” wherever the information provided helps you, this can be beneficial to other community members.