Windows Internet Name Service

Previous Topic Next Topic

Pulling WINS Database Entries by Version Number

The WINS server database maintains a table that stores the IP addresses and owner IDs of remote WINS servers that own entries in the local database.

Figure 7.13    A Sample Replication Pattern
Enlarge figure

Figure 7.13 A Sample Replication Pattern

Based on an example replication pattern like that shown in Figure 7.13, a table mapping IP addresses to owner IDs for a sample server — again called WINS-A—would contain entries like those shown in Table 7.16.

Table 7.16 Example Remote WINS Server IP Addresses and Owner IDs

IP address Owner ID
192.168.23.7 0
192.168.24.8 1
192.168.25.7 2
192.168.26.4 3

During WINS initialization, the WINS server scans the NetBIOS name–to–IP address mapping table to determine the maximum version number corresponding to each owner registered in its database. Initializing it with the information retrieved, the WINS server creates a table in memory that maps push partner IDs to version numbers. This table is never committed to the database. Example WINS server WINS-A creates a table like that shown in Table 7.16; other servers will have different tables.

As you might expect, the push partner–to–version number table contains an entry for each push partner, and each entry contains the maximum version ID found for all owners in the local database of the push partner. For example, if the local WINS server has an owner ID of 0, then given the preceding example IP address–to–owner ID mapping table, the push partner–to–version number mapping table might look like that shown in Figure 7.14.

Figure 7.14    Example Push Partner–to–Version Number Table
Enlarge figure

Figure 7.14 Example Push Partner-to-Version Number Table

Figure 7.14 shows that the local database of the WINS server, identified by owner ID 0, contains entries owned by three WINS servers with owner IDs of 0, 1, 2. The highest version numbers for the entries are 100, 900, and 630, respectively.

WINS server WINS-A is now ready to determine whether it needs to update its database. It sends a message to each of its push partners, asking it to respond with the highest version numbers pertaining to IP addresses in its local database. As push partners respond, the WINS server fills and expands its own table. The table might expand to fill more columns, each corresponding to another server.

For example, if WINS server WINS-B at IP address 192.168.24.8 (owner ID 1) responds with a record for WINS server WINS-D at IP address 192.168.26.4, WINS-A adds a column to the local push partner–version number mapping table for indirect push partner WINS-D with an owner ID 3. At the same time, IP address and owner ID WINS-D are stored in the IP address–to–owner ID mapping table. The relevant cells in the new table are initialized. After WINS-B, at 192.168.24.8, responds with the following three records:

192.168.24.8999

192.168.26.4700

192.168.23.789


the WINS server adds a record containing IP address 192.168.26.4 and owner ID 3 to the IP address–to–owner ID mapping table and updates the local push partner–to–version number mapping table to resemble that shown in Figure 7.15.

Figure 7.15    Example Push Partner–to–Version Number Table After Response from WINS-B
Enlarge figure

Figure 7.15 Example Push Partner-to-Version Number Table After Response from WINS-B

After all push partners have responded, the IP address–to–version number mapping table contains the information shown in Figure 7.16.

Figure 7.16    Example Push Partner–to–Version Number Table After All Responses
Enlarge figure

Figure 7.16 Example Push Partner-to-Version Number Table After All Responses

The WINS server examines this table to determine which push partner has the latest data for each owner. A WINS server always has the highest version ID for entries it owns. For example, in Figure 7.16, the entry with the ID 0 is recorded in three databases: 0, 1, and 2. Because the entry is owned by WINS-A, the entry for 0,0 has the highest version ID number (100) for that entry.

However, some WINS servers might not be partners of the requesting pull partner. The WINS server determines the starting version ID required to synchronize the local database, and requests that the push partner send the database records with version IDs that are equal or greater. If a push partner has the latest data for more than one owner, a single request can be sent to retrieve the records for all. Of course, in this simple example, the WINS server that has the most current data for a database never changes. When WINS-A pulls data, WINS-B has the latest data for itself and WINS-D; WINS-C has the latest data for itself. In a more complex model, the replication paths might form loops, and replication takes place at differing intervals.

When the push partner receives a request from another WINS server—a pull partner—it retrieves the required records from its local database and sends them to the requesting server. The push partner retrieves records by seeking the record that starts the range and moving sequentially over the records, retrieving them, until the push partner retrieves the last record in the range. When the pull partner receives the data from the push partners, the pull partner updates its database.

All entries with version IDs greater than those in the pulling database are replicated. However, not every change to a database increments a record's version ID.

© 1985-2000 Microsoft Corporation. All rights reserved.