Lesson 2: The WINS Resolution Process

WINS uses standard methods of name registration, name renewal, and name release. This lesson introduces the different phases used to resolve a NetBIOS name to an IP address using WINS.


After this lesson, you will be able to

  • Describe WINS name registration, renewal, release, query, and response

Estimated lesson time: 25 minutes


Resolving NetBIOS Names with WINS

When a client needs to contact another host on the network, it first contacts the WINS server to resolve the IP address using mapping information from the database of the server. The relational database engine of the WINS server accesses an indexed sequential access method (ISAM) database. The ISAM database is a replicated database that contains NetBIOS computer names and IP address mappings. For a WINS client to log on to the network, it must register its computer name and IP address with the WINS server. This creates an entry in the WINS database for every NetBIOS service running on the client. Because these entries are updated each time a WINS-enabled client logs on to the network, information stored in the WINS server database remains accurate.

The process WINS uses to resolve and maintain NetBIOS names is similar to the B-node implementation. The method used to renew a name is unique to NetBIOS node types that use a NetBIOS name server. WINS is an extension of RFCs 1001 and 1002. Figure 13.4 shows the process of resolving a NetBIOS name.

Name Registration

Each WINS client is configured with the IP address of a primary WINS server and optionally, a secondary WINS server. When a client starts, it registers its NetBIOS name and IP address with the configured WINS server. The WINS server stores the client's NetBIOS name/IP address mapping in its database.

Name Renewal

All NetBIOS names are registered on a temporary basis, which means that the same name can be used later by a different host if the original owner stops using it.

Name Release

Each WINS client is responsible for maintaining the lease on its registered name. When the name will no longer be used, for example when the computer is shut down, the WINS client sends a message to the WINS server to release it.

Name Query and Name Resolution

After a WINS client has registered its NetBIOS name and IP address with a WINS server, it can communicate with other hosts by obtaining the IP address of other NetBIOS-based computers from a WINS server. All WINS communications are done using directed datagrams over UDP port 137 (NBNS).

Figure 13.4 Name resolution between clients and a WINS server

Name Registration

Unlike the B-node implementation of NetBT, which broadcasts its name registration, WINS clients register their NetBIOS names with WINS servers.

When a WINS client initializes, it registers its NetBIOS name by sending a name registration request directly to the configured WINS server. NetBIOS names are registered when services or applications (such as the Workstation, Server, and Messenger), start.

If the WINS server is available and the name is not already registered by another WINS client, a successful registration message is returned to the client. This message contains the amount of time the NetBIOS name is registered to the client, specified as the Time to Live (TTL). Figure 13.5 shows the name registration process.

Figure 13.5 Name registration process

When a Duplicate Name Is Found

If there is a duplicate name registered in the WINS database, the WINS server sends a challenge to the currently registered owner of the name. The challenge is sent as a name query request. The WINS server sends the challenge three times at 500-millisecond intervals.

If the registered computer is a multihomed computer, the WINS server tries each IP address it has for the computer until it receives a response or until all of the IP addresses have been tried.

If the current registered owner responds successfully to the WINS server, the WINS server sends a negative name registration response to the WINS client that is attempting to register the name. If the current registered owner does not respond to the WINS server, the WINS server sends a successful name registration response to the WINS client that is attempting to register the name.

When the WINS Server Is Unavailable

A WINS client makes three attempts to find the primary WINS server. If it fails after the third attempt, the name registration request is sent to the secondary WINS server, if configured. If neither server is available, the WINS client may initiate a broadcast to register its name.

Name Renewal

To continue using the same NetBIOS name, a client must renew its registration before it expires. If a client does not renew the registration, the WINS server removes the record for that client from the WINS database.

Name Refresh Request

WINS clients must renew their name registrations before the renewal interval expires. The renewal interval determines how long the server stores the name registration as an active record in the WINS database. When a WINS client renews its name registration, it sends a name refresh request to the WINS server. The name refresh request includes the IP address and the NetBIOS name that the client seeks to refresh. The WINS server responds to the name refresh request with a name refresh response that includes a new renewal interval for the name. When a WINS client refreshes its name, it performs the following steps:

  1. When a client has consumed half of its renewal interval, it sends a name refresh request to the primary WINS server.
  2. If its name is not refreshed by the primary WINS server, the WINS client tries to refresh again in 10 minutes and continues to try the primary WINS server repeatedly every 10 minutes for a total of 1 hour. The WINS client, after trying to refresh its name registration with the primary WINS server for 1 hour, stops trying and attempts to refresh its name with the secondary WINS server.
  3. If it is not refreshed by the secondary WINS server, the WINS client tries to refresh its name again using the secondary WINS server in 10 minutes and continues to try every 10 minutes for a total of 1 hour. The WINS client, after trying to refresh on the secondary WINS server for 1 hour, stops trying and tries to refresh using the primary WINS server. This process of trying the primary WINS server and then the secondary WINS server continues until the renewal interval is consumed or the WINS client has its name refreshed.
  4. If the WINS client succeeds in refreshing its name, the renewal interval is reset on the WINS server.
  5. If the WINS client fails to register during the renewal interval on either the primary or secondary WINS server, the name is released.

Figure 13.6 shows how a WINS client renews its lease to use the same NetBIOS name.

Figure 13.6 Renewing a lease using the same NetBIOS name

When a WINS server receives the name refresh request, it sends the client a name refresh response with a new TTL.

Name Release

When a WINS client is properly shut down, it sends a name release request directly to the WINS server for each registered name. The name release request includes the client's IP address and the NetBIOS name to be removed from the WINS database. This allows the name to be available for another client, as illustrated in Figure 13.7.

When the WINS server receives the name release request, it checks its database for the specified name. If the WINS server encounters a database error or if a different IP address maps the registered name, it sends a negative name release to the WINS client. Otherwise, the WINS server sends a posi-tive name release and designates the specified name as inactive in its database. The name release response contains the released NetBIOS name and a TTL value of zero.

Figure 13.7 Name release request

Name Query and Name Response

A common method of resolving NetBIOS names to IP addresses is with an NBNS, such as WINS. When a WINS client is configured, by default, the H-node type of NetBT is used. The NBNS is always checked for a NetBIOS name/IP address mapping before initiating a broadcast. The following steps and illustration in Figure 13.8 demonstrate the process:

  1. When a user initiates a Windows NT command, such as net use, the NetBIOS name cache is checked for the NetBIOS name/IP address mapping of the destination host.
  2. If the name is not resolved from cache, a name query request is sent directly to the client's primary WINS server.

    If the primary WINS server is unavailable, the client resends the request two more times before switching to the secondary WINS server.

    When either WINS server resolves the name, a success message with the IP address for the requested NetBIOS name is sent to the source host.

  3. If no WINS server can resolve the name, a name query response is sent back to the WINS client with the message "Requested name does not exist," and broadcast is implemented.

    If the name is not resolved from cache by a WINS server or broadcast, the name may still be resolved by parsing the LMHOSTS or Hosts file, or by using DNS.

Figure 13.8 NetBIOS name server checked for NetBIOS name/IP address mapping

Lesson Summary

WINS uses standard name registration, name renewal, and name release methods. To continue using the same NetBIOS name, a client must renew its lease before it expires. When a WINS client is shut down, it notifies the WINS server that it no longer needs its NetBIOS name.



MCSE Training Kit(c) Microsoft Windows 2000 Accelerated 2000
MCSE Training Kit(c) Microsoft Windows 2000 Accelerated 2000
ISBN: N/A
EAN: N/A
Year: 2004
Pages: 244

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net