Friday, June 17, 2005

The Need For Name Resolution

To ensure successful communication on a network, your systems need to be able to associate a name with an IP (or other relevant network number) so that users do not need to memorize the numeric identifier, such as a TCP/IP address. Proper name resolution is essential for fast network communication, and if it is not configured correctly, your network will be slow, and your network users will be unhappy.

On Windows networks running TCP/IP, the following options exist for name resolution:
Host Name Resolution

*

HOSTS ............... Static
*

DNS ................... Dynamic

NetBIOS Name Resolution

*

LMHOSTS ........... Static
*

WINS ................. Dynamic
*

DNS ................... Dynamic (not the default for NT4 or earlier)
*

HOSTS ............... Static (with NT/2000/XP/2003)

Although commonly advocated, there is no need to run NETBEUI on your Windows network. It is a chatty, non-routable broadcast protocol, and only useful on very small networks, or if you don't want to connect to the Internet at all. Instead, you can rely on NetBIOS support, tunneled over another protocol such as TCP/IP. All versions of 32-bit Windows support NetBIOS over TCP/IP.

If you want to use DNS for resolving NetBIOS names on versions of Windows prior to Windows 2000, you must go into the TCP/IP properties in the Control Panel and enable "Use DNS for Windows Resolution". With 2000, XP and 2003, Windows has an increased reliance on DNS, whether on a peer network or through Active Directory.
If you are unable to get Windows 95/98/ME machines to talk to systems in the Windows NT-family without installing NetBEUI, then it is very likely that you have not setup NetBIOS Name Resolution for your client systems. Also, remember that NetBIOS traffic should always be confined to your internal network ONLY. There is no need to allow NetBIOS traffic to traverse the Internet or another public network without the benefit of a VPN.
NETBIOS vs. NETBEUI

Many folks confuse NETBIOS and NETBEUI. The former, is a program (API) developed by IBM which allows applications on a LAN to communicate. The latter is a chatty, non-routable protocol originally used by LAN Manager, and subsequently by Windows, to provide the frame and data format for NetBIOS traffic.

NetBEUI = NetBIOS Extended User Interface

Under Windows, NetBIOS can be transported over other protocols such as IPX and TCP/IP. Starting with Windows 2000, Microsoft networks are no longer dependent on NetBIOS for communication, although you still need it for browsing Network Neighborhood and for using certain utilities such as the Windows Messenger Service (NET SEND).
Where Are My HOSTS/LMHOSTS Files?

Both the HOSTS and LMHOSTS files can be found in the same location. Neither of these files has a file extension. The .SAM files found in the same location are sample files, and must be renamed to be used by Windows.

*

Win9x/ME ................. %windir% (usually C:\WINDOWS)
*

NT/2000/XP .............. %SystemRoot%\System32\Drivers\ETC

If creating or editing these files in NOTEPAD, be sure to place the name in quotes so that NOTEPAD does not add a .TXT extension to the saved file. Or just use Textpad to edit all your files.

To speed up name resolution on a peer-to-peer network, add the name and IP of each machine on your network to the HOSTS file on each machine. This will make it easier for the systems to find each other without waiting for broadcast messages.

Example:

127.0.0.1 localhost
172.30.50.11 workstation1
172.30.50.12 workstation2
172.30.50.13 workstation3

http://www.rxn.com/services/faq/smb/using_samba/html/ch01_03.htm


Name Resolutions Summary

MS provides many options for NetBIOS name resolution such as local cache lookup, WINS server query, broadcast, DNS server query, and LMHOSTS and HOSTS lookup. Microsoft TCP/IP uses NetBIOS over TCP/IP (NetBT) to support the NetBIOS client and server programs in the LAN and WAN environments. In the most cases, NetBIOS over TCP/IP (NetBT) resolves NetBIOS names to IP addresses in workgroup network and WINS resolves NetBIOS names to IP addresses in domain network.

Common NetBIOS name problem

NetBIOS names must be between 1 and 15 characters long (the names are up to 16 characters, but the last character is reserved as a special characters). For that reason, you should not give a computer name longer than 15 characters.

Duplicate name issue
Symptoms: Event viewer may show Event ID 4320, Event ID: 4319. You may get system error 52 and a duplicate name has been detected on the TCP network.
Resolutions:
1. If two computers on the Network with the same name, use the nbtstat -n command to find out these two computers, for example, using nbtstat -n to check the name and ip of the local computer, and then using nbtstat -a command with the IP address to get the another computer name.
2. If identical username is logging on to multiple computers, the usernames will register with a <03h>, and that may cause the name conflict in the network. Ask the user to log off of all computers and log back on to just one computer.
3. This may be occurred because of inactive or duplicate names in the WINS Database. Go to the WINS server, check the database and delete the inactive or duplicated names.
4. This my be occurred because of a possibly corrupted DHCP database. To clear DHCP related entries or clean out old settings in the registry, delete any .mib files, and then reinstall DHCP.
5. This may be occurred because of conflicting NICs in a Multihomed Computer. To fix this problem, you may want to stop Computer Browser service or uncheck one of Client for MS Network.
6. This may be ocurred because IPCONFIG /ALL returns incorrect host name. To change computer name in the TCP/IP parameters section, run regedit.exe, and locate the HOSTNAME value in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip \Parameters, and then edit the string data.

Still need help, contact consultant Your feedback and contributions to this web site
Failed to access NetBT driver -- NetBT may not be loaded

causes: 1. No rights to run NBTSTAT.
2. Missing NetBT parameters in registry.
3. NetBIOS is not enabled.

How can I install NetBEUI on WinXP?
A: NetBEUI is not included on XP by default. To install NetBEUI, 1) Copy Nbf.sys to the %SYSTEMROOT%\System32\Drivers
directory from Windows XP CD - Valueadd\MSFT\Net\NetBEUI folder. 2) Copy Netnbf.inf to the %SYSTEMROOT%\Inf hidden
directory. 3) Go to Control Panel>Network Connections, right-click the adapter you want to add NetBEUI to, and then click Properties>General>Install>Protocol>Add>NetBEUI Protocol.

How to configure WINS for a non-WINS client

If your have non-WINS machines on a subnet and want to them to be visible browsing participants, you may have two options to setup WINS for non-WINS machines. 1) Enable WINS Agent. To setup a machine as proxy agent in NT 4, run regedit and go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Parameters. Double-click on the EnableProxy and set vale to 1. 2) add static entries on WINS Manager. To do this, run WINS Manager>Mappings>Static Mappings and add information.

How to check NetBIOS status

To check if the computer has registered a 00, a 03, and a 20 entry, and these correspond to the Workstation service, the Messenger service, and the Server service, respectively, use nbtstat -n. That will list local NetBIOS names. To list remote computer name table, use nbtstat -a computer name or nbtstat -A IP.

How to disable WINS Proxy

To disable wins proxy, go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netbt\Parameters, change the value to 0.

Value Name: EnableProxy
Value Type: REG_DWORD
Values: Boolean (0 or 1)
Default: 0

How to modify Node Type

1. For W2K/XP, go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\Netbt\Parameters to make change:
Name: DhcpNodeType
Value Type: REG_DWORD - Number
Valid Range: 1,2,4,8 (b-node, p-node, m-node, h-node)
Default: 1 or 8 based on the WINS server configuration

If this key is present, it will override the DhcpNodeType key. If neither key is present, the system defaults to b-node if there are no WINS servers configured for the client. The system defaults to h-node if there is at least one WINS server configured.
2. Windows 95, go to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\VxD\MSTCP
Name: NodeType
Value type: DWORD
Valid range: 1, 2, 4, or 8
Default: 1 (b-node) if no value is specified or no WINS servers are configured on the network; 8 (h-node) if WINS servers are specified and NodeType is not otherwise defined in the Registry.

If DNS is enabled (which also enabled LMHOSTS in Windows 95), name resolution will also follow the mode defined by this parameter. This value can also be configured using DHCP.

How to re-cache the NetBIOS name

If you can ping a remote computer IP but not the name, and you have WINS or enable NetBIOS over TCP/IP, this may be an outdated NetBIOS name resolution in the local NetBIOS name cache. You may want to run NBTSTAT -r to reset the cache and force the computer to retrieve remote computer name.

How to fix name resolution issue on a standard DNS network

Some w2k/xp computer have a difficulty to connect to a laptop and your company has standardized on DNS for name resolution (no WINS and NetBIOS enabled). you also find that you can ping the laptop ip but not name. You may want to run ipconfig /registerdns to renew the ip configuration and register the laptop's DNS name with the DNS.



NetBios vs NetBeui

I see a lot of confusion between NetBeui and NetBios. The differences are simple, but possibly misleading. In NT (and Win9x) terms, NetBeui is a transport protocol, at the same level in the network stack as TCP/IP and IPX/SPX. It is a simpler transport protocol than TCP/IP in that it does not support routing and is self configuring. NetBios, on the other hand, is a network interface and sits above the transport protocols.

A major weakness of NetBios is it's naming. With NetBios, the name space is flat, thus all systems and domains have to have a unique name, unlike DNS names which, being hierarchal, allows substaintially more flexibility.All NT, 95 and Windows for Workgroups systems have unique NetBios names. NT also used NetBios names to find different services by utilising the 16th character (often shown as NetBios name - the xx is the 16th character and is in hex). To find the domain controler for the Hawaii domain, for example, you would find HAWAII<1B>.

A programmer would use NetBios to access the transport protocols. In this sense, NetBios is transport independent. NetBios over TCP/IP (NBT) is defined in RFC 1001/2. With NT, if you have TCP/IP you have NetBios too, there's no way to separate this.

A final note: to a large degree, NetBios as both a network interface and a naming convention will be going in Windows 2000. Although Windows 2000 will support NetBios names (for downlevel clients and domains), DNS as the locator service and DNS names as standard.

0 Comments:

Post a Comment

<< Home