Let's get to work installing and configuring a WINS server. You'll need the Windows Server 2003 CD. You can run WINS on any of the server versions, even Web Server.
If you do not presently use WINS on your network and you are deploying only modern Windows machines (Windows Server 2003, XP, and Windows 2000), you may be able to avoid WINS entirely. Windows Server 2003 clients use DNS for resolving host names and NetBIOS names. Also, you may encounter applications that depend on NetBIOS name resolution and to support these applications in a routed environment, you will need WINS. An example is Exchange 5.5, which uses flat names to communicate between Exchange servers.
If you have an existing WINS infrastructure in place, you can upgrade the existing NT4 WINS servers to Windows Server 2003 (or Windows 2000). This automatically upgrades the WINS database while preserving the current configuration settings and database mappings.
When you upgrade, Setup runs a Jetconv utility to convert the Jet databases to the new format. This conversion does not always proceed smoothly. If the existing Jet databases are corrupt or unstable, the upgrade could fail. If the Jet upgrade fails for either or both of the WINS and DHCP databases, follow the steps listed in Procedure 4.2.
Procedure 4.2 Recovering from Failed Jet Database Conversion
Stop the service if it has started.
Restore the old database from tape.
Run Jetpack.exe on the database to compact it and reindex.
Start the service again. This starts the Jet conversion automatically.
If the conversion still fails, the database is probably corrupt. The best course of action is to delete the databases and recreate them from scratch.
If a particular WINS server is also a domain controller, you should consider transferring WINS to another server unless you are ready to migrate your domain to Active Directory at the same time that you upgrade WINS.
To install and configure WINS on Windows Server 2003, proceed as directed in Procedure 4.3.
Procedure 4.3 Installing WINS on Windows Server 2003
From Control Panel, double-click the Add/Remove Programs applet. The Add/Remove Programs window opens.
Click Add/Remove Windows Components. The Windows Components Wizard starts.
Highlight Networking Services and click Details.
Select the Windows Internet Name Service (WINS) option and click OK to return to the main window.
Click Next to accept the change and proceed with the installation.
When the drivers finish loading, the wizard displays a completion window. Click Finish to close the wizard and return to the Add/Remove Programs window.
Click Close. The service starts automatically. There is no need to restart.
WINS is configured and managed from an MMC console, Winsmgmt.msc. Open the console using START | PROGRAMS | ADMINISTRATIVE SERVICES | WINS. There's nothing to configure at the moment because no clients are using the server. Let's set up a few clients and then come back to see how the WINS console works.
Configuring WINS Clients
Any Windows network client can be directed at a Windows Server 2003 WINS server. If the client uses DHCP, see the sidebar, "Registry Tip: Configuring the Netbt Node Type," for configuration information. If the client is statically mapped, you must configure it locally. Configure WINS at a Windows Server 2003 client as directed in Procedure 4.4.
Procedure 4.4 Configuring a WINS Client
Right-click My Network Places and select PROPERTIES from the flyout menu. The Network and Dial-up Connections window opens.
Right-click Local Area Connection and select PROPERTIES from the flyout menu. The Local Area Connection Properties window opens.
Double-click the Internet Protocols (TCP/IP) entry. The Internet Protocol (TCP/IP) Properties window opens.
Click Advanced. The Advanced TCP/IP Settings window opens.
Select the WINS tab (see Figure 4.5). Ensure that the Enable NetBIOS over TCP/IP option is selected. If you disable this option, the client will not use WINS, even if you configure it with the address of a WINS server.
Figure 4.5. Advanced TCP/IP Settings window—WINS tab.
Click Add. The TCP/IP WINS Server window opens. Enter the IP address of a WINS server and click Add to save the change and return to the Advanced TCP/IP Settings window. You can add the address of a backup WINS server, if there is one. The WINS client queries the backup server if the primary server is unavailable.
Click OK to save the changes and return to the Internet Protocol (TCP/IP) Properties window.
Click OK to close the window and return to the Local Area Connection Properties window.
Click OK to close the window.
Open a command prompt.
Enter Nbtstat -RR to register the client with the WINS server.
Repeat this for the remainder of your statically mapped clients. Then, go back to the WINS server to check the registration listings and to manage the records.
Managing WINS Records
After a Windows client has been configured to use a WINS server, the name registration and resolution process happens automatically. You can see the results by opening the WINS console using START | PROGRAMS | ADMINISTRATIVE SERVICES | WINS.
If you are an NT administrator accustomed to the standard WINS management executable, you'll find that the WINS console operates much differently. The right pane consists of a tree that you can populate with WINS servers in your organization. You can manage classic NT WINS servers using this console. Figure 4.6 shows an example with several WINS servers.
Figure 4.6. WINS console with several servers loaded and ready to be managed.
Under each server is an Active Registrations node and a Replication Partners node. Right-click Active Registrations for a server and select DISPLAY RECORDS from the flyout menu. In the Display Records window, select the Record Owners tab (see Figure 4.7). This displays a list of the server's replication partners. Each server is listed as an Owner, meaning that it owns certain records in the WINS database.
Figure 4.7. WINS console—Display Records window, Record Owners tab showing list of replication partners with records in the server's database.
Many new WINS administrators find this business of "ownership" a little confusing. When a client registers at a WINS server, that server is said to "own" the record. The record owner is responsible for replicating this information to its replication partners.
When you browse down the list of servers in the WINS console and look at the contents of the individual WINS databases, you see records owned by that server plus records it obtained from its replication partners and stored in its WINS database. Ideally, the database at each server matches those of its replication partners. This is only the case if the server regularly receives updates from the record owners.
Click Find Now in the Display Records window to list the records owned by the servers you selected. The left pane populates with records (see Figure 4.8).
Figure 4.8. WINS console showing a list of client registrations from all owners at a selected WINS server.
Viewing WINS Record Properties
To view the contents of a WINS record, right-click the record icon in the right pane of the console window and select PROPERTIES from the flyout menu to open the Properties window for the record. Figure 4.9 shows an example.
Figure 4.9. Properties of a WINS record.
The Type entry shows the service that was registered. This corresponds to the service ID at the end of the NetBIOS name.
The Record State can be one of the following:
The WINS client is online with a current record in the WINS database.
The WINS client has notified the server that it is going offline or the record has expired without being renewed.
The expiration timeout period has elapsed and the client has not renewed the registration.
The Expiration date is determined by the default extinction timeout, which is six days, by default.
The Version ID is the sequential number assigned to the record by the record owner. A WINS server maintains a counter, much like the wheel of numbers in a Baskin-Robbins. Each time a record is changed, the version number is updated with the next number from the counter. This is how replication partners update each other. The server tells its partner, "I already have record number 3A7 from you. Give me 3A8 and higher."
Statically Mapping WINS Records
If you have UNIX servers or other IP-based hosts that do not use NetBIOS name registration, you can store their names and IP addresses in WINS using static mapping. This is the equivalent of adding a host record to DNS, and it helps legacy Windows clients who use WINS but not DNS to resolve names. You can also use static mapping to show Windows hosts in another network. Add a static mapping as directed in Procedure 4.5.
Procedure 4.5 Adding a Static WINS Mapping
Open the WINS console and expand the tree to Active Registrations.
Right-click Active Registrations and select NEW STATIC MAPPING from the flyout menu. The New Static Mapping window opens. Figure 4.10 shows an example.
Figure 4.10. New Static Mapping window showing sample server entry.
Enter the name and IP address of the server. Leave the NetBIOS Scope field blank. Leave the Type entry at Unique.
Click OK to save the entry and return to the main WINS console.
The Active Registrations list now shows three listings for the host: File Server, Workstation, and Messenger. This is standard for all static registrations.
From a WINS client, verify that you can make a network connection to the new host using the flat NetBIOS name. The connection will succeed if the host has SMB resources available.
A WINS database tends to accumulate clutter. It is not unusual to see many duplicate records and tombstoned entries and records for defunct workgroups and static client mappings. To delete a particular entry, right-click the entry and select DELETE from the flyout menu. A Delete Record window opens (see Figure 4.11). Here are the available options:
Delete the Record Only from This Server.
This option is appropriate when an incorrect record or records exists only at one server. For instance, a server may have been experiencing replication problems. You have fixed the problem, but not before the database accumulated a few dozen bad entries. Use this option to delete those entries.
Replicate Deletion of the Record to Other Servers (Tombstone).
This option does not delete the record immediately, but rather it marks the record for deletion by giving it a tombstoned status. This tombstoned record is replicated, informing all the other servers that this record is no longer valid. At the end of the extinction interval, it is deleted.
Figure 4.11. Delete Record window for selecting the deletion option from a WINS database.
Configuring WINS Replication
Before you configure WINS replication, you should have a diagram of the replication topology you plan to use. With this diagram in hand, use the steps shown in Procedure 4.6 to configure replication.
Procedure 4.6 Configuring WINS Replication
Open the WINS console from START | PROGRAMS | ADMINISTRATIVE TOOLS | WINS.
Right-click Replication Partners and select NEW REPLICATION PARTNER from the flyout menu. The New Replication Partner window opens.
Enter the IP address of the WINS server that you want to use as a replication partner. Enter the server's NetBIOS name only if it is on the same network segment.
Click OK to save the change.
At the replication partner, perform the same steps to establish the first server as a replication partner.
When the replication succeeds, records from the partners will appear in the respective databases and the name will appear in the Display Owners tab in the Display Records window.
Right-click the icon for the replication partner and select PROPERTIES from the flyout menu. The Properties window opens.
Select the Advanced tab (see Figure 4.12). The default replication configuration is Push/Pull. The default replication interval is 30 minutes. You can change this for expensive WAN links.
Figure 4.12. Replication Partner Properties window—Advanced tab showing partner type, replication interval, and persistent connection.
Under both Pull Replication and Push Replication, select the Use Persistent Connection for Replication option. This option avoids a problem in classic WINS where the connection would only be made long enough to replicate. This limited the number of long-term connections across a WAN, but it added to the replication delay. With modern data communications equipment, it makes sense to improve performance by using persistent connections.
Under Push Replication, leave the Number of Changes in Version ID Before Replication set to 0 so that changes propagate as soon as they are made.
After you have finished configuring replication at both partners, check the System log using the Event Viewer to verify that replication has completed.
See the next section for steps to manage replication after you have verified that the databases have replicated.
Managing the WINS Database
In addition to configuring options for viewing records and controlling replication, a set of features associated with the WINS service itself controls database and record handling. These are accessed by right-clicking the server icon in the WINS console and selecting PROPERTIES from the flyout menu. The Properties window opens for the server with the focus set to the General tab (see Figure 4.13).
Figure 4.13. WINS Server Properties window—General tab.
The Automatically Update Statistics Every option is selected by default. It refreshes a set of WINS server statistics that can be viewed by right-clicking the server icon and selecting DISPLAY SERVER STATISTICS. This opens a WINS Server Statistics window that lists replication information for all replication partners.
The Back Up Database During Server Shutdown option is not selected by default. This option closes down the Jet database engine and then makes a copy of the Wins.mdb file any time the server shuts down. If you are performing normal backups, you do not need to enable this feature. Make sure the backup utility is certified for use on Windows Server 2003 so that it can capture a copy while the database is open.
Setting Renewal and Extinction Intervals
Select the Intervals tab (see Figure 4.14). There are four interval settings controllable in this window. Under most circumstances, the default settings deliver optimized results. Changing the values without first analyzing their interrelation can seriously affect database consistency. The following list details the four interval settings:
This is the interval during which a client must renew its registrations. Clients ordinarily renew halfway through the renewal interval. The renewal interval also determines the periodic scavenging frequency for the server. During scavenging, the system deletes tombstoned entries and compacts the database. Frequent scavenging is good preventative medicine and improves performance. You can manually initiate scavenging by right-clicking the icon for the WINS server in the WINS console and selecting SCAVENGE DATABASE from the flyout menu.
This value is assigned to a released record. During the extinction interval, the record owner does not replicate the record. It is waiting for the client to reregister. After the extinction interval, if the client has not reregistered, the record is tombstoned.
This value is assigned to a tombstoned record. If a client does not claim the name or IP address associated with the record by the end of the extinction timeout, the record is removed at the scavenging.
This value is assigned to a replicated record. During scavenging, if the record age exceeds the verification interval, the server queries its replication partner to determine whether the record is still valid. If not, it is deleted. If so, the record gets a fresh timestamp and a new verification interval. The default verification interval is 24 days.
Figure 4.14. WINS Server Properties window—Intervals tab.
Ensuring Database Consistency
Select the Database Verification tab (see Figure 4.15). This window exposes to the UI a feature that was available in classic WINS only by making manual Registry entries. A database consistency check consists of copying the contents of the database at a replication partner and verifying that it matches the local database.
Figure 4.15. WINS Server Properties window—Database Verification tab.
The Begin Verifying At option sets the start time for the verification check. The default is 2 A.M.
This check is enabled by default and should be left enabled unless you have a very large WINS database that consumes too much time to verify every night. In that case, select the Randomly Selected Partners option to do a portion of the database verifications each night.
Controlling Log and Database Location and Burst Handling
Select the Advanced tab (see Figure 4.16). This tab contains three options.
Figure 4.16. WINS Server Properties window—Advanced tab.
The Log Detailed Events to Windows Event Log results in a log entry whenever just about anything occurs in the WINS database. The window warns you that this will fill up the log quickly and it isn't kidding. Use this option for diagnostic purposes only.
The Enable Burst Handling option controls the way the WINS service handles multiple registration requests. When you first put a WINS server online in a large network and point many thousands of clients at it, the database can get overwhelmed with building new records. Ordinarily, the system starts dropping requests if the request queue gets full. With Burst Handling enabled, the clients are given a positive registration response with a short renewal interval—five minutes. This is equivalent to the WINS server saying, "Come back when Daddy isn't busy." If the server gets really busy, it starts assigning longer and longer renewal intervals.
The four radio buttons control the BurstQueSize value in HKLM | System | CurrentControlSet | Services | WINS | Parameters. Following are the presets. The values represent the number of pending registration requests that haven't yet been fulfilled:
If you have a dedicated WINS server with lots of horsepower and a fast hard drive, you can push Custom up to 2,500.
The Database Path option is useful if you want to change the location of the WINS database to get it out of the system partition and onto a faster drive or a volume with more space. Stop the service before moving the database. Be sure to move the log files as well.
Setting Default WINS Console Properties
A few options affect the WINS console itself. In the WINS console, right-click the WINS icon at the top of the tree and select PROPERTIES from the flyout menu. The WINS Properties window opens.
Using this window, you can elect to display the servers by Name or by IP Address.
The Show DNS Names for WINS Servers option displays the fully qualified DNS name for the server rather than the flat NetBIOS name. This option is a little misleading because the fully qualified name is pulled from the DNS suffix entry in System properties rather than the TCP/IP properties. If the WINS server has not been joined to a domain, it's likely that the DNS suffix is blank.
To check the DNS suffix setting, open the System icon in Control Panel and select the Network Identification tab. If the Full Computer Name entry does not have a DNS suffix, click Properties, and then click More to add one. You must restart the machine after saving the entry.
Selecting the Validate Cache of WINS Servers at Startup option causes WINS to query the list of WINS servers you have loaded into the console. If one or more are offline, the system displays a console message and makes an Event log entry.
Do's and Don'ts of WINS
When managing a large WINS installation, a bit of advice from my grandfather, an old-time New Mexico cowboy, is appropriate. Granddad was fond of saying, "Don't get in front of the herd, don't make any sudden moves, and remember that you can always shoot the troublemaker." Here is how that advice applies in the context of wrangling WINS:
Don't put a WINS server in every LAN segment.
WINS replication has a well-deserved reputation for skittishness. WINS clients can find a name server through many intervening routers. Install servers in strategic locations and use the WAN to route registrations and queries.
Don't set up independent WINS servers.
WINS replication in an organization needs to be carefully coordinated. Working around authority figures is a prized American right, and is even laudable at times; but in the case of WINS, it can cause real problems.
Map your replication topology carefully.
Be especially watchful for replication circularities.
Check database statistics regularly.
Don't wait for a database corruption problem to catch you off-guard. The new Jet database engine in Windows Server 2003 is much less likely to corrupt a WINS database than its predecessors; the possibility still exists, however, and you should be watchful.
Avoid using WINS proxies.
Proxies are used to support Windows clients who do not have a Microsoft IP stack. A WINS proxy listens for address resolution broadcasts from non-WINS clients and forwards them to a WINS server on behalf of the client. When the resolution returns from the WINS server, the proxy forwards it to the client. WINS proxies are very slow, have a limited cache, and crash often. If you have older Windows 3.x machines, upgrade the operating system instead of deploying WINS proxies.
When all else fails, delete and start over.
If a particular WINS server seems to be causing problems, your best course of action is to stop the WINS service, delete the files in \Windows\System32\Wins, and then start all over again. This is especially true if the server has replication partners. It's better to repopulate a local WINS database and recreate any static mappings than to pollute an entire WINS infrastructure.