Table of contents
SMB or in other words Server Message Block is a protocol developed by IBM for sharing files, printers, serial ports, mail slots, named pipes, and network computer APIs that works at the 6th and 7th level of the OSI model. SMB can be used over the network protocols of the TCP/IP stack, as well as over a number of other network protocols. In other words, it is designed to perform file and printer sharing, user authorization, and messaging functions. In addition, SMB requires the establishment and maintenance of a connection, but it can also work in a datagram mode.
The first version of the SMB protocol was developed by IBM, Microsoft, Intel, and 3Com in the 1980s, the second (SMB 2.0) was created by Microsoft and appeared in Windows Vista. Currently, SMB is mainly associated with Microsoft Windows operating systems, where it is used to implement the Microsoft Windows Network and the File and Printer Sharing. In each new version of the protocol, various kinds of improvements were added, aimed at increasing speed, security, and support for new functions. But at the same time, support for old protocols remained for compatibility.
Windows SMB protocol works as a client-server application, i.e. when the client sends a request, the server responds to it. Part of the SMB protocol section is designed to access the file system, for example, when a user makes a request to a file server to receive a file. The other part focuses on the use of interprocess communication Inter-process communication (IPC).
In parallel with Microsoft, the protocol was created and updated in its open implementation Samba. In 1992, Samba appeared - a free implementation of the SMB protocol for UNIX-like operating systems. Since Microsoft did not publish the SMB specifications and its add-ons, Samba creator Andrew Tridgell had to reverse engineer the protocol based on packet analysis. The promotion of the SMB protocol was provided by Microsoft, including its support in its products. In a Microsoft Windows network environment, SMB was the main application layer protocol for working with LAN resources.
We all know that SMB is a network file-sharing protocol, thus, it requires network ports on a computer or server to allow communication with other systems. So what are SMB port numbers? Well, the protocol initially worked on top of NetBIOS using UDP ports 137, 138, and TCP 137, 139. With the release of Windows 2000, it began to work directly using TCP port 445. SMB is also used to enter and work in the Active Directory domain.
Although the main goal is SMB file sharing, the protocol provides other features as well. Basically, these are implementations of the protocol itself, which make it so universal, namely
The SMB protocol represents four types of services:
In the first versions SMB protocol there was no authentication - that is, any user could use any resources, which, of course, limited the scope to small local networks. Modern versions of SMB protocols support two levels of access:
The Common Internet File System (CIFS) file protocol owes its origin to the Server Message Block (SMB) technology, which first appeared in MS-DOS 3.3. The SMB standard describes a protocol for sending file system commands (open a file, read, write, block and close) from the client to the file server. Before delving into the technical details of CIFS and SMB technologies, it is necessary to find out the main differences between them. Initially, there was only SMB technology, which was used as a client-server file protocol in the world of personal computers. In the mid-1980s, Microsoft gave its implementation of the SMB protocol the name CIFS and began to position CIFS as a direct competitor to WebNFS and NFS standards.
So in other words, Microsoft changed the name of the SMB protocol to CIFS and at the same time added a number of new features, including support for symbolic and hard links, as well as large files. CIFS also supports access to the server via secure TCP port 445 in addition to standard port 139. No less important than Microsoft's own SMB extensions were other CIFS extensions. In particular, a number of features, known as UNIX extensions (UNIX extensions), provide support for file owners and permissions along with other types of UNIX metadata. If both the clients and the server support these extensions, then using the CIFS protocol instead of the SMB protocol can provide much more efficient operation of Linux clients. As you might expect, these extensions are not supported by the Windows Server family of operating systems, so they are only useful when Linux clients connect to the Samba server.
When we talk about data transfer, the question of its storage necessarily arises. There are many ways to store data from local storage to the cloud. Besides that, very often, people use special servers for storage to protect themselves from data loss, blackouts, and to have constant access from anywhere in the world at any given time.
NAS server is a machine or several integrated machines developed to store files on them. They are low-power and are not intended to do any heavy calculations there, install the software, or something else. They serve, like a library or an archive. One of the most common ways to communicate with such servers is the SMB protocol, as it is designed just for fast data transfer.
And as people can have a lot of clouds and servers for storing their data, the best variant to have it all at your fingertips is a powerful cloud manager like CloudMounter that makes it possible to mount all your cloud accounts as well as remote servers as local drives directly on your Mac computer. The app supports connection to most popular cloud storages and remote servers and is planning to add support for SMB protocol in the nearest feature.