What is SMB protocol
Posted on 8th February 2021Technologies are everything in each part of our life. We exchange messages, share photos, and communication via lots of applications. It is a common thing to use the local network or Internet to share some data with another user. Local networks, more and more files are sent just with a simple function of their exchange. That’s not always protected.
There are some systems that are aimed to ease life for those people who deal with paperwork. Such apps provide important solutions. But in fact, to implement them, it takes much effort, and the process is pretty complicated. This is the reason; common people prefer using usual file-servers. These are easily-understanding. Apart from it, the Internet is full of platforms with content providing data to any taste.
SMB is a protocol with bits of help with data exchanging on the most widely-used operating systems, such as Windows, Linux, and others. The following article will give you a clear understanding of the way it works, some crucial things to know, and the basics to be aware of.
General information concerning the protocol
To start getting acquainted with Server Message Block or SMB, it is necessary to define the levels where it works. These are the 6th and the 7th levels of the OSI model. The levels are connected to the applications. Generally, it is used to get remote access to various things. For instance, it could be printers, some files with photos or videos, as well as Serial ports.
The further thing to define is the OSI model. It is a great model helping with interaction. It has 7 levels; each of them represents some specific network functions. The important detail to remember that each and every level is fully independent. This means the only thing necessary to deal with them simply knows the way how to use it. Easiness of the model and independence of the levels are the reasons for the success and popularity of the model.
The way Server Message Block works
It acts as a server-application for a client. This means it replies to a user. Let’s see how it works. A person sends a request, while the task of SMB is to answer. One of its parts is intended to access the system with files. For example, it is required when the user wants to receive files and sends such requests. Another part of it helps with the interaction of the inner processes. So it is obvious that one of the main purposes of the Server Message Block is general access to the documents and various photos. But still, it provides users with other functions. The following things make it so universal and suitable for everybody to use:
- One of the pleasant opportunities is to print something with the help of a network;
- The next aspect being mentioned is the availability to get access to the files with authentication;
- Specification of SMB servers in the network also matters.
- Another thing that makes it so great is the presence of notifications about any changes that happened with the folders and files.
Updated version of the protocol
The developers are always making some changes in the “pieces of art.” Such a thing happened with this protocol. Now the users have access to SMB 2.0. Its main characteristic is more quick work, which makes the interaction even more pleasant. The updates were in 2006.
The commands were reduced greatly, and now the number is just 19, while the previous version has 100. One more function that is new in the system is pipelining. It is a possibility to send lots of requests at the same time. Waiting for an answer for the first request is no longer required. Thus the number of commands is much less improving the performance.
Now the server can manage credit-based flow control. Thanks to it, the large amount of sent data could be maintained while the network bandwidth is used in a better way.
Update of SMB makes all commands much easier. It also allows to cache properties of the used files and folders and supports symbolic links, providing a better quality of better via NAT.
Oplock
There is a mechanism that allows clients to change the buffering strategy for the file with the aim to increase the performance and decrease the load on the network connection. It is called the Oplock. In case when the client is able to buffer the data locally, the performance could be boosted. This helps not to use the packages of SMB while changing files.
For instance, the client mustn’t make ASAP changes in the files available in the network, in case he knows no other process will get access to it. To add more, oplock guarantees transparent access to the folders in the background.
Types of oplock
There are 4 main types of oplock. The first one is Level1 (excluding). It allows users to buffer the data and support the caching of files. The next one is Level2 (public): this one numerous reading flows. Batch or excluding is the third type of oplock, where it is available to keep an open flow on the servers, while locally such flow is closed.
SMB Signing
Safety matters; that’s why SMB is protected by SMB Signing. It is a specific mechanism that is aimed to increase the level of security of sent data. It protects the files from the attacks in Man-In-The-Middle. There are two improvements for SMB:
- Mutual authentication;
- Authentication of messages and requests
But still, there is a disadvantage of SMB Signing. In fact, its adding lows the performance of network traffic transmission by 10-15%.
How SMB Signing works
Everything starts when a client connects with a server. He is supposed to send a request to use SMB Signing. Now it is a turn of a server to answer. The user creates the following request, including NTLM/NTLM v2 data. Signing is generated.
Authentication in SMB
Server Message Block includes two levels of access. The first level is the User-Level. It is all about authentication while connecting to the server. This means when the user tries to connect he sends his information for authentication. Once he goes through it, the aces to the server are available. In other cases, the client just will not be able to connect to it.
The second one is Share-level. It is determined for every folder. For instance, everyone has access to the folder “Public documents,” but not each and everyone can open “Folder1”.
As we can see, the process of the authentication begins with the first level (user one), and only then is it time for the second level. So if the user failed User-Level, he would not get access to the server at all.
The advantages of SMB Over TCP
This protocol was created for the good work of SMB and TCP/IP. It has some benefits, among which are the following things:
- Implied traffic transportation.
- WINS and NetBIOS no longer need to be used.
- Standardization of name resolution.
Conclusion
Server Message Block has a great number of advantages, while SMB 2.0 is even better than its predecessor. The use of the server boosts the process of data exchanging inside the network. It is not necessary to use NBT as a protocol, which is also a plus. SMB is a good thing to use. So get acquainted with its peculiarities and decide whether to use it or not.