SMB (Server Message Block, also known as common Internet File System (CIFS ))

Source: Internet
Author: User
Server Message Block (SMB) is a software program-level network transmission protocol developed by Microsoft, it is mainly used to allow machines on a network to share computer files, printers, serial ports, communications, and other resources. It also provides certified inter-trip communication functions. It is mainly used on a machine with Microsoft Windows installed, on which it is called Microsoft Windows network.

After re-development by the Unix server vendor, it can be used to connect Unix servers and Windows clients to execute printing and file sharing tasks.

The CIFS Message format is different from the NFS fixed length format. Most message bodies contain variable-length data, which leads to Protocol complexity. CIFS messages are generally on the NetBIOS or TCP protocol layer, which use different ports 139 or 445 respectively. Currently, CIFS messages tend to use port 445. A cifs Message consists of one message header (32 bytes) and one message body (one or more, variable length ).

Directory [hide]
1. History
2. Implementation
2.1 client-server structure
2.2 performance problems
2.3 Microsoft changes
Features 2.4
3. Other implementations and versions
4 references
5 external links

[Edit] History
SMB was initially developed by IBM Barry Feigenbaum to transform the local file interface "interrupt 13" in the DOS operating system into a network file system. Later, Microsoft made major changes to this development. The changed version is also the most common version. Microsoft integrated the SMB protocol with the network management program developed together with 3Com, and added new features to Windows for workgroups and later Windows versions.

SMB was initially designed to run on the NetBIOS protocol (while NetBIOS itself runs on netbeui, IPX/SPX, or TCP/IP ), windows 2000 introduces the SMB function to run directly on TCP/IP. Here we must distinguish between the SMB protocol and the SMB business running on this Protocol, as well as NetBIOS and the DCE/RPC business using SMB as the authentication tunnel. In addition, we need to distinguish the "Network Neighbor" protocol that uses NetBIOS datagram directly (but not only.

In 1996, about [1] was released in shengyang, Microsoft proposed to change SMB to common Internet File System [2]. In addition, Microsoft has added many new features, such as symbolic links and hard links, to increase the file size. Microsoft also tried to support direct contact without relying on NetBIOS. However, this attempt is still in the trial phase and needs to be improved. Microsoft submitted part of the definition to the Internet Engineering team as the Internet Draft [3]. However, these proposals have now expired.

Because SMB protocol is important for communications with the dominant Microsoft Windows platform, the SMB protocol used by the platform has changed significantly compared with the initial version, therefore, the Samba project was created for reverse engineering to provide a free software compatible with SMB software, so that non-Microsoft operating systems can also use it.

In Windows Vista, Microsoft launched Server Message Block 2.0.

[Edit] Implementation

[Edit] client-server structure
SMB uses point-to-point communication. A client sends a request to a server and the server replies accordingly. Part of the SMB protocol is used to process access to the file system so that the client can access a file server. SMB also has a part of inter-trip communication. The SMB protocol is especially applicable to local subnets, but it can also be used to connect different subnets through the World Wide Web. This feature is primarily used for file and printer sharing in Microsoft Windows.

The SMB server provides file systems and other resources to clients on the network. The client computer may also have its own, non-shared hard disk, but may also want to use the file system and printer shared on the server. This is why SMB is so famous and widely used. Another reason for SMB's popularity is that it uses protocols suitable for NT domains and provides at least NT domain-based authentication. The NT domain protocol is a Microsoft Remote Process calling service and can only be used by named pipelines for SMB inter-process communication. Almost all SMB servers use NT domains to authenticate whether users can access a resource.

[Edit] performance problems
It is generally believed that the SMB protocol occupies a lot of network bandwidth, because each client broadcasts its presence throughout the subnet. However, SMB itself does not use broadcast. The broadcast problem caused by SMB is actually caused by NETBIOS's service locating protocol. Microsoft Windows server uses Netbios for protocol and location services. While NetBIOS regularly broadcasts the existence of a service to a specific server. This method is feasible for a network with fewer than 20 servers. However, the traffic caused by the increase in the number of servers may cause problems. This problem can be mitigated by appropriately implementing the Windows Internet Name Service (WINS) Locating protocol. Wins uses a more advanced system to determine and centralize service requirements, but it causes problems with its own design and storage network. Dynamic DNS is another solution. Microsoft recommends using dynamic dns in Microsoft's Active Directory environment. Network latency has a great impact on the speed of the SMB protocol. This problem is clearly reflected when the network latency between servers is large and SMB is used to change the folder. For example, when using a virtual private network through the World Wide Web, the network latency will be relatively large, and using SMB will be annoying.

[Edit] Microsoft changes
Microsoft added many features when implementing its SMB. For example, Microsoft introduced NTLM version 2 because the des used in earlier version 1 is incorrect. In addition, NT 4.0 uses 40-bit encryption outside the United States, which is unreliable for today's standards.

[Edit] features
SMB's inter-process communication mechanism is worth mentioning. This system provides named pipelines. This organization is one of the first few inter-trip communications that programmers can use. It inherits the authentication from clients when they contact the SMB server to provide services. Naming pipeline inheritance certification is a unique and transparent Organization. Therefore, programmers and Windows users who use Windows APIs regard it as natural.

It is strange that some services use named pipelines, such as Microsoft Remote Process calling programs that use SMB, and allow Microsoft Remote Process calling client programs to perform their own authentication, and thus mask the authentication of SMB servers. However, this mask takes effect only when the client program authentication is successful.

Another feature is that SMB uses a special lock mechanism called server lock to speed up files.

Microsoft's distributed file system is implemented based on SMB.

[Edit] Other implementations and versions
The following lists SMB clients, servers, and protocols that extend SMB.

Samba is the implementation of many services and protocols, including NetBIOS (NBT), SMB, and CIFS (enhanced version of SMB) on TCP/IP) DCE/RPC or, more specifically, MSRPC (Network Neighbor protocol suite), a WINS Server (also known as NetBIOS Name Server (NBNS )) NT domain protocol suite (including NT domain logons, secure accounts manager (SAM) database, Local Security Authority (LSA) service, NT-style printing service (SPOOLSS), NTLM, and recent Active Directory logon services, including improved Kerberos protocol and improved Lightweight Directory Access Protocol (LDAP ). These services and protocols are often incorrectly classified as NetBIOS or SMB. Samba can also be used to share a printer.

Samba can create network sharing for the selected UNIX directories (including all subdirectories. This feature allows Windows users to access these UNIX directories over the network as they access folders in normal windows.

Samba-TNG is a derivative version of Samba.
The Linux kernel includes two SMB clients that use virtual file systems to provide files that are exposed to SMB Servers through interfaces of standard file system applications.
Onstor implements its own SMB, which also supports the NFS protocol.
Novell Netware version 6 and later provide CIFS server implementation, so that the Microsoft network client can remove Netware files.
FreeBSD, NetBSD, and Mac OS X both contain SMB clients that use their own virtual file systems.
Freenas is a small network storage device service, which enables users to use old computers as file servers again. It supports the CIFS/samba protocol.
Viver software has implemented an SMB.
Network Appliance has an SMB server implementation

From: Title = SMB & variant = ZH-Hans

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.