Summary WINS

Windows Internet Name System (WINS) is a dynamic distributed database for resolving NetBIOS names to IP addresses. (NetBIOS name server) It is used in a routed environment where NetBIOS clients can register and query NetBIOS names for computers and groups.

NetBIOS

NETwork Basic Input/Output System (NetBIOS) is a session layer interface that clients can use to communicate with each other. It provides the following services :

bulletNetwork name registrations and verification
bulletSession establishment and termination
bulletReliable connection-oriented session data transfer
bulletUnreliable connectionless datagram data transfer
bulletSupport protocol and adapter monitoring and management

NetBIOS knows two types of 16-byte names, unique and group names. Unique names are used to communicate with a specific process on a single computer, group names to send data to multiple computers at once.
The 16-byte name uses 15 bytes for the computer or group name, the 16th byte describes the service offered. The 16th byte can be :

Unique names :

bullet[00h]. Workstation service.
bullet[03h]. Messenger service. This name is registered for the computer name and the user logged on.
bullet[06h]. Routing and Remote access client.
bullet[1Bh]. NT 4.0 server running as a domain master browser.
bullet[1Fh]. Networking Dynamic Data Exchange (NetDDE) client.
bullet[20h]. Server service.
bullet[21h]. Remote Access Service client.
bullet[BEh]. Client running the network monitor agent. If the computer name is shorter than 15 character it is complete with +'s.
bullet[BFh]. Client running network monitor utility. (incl. SMS) If the computer name is shorter than 15 character it is complete with +'s.

Group names :

bullet[00h]. Registered by the workstation service so it can receive browser broadcasts.
bullet[1Ch]. Domain controllers. This group can contain a maximum of 25 clients.
bullet[1Dh]. Master browsers. (one per subnet)
bullet[1Eh]. Normal group. Used to elect master browsers.
bullet[20h]. Internet group. Can be used for administrative purposes.

NetBIOS name resolving

Microsoft clients can use various systems to resolve NetBIOS names to IP addresses :

bulletB-node (broadcast). This mode is used by default if no WINS server is specified. When a client want to resolve a NetBIOS name, it sends a broadcast on the network. If the searched client is on the same subnet, it will respond with it's IP address. The main disadvantages are that amount of network traffic that is created for each network node on the subnet and that routers normally do not forward broadcasts. This will cause that NetBIOS clients on the other site of the router will not be found.
bulletP-node (peer-peer) P-node will use a NetBIOS name server (e.g WINS) to resolve NetBIOS names. P-node will not use broadcasts.
bulletM-mode (mixed). Mixed mode first uses a broadcast (B-node) to resolve the NetBIOS name. If this does not work a NetBIOS name server (P-node) is used.
bulletH-node (hybrid). This is the default mode used when a WINS server is used. First the NetBIOS name server(s) is/are queried (P-node). If this fails, broadcasts are send (B-node)

WINS functions

WINS is used to offer NetBIOS clients the ability to resolve NetBIOS names without broadcasts within a routed environment. This causes the network traffic to be reduced. Each client can register it's services at the WINS server when starting and query the WINS server to resolve NetBIOS names of other clients.
Within Windows 2000, clients are automatically installed to provide client-side support for registering and resolving NetBIOS names. This can be disabled by disabling NetBIOS over TCP/IP in the WINS tab of the TCP/IP protocol.

LMHOSTS file

The LMHOSTS file is a static ASCII file on a client containing NetBIOS names and IP addresses.  The file is stored in the %systemroot%\system32\drivers\etc folder and called lmhosts. There is also a sample file, lmhosts.sam. A lmhosts file contains rows of an ip address and a network clients, e.g :

102.54.94.97     rhino
102.54.94.102   popular
102.54.94.106   etcetera

With these lines you can add the following characters :

bullet#pre. An entry followed with #pre will be preloaded in the name cache when the WINS client is initialized or when the 'nbtstat -RR' command is used. Put these entries at the end of the lmhosts file for the best performance.
bullet#dom:<domain>.  This will associate the name with the domain. It is used by the browser and logon services.
bullet#include<filename>. Loads and searches NetBIOS entries in a separate file. This could be a centrally located lmhosts file. When using a NetBIOS servername in the path to the file, the lmhosts entry of this servername should be before the #include entry with a #pre entry. 
The share name that is used to access the central lmhosts file must be in the LanManServer list of NullSessionShares. This can be done by adding the share to the hklm\system\CurrentControlSet\Services\LanManServer\Parameters\NullSessionsShare entry.
bullet#begin_alternate, #end_alternate. Within these entries you can define a redundant list of alternate locations for lmhosts files.
bullet#nofnr. Avoids NetBIOS-directed name queries for older LAN Manager Unix systems.
bullet#mh. Adds multiple entries for a multi homed computer. 

Lines starting with a # are ignored in the lmhosts file. Keep in mind that a lmhosts file is parsed from above to beneath. Reduce the number of #-lines and put the #pre entries at the end of the file.
You can disable the use of the lmhosts file in the WINS tab of the TCP/IP properties. By default it is on.

WINS processes

Name registration

When a client starts it's services like workstation, server, messenger etc. they are registered with the computer name in WINS. First the client tries to register the services with the primary WINS server for three times. If this fails, the secondary servers are used. (if configured) If this fails or if there is/are no secondary server(s), a broadcast is send. A client that is not able to register it's NetBIOS name, will try to register again every 10 minutes.
When a WINS server is available to register the client, it will check if the name is still available. If the computer name is already in the WINS database, the WINS server will three times (500 ms intervals) send a challenge to the machine already in the database. If this machine responds, the other machine is not able to register it's computer name. If the machine does not respond, the new owner of the name will be registered. When a client has registered it's computer name and services within the WINS database, it will be provided by the WINS server with a successful registration message. This message contains the Time To Live (TTL) of the entries made.

Non WINS clients can be registered in WINS via Static mappings. First select the Active Registrations in the WINS database. After this choose New Static mapping and enter the computer name, NetBIOS scope (optional), type of service and ip address. You can select the following types of service :

bulletUnique. The mapping of a computer name to an ip address for the workstation- [00h], server- [20h] and messenger service [03h]
bulletGroup. Also known as normal group. It adds a computer name to a workgroup. For these records the ip addresses are not stored in the database but resolved via broadcasts. [1eh] This group is used for browsing services.
bulletDomain name. [01c]A domain group can contain a maximum of 25 members. After the 25th registration first the replica addresses are overwritten. If they do not exist anymore, it overwrites the oldest registration.
bulletInternet group. Groups that can be used for administrative tasks. It can contain a maximum of 25 clients. [20h]
bulletMultihomed. A unique computer name can have up to 25 ip addresses. After the 25th address, first the replicas are overwritten. If they are not available anymore, the oldest registration is overwritten.

Keep in mind that with a group a static member (added via WINS manager or importing a lmhosts-file) does not replace a dynamic member.

Name renewal

When a client has registered it's computer name and services it receives a TTL for which the entries are valid within the WINS server. By default at the half of this TTL, the client will send a name refresh request to the primary WINS server. If this request is accepted, a new TTL is send to the WINS client by the WINS server.
If the primary WINS server is not available, the client tries to re-register it's name every 10 minutes with the primary WINS server for the maximum of 1 hour. If this fails, it will try to refresh it's name with the secondary WINS server. Again every 10 minutes for one hour. If this also fails, the primary WINS server is tried again for one hour, then the secondary again, etc. This until the lease time is expired.
If the client is not able to refresh it's computer name, the name is released.

Name release

When is WINS client properly shuts down it sends a name release request to the WINS server for each registered name. The WINS server checks the database for the computer name and the ip address. If they match, the WINS server sends a positive name release and sets the computer name to inactive. If the computer name and ip address do not match the name is not released.

Name resolving (h-node)

When a client wants to make a connection via a NetBIOS name, the following process starts :

bulletThe client checks the NetBIOS name cache. Every NetBIOS name resolved is stored in the NetBIOS name cache for 10 minutes. You can view the NetBIOS cache via 'nbtstat -c'
bulletA request is send to the primary WINS server three times. (750 ms interval)
bulletA request is send to the secondary WINS server(s) if available. There can be up to 12 secondary WINS servers configured for a client.
bulletNetBIOS broadcasts are send over UDP ports 137 (NetBIOS name service) and 138 (NetBIOS datagram service) for three times with a 750 ms interval.
bulletLMHOSTS file.
bulletHOSTS file. The first 15 characters before the dot of the names in the hosts file are used to try to resolve a NetBIOS name to an ip address.
bulletDNS server.

WINS server installation

You can install WINS on a member server or a domain controller. The number of WINS servers required depends on the network infrastructure and the amount of redundancy required. Keep the following things in mind :

bulletA typical WINS server can handle 1500 name registrations and 4500 name queries per minute.
bulletMicrosoft recommends one primary and one secondary WINS server for each 10.000 WINS clients.
bulletAn additional processor will increase performance by approx. 25 %
bulletTurning database logging of will increase performance but increases the risk of losing data when a crash occurs.

You can install WINS via Add/Remove programs, Windows components, Networking services, Windows Internet Name Service. (0.9 MB)

WINS server console

The WINS console is integrated with the MMC. Within this console you can do the following things :

bulletView active registrations. Each line contains the name of the record, the type (00h, 03h, etc.), the ip address, the state (active, released, thombstoned or scavenged), if it is static, the owner, the version and the expiration time. (TTL)
Within this window you can search for entries by name or owner, modify the entries, create new static entries, import a lmhosts file, verify name records and delete owners.
bulletReplication partners. Create replication partners, replicate now and set replication properties. At the replication properties there are the following tabs :
bulletGeneral. Set 'Replicate only with partners' (default on) and 'Overwrite unique static mappings at this server (migrate on)' (default off) Normally static entries are not overwritten by dynamic entries until the last option is activated. An exception is a static <1Ch> entry which is never overwritten by a dynamic entry, even if the last option is activated. The <1Ch> option is used by domain controllers.
bulletPush replication. Set to start push replication at startup (default off) and/or after a specific number of address changes (default off) You can also set if persistent connections should be used for push replication partners. (default on)
bulletPull replication. Set the start time, replication interval and number of retries (default 3) for pull replication. You can select 'Start pull replication at service startup' (default on) and 'Use persistent connection for pull replication partners' (default on)
bulletAdvanced. Here you can block registrations from specified owners and enable automatic partner configuration via multicasts at specific intervals. (Both are by default off)
bulletWins server configuration. When selecting a WINS server you can view/modify the following entries :
bulletWins server statistics. Every 10 minutes refreshed WINS statistics like replications, name registrations, name releases, name queries and scavengings.
bulletScavenge database. Scavenging removes old and released entries that were registered at another WINS server and replicated to this server. WINS also automatically scavenges the database at intervals set at the WINS server properties.
bulletVerify database consistency. The WINS server compares the records in it's database with the entries in the database of the record's owner.
bulletVerify version ID consistency.  The process checks that the WINS server record in the database who owns the records, has the highest version number.
bulletStart push replication. Start a push replication with a specified replication partner.
bulletStart pull replication. Start a pull replication with a specified replication partner.
bulletBackup database. Backup the WINS database in a specified folder. In this folder a wins_bak folder will be created. 
bulletRestore database. After the WINS service has stopped, you can restore the database from a specific directory. After the restore, the WINS service will automatically start.
bulletAll tasks. Stop, start, pause, resume and restart the WINS servers.
bulletProperties. Set the properties for the WINS server on four tabs :
bulletGeneral. Set the time statistics automatically update, (default every 10 minutes) set default backup path and if the WINS database should be backup when the WINS service is stopped. When a backup folder is specified a backup is made every three hours within the subfolders \Wins_bak\New folder.
bulletIntervals. Set the renew interval (default 6 days), the extinction interval (default based on renew interval and replication partners), the extinction time out (default based on renew interval and replication partners) and the verification interval (default is dependent on the extinction interval, minimum is 24 days)
bulletDatabase verification. Set if database consistency checks should run. (default off). You can set the interval (in hours), when to start,  the maximum number of records to check (default 30000) and to verify against owner servers (default) or randomly selected partners.
bulletAdvanced. Set to log detailed events to the Windows event log (default off), enable burst handling (default on), set the number of clients that can be handled before burst mode is entered (low, medium, high, custom), the database path (default %windir%\system32\wins), the starting version id and if computer names that are compatible with LAN manager should be used. (default on)

Replication

All WINS servers can be configured to replicate their data so NetBIOS clients are able to contact hosts that registered with another WINS server. Within replication there are two types of servers. Push servers send a message to their pull-partners when data has changed. These pull servers can than request the push server to send the latest updates. Only records on the push server with a higher version number than the records on the pull server are replicated.
Configure the servers as push servers when they are connected with fast connections. Use pull servers on slow connections are pull replication can be configured to take place at specific intervals. If both servers need to replicate with each other, configure them both as push and pull server.
Replication takes place when there is at least one push and pull partner. Replication can start at the following moments :

bulletSystem startup. WINS automatically pulls database entries when starting. It can also be configured to push entries at start up.
bulletAt a configured interval.
bulletThreshold. Pull partners are informed when a specific number of changes is made in the database.
bulletForced replication. By selecting 'Replicate now' in the WINS mmc.

On the advanced tab of a replication you can set if it is a push, pull or push/pull replication, if you want to use a persistent connection for pull replication or set a start time and interval and if you want to use a persistent connection for push replication or a number of changes before push replication takes place.

At the properties of the Replication partners there are four tabs in which replication can be configured :

bulletGeneral. Replicate only with partners (default on) and overwrite unique static mappings at this server (migrate on). This option determines if static mappings can be overwritten be dynamic entries if a conflict occurs. The option is off by default.
bulletPush replication. Start push replication at service startup (default off), when address changes (default off), set a number of changes in version id before replication should take place (default 0) and set if a persistent connection for push replication partners should be used. (default on)
bulletPull replication. Set the start time, the interval (default 30 minutes), the number of retries (default 3), if replication should start at service startup (default on) and if persistent connections should be used. (default on)
bulletAdvanced. Set ip addresses of owners of records that should be blocked within the replication and enable automatic partner configuration (default off), Automatic partner configuration sends by default every 40 minutes a multicast on address 224.0.1.24 to find replication partners. WINS servers found are automatically added as push and pull replication partner with a pull replication interval of two hours. The push parameter is set to 0, so that no push triggers will be send.

WINS uses port 42 for replication.

WINS record lifecycle

There are four phases in the lifecycle of the WINS record. First the record is active. In this phase the client will try to renew it's registration at the half of the TTL. When a client shuts down, a release is send to the WINS server. After this, the record will be in the released state for the time being specified in the extinction interval. In this state the server will make no challenge if a(nother) computer tries to register the address. After the extinction interval the record becomes tombstoned for a period specified in the extinction timeout. When this period is finished the record becomes in the scavenged phase and can be deleted from the WINS database.

WINS proxy

A WINS proxy is a client that supports non-WINS clients by capturing NetBIOS name query broadcasts from a network. It forwards them to the WINS server or it's local cache for name resolution. You can create a WINS proxy on a client by changing the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\
Netbt\Parameters\EnableProxy registry key.
A NetBIOS name cannot be registered in WINS via a WINS proxy. Use static entries to register non-WINS clients.

Burst mode

When a WINS server gets more registration requests than it can handle, e.g. after a power down of a site, it can get into burst-mode. During this period, it will first queue the registration requests into memory. If this does not solve the problem, WINS will acknowledge all registrations but not store them in the database. The clients will receive a registration acknowledgement, but one with a very short TTL between 5 and 60 minutes. Also are no checks made if the address was already registered.  When the clients try to renew their record at half of the TTL, they definitively got registered in WINS with a normal TTL.

New Windows 200 WINS functions

Specific new functions of WINS in Windows 2000 are :

bulletPersistent connections for optimized replication traffic.
bulletManual tombstoning to mark a record for deletion.
bulletImproved manageability via the MMC snap-in.
bulletEnhanced filtering and record searching.
bulletDynamic record deletion and multi-select.
bulletRecord verification and version number validation. (consistency check)
bulletDatabase export functionality.
bulletClient support for up to 12 WINS servers per interface. (was 2)
bulletRead-only access to the WINS console.

No more WINS ?

In a pure Windows 2000 environment, WINS should not be required anymore but probably older applications are still using it. Check the WINS performance counters 'Queries/sec' and 'Successful queries/sec' to see if WINS is still in use. If not, it can be disabled via the 'Disable NetBIOS over TCP/IP' option on the WINS tab of the client or via the DHCP advanced scope option 'Microsoft disable NetBIOS' option under Microsoft Windows 2000 options.

More information

Related white papers 

bulletWindows 2000 Server Windows Internet Naming Service (WINS) overview

Microsoft support articles

bulletSupport webcast: Windows 2000: WINS and DNS: What's new
bulletSupport webcast: Using WINS and DHCP on Microsoft Windows 2000 clusters

 

bulletHow to install network services such as WINS and DNS in Windows 2000 (Q261321)
bulletRecommend WINS configuration for Microsoft Cluster Server (Q193890)
bulletUsing WINS and DHCP with the Windows 2000 cluster service (Q226796)
bulletHow WINS functions on a cluster server (Q290880)
bulletList of names registered with WINS service (Q119495)
bulletWINS static entry descriptions (Q140064)
bulletVerifying name records in WINS in Windows 2000 (Q225130)
bulletHow to manually add a dynamic WINS entry to a Windows 2000 WINS server (Q233375)
bulletReplacing a WINS static 1c with a dynamic entry (Q199159)
bulletPersonaNonGrata WINS records only displayed six at a time and cannot be sorted by IP address (Q228077)
bulletPersonaNonGrata WINS servers may be added by replication partners without warning (Q228078)
bulletWINS proxy agent functionality (Q121004)
bulletHow WINS lookup works from Windows NT DNS (Q173161)
bulletA description of the Windows Internet Naming System (WINS) records replication table (Q272510)
bulletHow to stop WINS replication in Windows 2000 (Q234052)
bulletHow to manually recreate a WINS database (Q168712)
bulletConverting a WINS database for use on a Windows 2000 server (Q215392)
bulletHow to upgrade a WINS or DHCP database to Windows 2000 (Q215416)
bulletRestoring a Windows 2000 WINS database from other backup sources (Q244810)
bulletBacking up a WINS database on a Windows 2000 cluster (Q283290)
bulletWINS does not back up database during shutdown (Q255283)
bulletHow to use Jetpack.exe to compact a WINS or DHCP database (Q145881)
bulletHow to use the jetpack utility on a clustered WINS/DHCP database (Q283251)
bulletHow to set the starting version count for WINS in Windows 2000 (Q233486)
bulletWINS registry parameters for Windows 2000 (Q251067)

 

bulletHow to prevent Windows 2000 from assigning WINS and DNS addresses to RAS clients (Q232651)
bulletRAS servers using TCP/IP and dynamic addresses need WINS (Q161427)
bulletSecondary WINS server is lost after DHCP inform packet is received on Remote Access Connection (Q296718)

 

bulletError message 'Cannot find the WINS server' occurs when accessing WINS database (Q287727)
bulletWINS manager shows WINS servers that are not present (Q135844)
bulletWINS manager causes error message in Windows 2000 (Q255781)
bulletWINS manager does not display all reservations in a mixed environment (Q279822)
bulletWINS mmc displays incorrect ip address on multi-homed server (Q224449)
bulletServers do not refresh NetBIOS name registration with WINS (Q277695)
bulletWINS entries fail to replicate to WINS partner (Q137964)
bulletReplication partner problems in WINS administration tool (Q222922)
bulletWINS statistics show more failures than successes (Q151475)
bulletUnable to remotely administer WINS servers across routers (Q174396)
bulletWINS server sends IGMP packets on startup (Q151761)
bulletWINS client workstation [00h] entry remains active on WINS server after client shutdown (Q269188)
bulletWINS clients may send name refresh requests to multihomed WINS servers at 2 or 8 minute intervals (Q247194)
bulletEvent id: 1008 after upgrading Windows NT 4.0 DHCP or WINS server to Windows 2000 (Q247135)
bulletEvents 4102 and 9 appear during WINS replication on Windows 2000 (Q289189)
bulletEvent id 4202 attempting WINS replication across router (Q174395)
bulletEvent id 4301 and 4165 when you start WINS (Q240708)
bulletWINS service stops or does not start and Event id 4319 or 4164 is logged (Q261125)
bulletErr msg: WINS could not come up due to missing/corrupt... (Q225346)
bulletWINS export list leaks memory at 1 MB per minute (Q254387)
bulletNetwork monitor incorrectly parses WINS registration TTL (Q272408)
bulletWINS does not come online after cluster failover (Q259593)
bulletWINS Add1BtoCQueries feature aids load-balancing between domain controllers (Q269424)
bulletDHCP enabled WINS client may refresh Netbt name cache frequently (Q294234)
bulletSome WINS and DNS files are not uninstalled with SP1 removal (Q265821)
bulletWINS does not work with file and printer sharing enabled (Q268749)

 

bulletNT4: Browsing a wide area network with WINS (Q120151)
bulletNT4: How to register services in WINS (Q137423)
bulletNT4: WINS database entries that begin with C- (Q147903)
bulletNT4: Setting primary and secondary WINS server options (Q150737)
bulletNT4: Explanation of advanced options in WINS manager (Q167806)
bulletNT4: Setting up WINS replication between untrusting domains (Q168509)
bulletNT4: Values for WINS manager server configuration settings (Q176505)
bulletNT4: Performance tuning WINS and DHCP (Q199160)

Links

bulletIntegrating DNS with WINS (TechNet)
bulletNT4.0 : Wins architecture and capacity planning (Microsoft)
bulletLabmice WINS links
bulletWorking with WINS replication part 1 (BrainBuzz)
bulletWorking with WINS replication part 2 (BrainBuzz)
bulletWINS enhancements in W2K (BrainBuzz)
bulletA world without WINS (BrainBuzz)
bulletHow many WINS servers (Swynk)
bulletThe WINS proxy agent (BrainBuzz)
bulletWorking with WINS replication, part 1 (Brainbuzz)
bulletWINS updates in Windows 2000 (TechRepublic)
bulletWINS FAQ
bullet Recovering WINS (Windows 2000 magazine March 2002)
bulletName resolution in Windows 2000 (Windows 2000 magazine june 2001)
bulletHow to run NT 4.0 Wins manager on Win2K (Windows 2000 magazine)

Last update : 13 February 2002