SMB (Server Message Block) uses either IP port 139 or 445. The specific port used depends on the version of SMB and the underlying transport protocol.
SMB Port Usage Explained
Here's a breakdown of how SMB utilizes different ports:
- Port 139: SMB over NetBIOS: Originally, SMB ran on top of NetBIOS (Network Basic Input/Output System) using port 139. NetBIOS provided a transport layer allowing Windows computers to communicate within the same network. This is an older implementation.
- Port 445: SMB over TCP: Later SMB versions, specifically those released after Windows 2000, began utilizing port 445 directly over a TCP stack. This eliminated the dependency on NetBIOS for transport.
Feature | Port 139 (SMB over NetBIOS) | Port 445 (SMB over TCP) |
---|---|---|
Transport Layer | NetBIOS | TCP |
Windows Version | Older Versions | Post Windows 2000 |
Example
Imagine you have a legacy Windows NT 4.0 server. It would likely use port 139 for SMB communication. A more modern Windows Server 2019, on the other hand, would typically use port 445.