Networking considerations
- The Domain Name Service (DNS)
- The Windows Internet Naming Service (WINS)
- Clients on the same workgroup and same subnet as the server
- The LMHOSTS file.
The order in which a server name is resolved to a TCP/IP address might vary depending on the client software and the service pack level of the Windows client software.
TCP/IP networks can use the Domain Name Service (DNS) to map server system names to IP addresses. In a DNS network, an entry tells clients in the network how to map the name of the server to its proper TCP/IP address.
If you want PC clients to access the SMB server by using DNS, then you must ensure that the host name and IP address are added to the DNS database. Using DNS is generally the easiest way for clients to access the SMB server on a distributed network. In this case, you should ensure that the (TCP/IP) host name and the (SMB) computer name are the same. (This is the default if you do not specify a computer name for the SMB server by using the _IOE_SMB_COMPUTER_NAME environment variable of dfskern.)
The supported Windows SMB clients make SMB calls directly over TCP or through NetBIOS over TCP/IP. When connecting directly over TCP, the client makes calls using a TCP/IP connection to server port 445. When using NetBIOS over TCP/IP, the client makes calls to ports 137, 138 and 139. When connecting to the server, these clients will attempt to connect to ports 445 and 139 to establish a session. The _IOE_SMB_TRANSPORTS environment variable specifies the enable modes as NetBIOS (port 139), DIRECT (port 445), or BOTH (ports 445 and 139). The default is NetBIOS. Many SMB clients have configuration options to enable NetBIOS over TCP/IP, SMB directly over TCP/IP, or both. The server responds on the enabled ports; the client software can choose to attempt one protocol prior to the other or both in parallel.
Microsoft Windows servers can provide the Windows Internet Naming Service (WINS) which allows clients to map a computer name to the computer’s actual TCP/IP address. If you use a WINS server in your network, you can configure the SMB server to announce itself to the WINS server. Then you can configure PC clients to connect to the SMB server by using the WINS server. The SMB server announces itself to the primary WINS server (identified by the _IOE_SMB_PRIMARY_WINS environment variable of dfskern). If the primary WINS server cannot be contacted, the SMB server announces itself to the secondary WINS server (identified by the _IOE_SMB_SECONDARY_WINS environment variable of dfskern). The SMB server does not, itself, act as a WINS server. It can, however, act as a WINS proxy. That is, it can accept WINS requests from PC clients and forward them to a WINS server if the _IOE_SMB_WINS_PROXY environment variable of dfskern is specified as ON. The PC clients would have the IP address of the SMB server that is specified as the WINS Server IP address.
In the _IOE_SMB_DOMAIN_NAME environment variable of dfskern, you can specify the name of the domain or workgroup that the SMB server should be a member of. This can be the name of an existing domain or workgroup in your LAN environment. If possible, put your SMB server in the same domain or workgroup as your client PCs.
An SMB server that is in the same workgroup and the same subnet as the PC clients appear in the network directory without any additional configuration on the server or those PC clients. An SMB server that is on the same subnet as a Primary Domain Controller that is acting as a WINS server appears in the Network directory of PCs that contain the WINS server IP address. The SMB server announces itself to the Browser by using subnet broadcast on User Datagram Protocol (UDP) port 138. It does this at every Browser announcement interval (specified by the _IOE_SMB_BROWSE_INTERVAL environment variable of dfskern). Those PC clients can also find the SMB server by using subnet broadcast to UDP port 137. The SMB server responds to this broadcast. PC clients that want to use the Network and Sharing Center function should have the NetBEUI protocol installed.
PC client operating systems can provide static configuration files that can map server system names to TCP/IP addresses. These files are typically more difficult to manage than a solution that involves more centralized control (for example, a DNS or WINS server). This is because the network administrator must configure each PC client individually. Static configuration files are useful, however, in large, distributed networks. In this environment, clients and servers exist in different subnets (network segments) and possibly different workgroups (domains). Static configuration files help clients locate servers.
To enable the Network and Sharing Center directory function, there must be a Master Browser on the same network segment as the SMB server. Typically, Windows clients and servers are configured to act as Master Browsers by default; therefore, a Windows client or server should already meet this requirement.
Windows clients provide the LMHOSTS file that can map server computer names to IP addresses. LMHOSTS contains IP addresses and server computer names for which to map those addresses. You can use these files to map the IP address of the SMB server for clients. This allows clients to find the SMB server in a large, distributed network environment.
You can find more information about LMHOSTS files in the sample LMHOSTS file that is provided with your Windows operating system. Additional information is available in your PC operating system documentation.