There are several different methods of resovling names to IP addresses. Before getting into the different methods, it is important to understand the role of NetBIOS. When talking about Netbios, we typically refer to the concept of Netbios name which is the name assigned to your computer. Netbios allows applications to talk to each other using protocols such as TCP/IP that support Netbios. Netbios is typically seen in other forms such as Netbeui and NetBT. These are the main functions that Netbios serves:
- * Starting and stopping sessions.
- Name registration
- Session layer data transfer(reliable)
- Datagram data transfer(unreliable)
- Protocol driver and network adapter management functions.
- Local Broadcast – If the destination host is local, then first the Netbios name cache is checked and a broadcast is not sent. If it is not found here, then a name query broadcast is sent out that includes the destination Netbios name. Each computer that receives the broadcast checks to see if it belongs to the name requested. The computer that owns the name then uses ARP to determine the MAC address of the source host. Once obtained a name query response is sent. NOTE: Some routers do not support the fowarding of these broadcasts as they use UDP ports 137 and 138.
- NETBIOS Name Server – When using a Netbios name server, the cache is checked first and if the name is not found the destination host’s name is sent to the name server. After the name server resolves the name to an IP address, it is returned to the source host. When the source host receives the information it uses ARP to resolve the IP address of the destination host to it’s MAC address. Microsoft uses WINS as a NETBIOS name server.
- LMHOSTS File – An lmhosts file is a text file that is used to manually configure Netbios names. In order to work, each entry in the lmhosts file must be unique, have a valid IP address for the Netbios name and be spelled correctly. On large networks configuring LMHOSTS files on all clients is not feasible, so these are not used much anymore.
- Hosts File – The hosts file is a little different than the lmhosts file in that it will resolve both local and remote names. If the host name can’t be resolved and no other alternative name resolution processes are in place, the user will receive an error. Once the host name is parsed from the host file, ARP takes over and attempts to resolve the IP address to a MAC address. Like the lmhosts method, this is static name resolution.
NETBIOS Naming:
A Netbios name is either a unique name or a group name, the difference being that a unique name is used for communication with a specific process on a computer, whereas a group name is for communication with multiple clients. Netbios name resolution resolves a computer’s Netbios name to an IP address. Microsoft offers several different ways to resolve Netbios names and each will be disscussed below.