SMB - Server Message Block ============================ .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **What is SMB?** SMB stands for Server Message Block. It is a network file sharing protocol that allows applications and users to read, write, and manage files, printers, and other resources on a remote server. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Why is SMB useful?** * Enables seamless file and printer sharing over a network. * Supports access control, file locking, and network browsing. * Integrates tightly with Windows environments for authentication and resource sharing. * Used by network-attached storage (NAS) devices and enterprise file servers. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **How it works?** * A client sends SMB requests to a server to access shared resources (files, printers). * The server authenticates the client and grants or denies access based on permissions. * The client then performs operations like open, read, write, or delete files remotely. * SMB can also be used over the NetBIOS protocol or directly over TCP/IP (modern versions). .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Where is SMB used?** * In Windows-based networks for file and printer sharing. * In NAS devices to provide shared network drives. * In Linux and macOS systems via implementations like Samba. * In mixed-platform environments where interoperability is required. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which OSI layer does this protocol belong to?** * SMB operates at the Application Layer (Layer 7) of the OSI model. * It uses lower layers like TCP/IP for data transmission. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS SMB Windows specific?** * No, SMB is not Windows-specific. * While it was developed by Microsoft and is native to Windows, it is supported on other platforms using implementations like Samba. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **IS SMB Linux Specific?** * No, SMB is not Linux-specific. * Linux systems can use SMB through Samba to access or provide file shares, but SMB itself is a cross-platform protocol. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Transport Protocol is used by SMB?** * Modern SMB versions (SMB 2.0 and above) use **TCP** as the transport protocol. * Older versions of SMB could operate over **NetBIOS**, which in turn could run over TCP or UDP. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Which Port is used by SMB?** * SMB over NetBIOS uses ports **137-139**. * SMB over TCP (direct host) uses **port 445**, which is the default in modern SMB implementations. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow **Is SMB using Client server model?** * Yes, SMB follows the client-server model. * Clients request access to shared resources, and servers respond by granting or denying access and performing requested operations. .. panels:: :container: container pb-4 :column: col-lg-12 p-2 :card: shadow Topics in this section, * :ref:`Learnings in this section ` * :ref:`Terminology ` * :ref:`Version Info ` * :ref:`SMB Version&IEEE Details ` * :ref:`SMB Basic Setup on Ubuntu using IPv4 ` * :ref:`SMB Basic Setup on Ubuntu using IPv6 ` * :ref:`SMB Protocol Packet Details ` * :ref:`SMB Usecases ` * :ref:`SMB Basic Features ` * :ref:`Reference links ` .. _SMB_step1: .. tab-set:: .. tab-item:: Learnings in this section * In this section, you are going to learn .. _SMB_step2: .. tab-set:: .. tab-item:: Terminology * Terminology .. _SMB_step3: .. tab-set:: .. tab-item:: Version Info * Version Info .. _SMB_step5: .. tab-set:: .. tab-item:: SMB Version&RFC Details * rfc details .. _SMB_step18: .. tab-set:: .. tab-item:: SMB Basic Setup on Ubuntu using IPv4 * setup .. _SMB_step19: .. tab-set:: .. tab-item:: SMB Basic Setup on Ubuntu using IPv6 * setup .. _SMB_step6: .. tab-set:: .. tab-item:: SMB Protocol Packet Details * packet details .. _SMB_step7: .. tab-set:: .. tab-item:: SMB Usecases * usecases .. _SMB_step8: .. tab-set:: .. tab-item:: SMB Basic Features * features .. _SMB_step17: .. tab-set:: .. tab-item:: Reference links * Reference links