Achyut 的个人资料Achyut's space照片日志列表更多 ![]() | 帮助 |
|
|
9月27日 I am in trouble in computer networkinghttp://www.tutorialoutpost.com
show tocImplementing the WINS Service
On This Page Why Use WINS? The second reason for using WINS is that it's dynamic. As computers attach to and detach from the network, the WINS databases are updated automatically. This means that you don't have to create a static LMHOST file that the computers can read to determine IP addresses. Top of page Top of page When a WINS client comes on line, it already knows about the WINS server, because the WINS server's IP address is configured within the client's TCP/IP configuration, as shown in Figure A. Once the client knows the location of a WINS server, it registers its NetBIOS name and IP address with the WINS server.
Figure A: Each client's TCP/IP configuration points to a WINS server.
Although this process sounds simple, there are many factors that can complicate things. For example, you may be wondering what happens if a computer tries to register a NetBIOS name that's already in use. Keep in mind that the WINS server handles requests dynamically. The very nature of a dynamic database suggests that each computer's use of a given NetBIOS name is temporary. For example, when a client comes on line, it registers its NetBIOS name with a WINS server. When that computer is shut down, it sends another message to the WINS server indicating that the name is no longer in use. This makes it possible for another computer to use that name. Now, suppose a computer comes on line and tries to register a NetBIOS name that's currently registered. If a duplicate name is found, the WINS server sends a challenge to the IP address of the computer that originally registered the name. If there's no response, the challenge will be sent a total of three times. If the registered owner is multihomed, the challenge will be sent to each IP address that the computer registered. If the current owner responds to the challenge, the WINS server will deny the client use of the name. Otherwise, WINS will revoke ownership of the name from the currently registered computer and grant it to the new computer. Although WINS may sound like a great way to reduce broadcast traffic, you may be wondering what will happen to your network if the WINS server drops offline. Fortunately, your network won't come to a grinding halt. As you can see in Figure A, each WINS client can be configured to use a backup WINS server. If neither WINS server is available, the clients will begin using broadcasts to resolve name information until a WINS server becomes available. Top of page Each WINS server can handle about 4,500 name queries per minute. However, you can expect about a 25 percent increase in performance for each extra processor that you add to a WINS server. If you have appropriate hardware, Microsoft states that a WINS server and a backup WINS server working together can service at least 10,000 WINS clients. The WINS service must run on a Microsoft Windows NT Server with a static IP address. To install the WINS service, first select a server with a static IP address and open Control Panel. Next, double-click on Control Panel's Network icon. When you see the Network properties sheet, click the Services tab. Then, click Add to open the Select Network Services dialog box. Next, select the Microsoft Windows Internet Name Service from the Network Service window and click OK. At this point, Microsoft Windows NT will ask for the location of your Microsoft Windows NT Server CD. Specify the path to your installation files and click the Continue button. When Microsoft Windows NT copies the necessary files, click OK to close the Network properties sheet. Microsoft Windows NT will then update the necessary bindings and ask you to reboot the server. When the server reboots, you can configure your clients and begin using the WINS service. Top of page As you may recall, WINS traffic is routable. The reason that NetBIOS communication between the two networks wouldn't work is that the two networks have no knowledge of each other. All of the PCs in New York are registering with WINS servers in New York. Likewise, computers in Los Angeles are registering with WINS servers in Los Angeles. If a computer in New York wanted to communicate with a computer in Los Angeles, it would check the WINS database for the computer name. Since the computers in Los Angeles aren't registered in the database, communications would fail. The solution to this problem is to make the two networks know about each other. This is done through database replication. This means that the WINS servers in each location can exchange information with each other. Replication works through push and pull partners. A push partner tells the pull partner that the database has changed. The pull partner then requests all the changes from the push partner. A WINS server can be configured as both a push and a pull server. Therefore, it's possible for two servers to replicate any change that happens on one server to the other server. If the servers in New York and Los Angeles that we used in our earlier example were configured as push and pull partners, both WINS servers would have knowledge of WINS clients at both locations. You can configure replication by selecting the Replication Partners command from WINS Manager's Server menu. Top of page nbtstat –R Doing so purges the name cache. Next, go to the Start menu and select Programs | Administrative Tools | WINS Manager. When you do, you'll see WINS Manager. Now, select the Show Database command from WINS Manager's Mappings menu. When you do, you'll see the WINS database's contents, as shown in Figure B.
Figure B: You can use WINS Manager to view the contents of the WINS database.
When you're looking at the contents of the database, each line begins with an icon. If the icon is a picture of a computer, it indicates that the entry is a unique name. If the icon shows three computers overlapping, it indicates that the computer is multihomed. You may have also noticed the A and S columns. If there's a check in the A column, it indicates an active connection from a computer that acquired its IP address from a DHCP server. If there's a dash in the A column, it means that the connection is no longer active and will soon be removed from the database. A checkmark in the S column indicates a static IP address. Top of page To back up the WINS database, select the Back Up Database command from WINS Manager's Mappings menu. Next, specify a location for the backup files and click OK. WINS will then automatically back up its database every 24 hours. Should the WINS database become corrupted, simply stop and restart the WINS service. If WINS detects the corruption, it will automatically restore the most recent backup. If WINS doesn't detect the corruption, you can force a restore by selecting the Restore Database command from WINS Manager's Mappings menu. Although database backups are automatic, it's not a bad idea to occasionally back up the WINS section of the registry. To do so, open the Registry Editor and navigate to HKEY_LOCAL_MACHINE | SYSTEM | CURRENTCONTROLSET | SERVICES | WINS. Next, select the Save Key command from the Registry menu. In the Save Key dialog box, specify the path that you're using for WINS backup files. Top of page NET STOP WINS These commands stop the WINS service and copy the WINS database to a file called TEMP.MDB, then the TEMP.MDB file is compacted. Once the file has been compacted successfully, it's copied to WINS.MDB and the temp file is deleted. Finally, the WINS service is restarted. Top of page Brien M. Posey is an MCSE and a freelance technical writer. He also works as a network engineer for the Department of Defense. You can contact him via e-mail at Brien_Posey@xpressions.com. (Because of the large volume of e-mail that he receives, it's impossible for him to respond to every message. However, he does read them all.)
We at Microsoft Corporation hope that the information in this work is valuable to you. Your use of the information contained in this work, however, is at your sole risk. All information in this work is provided "as -is", without any warranty, whether express or implied, of its accuracy, completeness, fitness for a particular purpose, title or non-infringement, and none of the third-party products or information mentioned in the work are authored, recommended, supported or guaranteed by Microsoft Corporation. Microsoft Corporation shall not be liable for any damages you may sustain by using this information, whether direct, indirect, special, incidental or consequential, even if it has been advised of the possibility of such damages.
Manage Your Profile |Contact Us |Newsletter |
|
|