Configure NLB network load balancing in virtual machines

Source: Internet
Author: User

I usually work on APO and seldom touch Core I/O. Recently, due to the needs of a project, I need to configure AD, DNS, MOSS + NLB, SQL Server + Cluster. This is my weakness. Since the task has arrived, I still have to stick to my head. Before configuring the test environment on the client side, I should first conduct an experiment on the Virtual Machine to see how to configure the test environment. The official documents are much simpler and can be completed in just a few steps, however, in actual configuration, various problems may need to be solved. Now let me talk about how to configure NLB.

Preparations:

I first created two differential Disks Based on a clean windows Virtual Machine (VM), named webserver01 and webserver02 respectively, and modified the computer name and then restarted.

I am not planning to use AD in this experiment environment, so neither machine is added to the domain. Both machines are based on IIS. I modified the IIS hosts page, access different machines to display different content (this is how to change it as long as the IIS of the two machines displays different content under the same URL ), in this way, it is easy to verify that my NLB configuration is successful.

The fixed IP address of webserver01 is 192.168.0.7, the mask is 3 255, and the gateway 192.168.0.1

The fixed IP address of webserver02 is 192.168.0.8, the mask is 3 to 255, and the gateway 192.168.0.1

I plan to configure the NLB IP address as 192.168.0.200.

Specific operations:

(1) Open Network Load Balancing manager in management tools on machine 01 and select "new" under the "cluster" menu.

(2) In the pop-up "Cluster Parameters" window, enter the cluster IP address. Here we enter 192.168.0.200, and then enter the subnet mask, the complete Internet name is the domain name we want to set for NLB. We will use this domain name to access NLB later. Here we can enter it casually, such as web.shtest.com. The cluster mode is "unicast". We don't need to remotely control it here.

(3) Click the "Next" button to enter the "cluster IP Address". You do not need to modify the "Next" button to enter the "port Rules.

(4) Click "Next" to go to the "connection" Page. In the "host" text box, enter our current host webserver01, or enter an IP address. Click "Connect", select the IP address below, and next, select host parameters, and use the default one.

(5) Click "finish" to create a network load balancing cluster and add the current host to the cluster,

At this time, we can ping 192.168.0.200 on the client and access http: // 192.168.0.200 to access iis on the 01 server.

Configure Server 02 and add it to the cluster. This process is simple, but I have encountered several problems and I will also list them.

(1) Open the network load balancing manager on server 02 and click the "connect to existing" option in the "cluster" menu.

(2) In the "host" text box, enter the host webserver01 or IP192.168.0.7 that we want to connect to. Click "Connect" and the system will ask you to enter the username and password. After I enter the correct username and password, the system reported an error 0x800706D5. I found the cause on the Internet. Some said that asp was not enabled in IIS. I enabled asp in IIS on both machines, and then connected again and reported an error. I tried again, and some said that the passwords were inconsistent. Because I didn't set the password for both servers, it was a blank password, so I changed the administrator password for webserver01 to 123, but 02 the password of the server is still blank, and the password is inconsistent. So I changed the passwords of both machines to 123, and then restarted the two servers.

(3) After the connection is successful, you can see that the cluster has a server webserver01, followed by adding the server 02 to the cluster. Right-click web.shtest.com and choose add host to cluster from the context menu.

(4) In the "host" text box, enter webserver02 and click the "Connect" button. In this case, the system reports an error: "No interface is available for installing a new cluster ". I checked it online because both of my servers are copies of the same virtual machine, so some information about the NIC is the same, so I have to detach the NIC of server 02, then reinstall. Unmount the NIC in "device management", and then search for the hardware to reinstall the NIC.

(5) After installing the NIC, You need to reset the fixed IP address. Set the IP address and try again to add the 02 server to the cluster. The next "Next" operation is to use the default value. Finally, we added server 02 to NLB. See

Next, let's test the effect of our cluster. In the local browser, enter http: // 192.168.0.200. At this time, the iis content on the 01 server appears, then we stop the VM on server 01 and refresh the browser. At this time, we can see the content in IIS on server 02. We can access the two servers through the IP address 200. Congratulations!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.