NLB Network Load Balancing for Windows server 2012 servers

Source: Internet
Author: User

Today, we are going to introduce NLB, Network Load Balancing

Network Load Balancing, referred to as NLB, allows you to propagate incoming requests to up to 32 servers, which means you can use up to 32 servers to share external network request services. Network Load Balancing ensures that even under heavy loads they can respond in a very fast time.

Network Load Balancing allows clients to access the cluster with a logical Internet name and virtual IP address (also known as the Cluster IP address), while preserving the name of each computer. Network Load Balancing only one IP address (or domain name) is required for external access.

When a server failure in Network Load Balancing is not available, Network Load Balancing automatically detects unavailable servers and reassign client traffic to the remaining servers. This makes the server highly available, and can increase the number of Network Load Balancing servers based on the increase in network traffic.

Here's the experiment today.

Example: Implementing Network Load Balancing with Windows Server 2012 and enabling high availability of Web sites

Is the topology diagram of today's experiment, with two servers to achieve Network Load balancing

First talk about today's experimental environment, SERVER01 is domain control, server02 and server03 do load balancing and install Web services, SERVER05 is a client, for testing, SERVER02 and SERVER03 Two servers require two network cards, one for communication, To make a heartbeat line, as

650) this.width=650; "title=" 2015-06-04_103341 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_103341 "src=" http://s3.51cto.com/wyfs02/M01/6D/FA/wKiom1Vv4YDR1EDaAAEW9RysKss465.jpg "height=" 359 "/ >

Step 1: Install the NLB role

Open Server Manager, select Add Roles and Features

650) this.width=650; "title=" 2015-06-03_161436 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-03_161436 "src=" http://s3.51cto.com/wyfs02/M02/6D/FA/wKiom1Vv4YDxx5EJAAGNwrgQ_E0823.jpg "height=" 433 "/ >

Check server information

650) this.width=650; "title=" 2015-06-03_161502 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-03_161502 "src=" http://s3.51cto.com/wyfs02/M00/6D/F5/wKioL1Vv4yCgGIX8AAGw0MfrnGg272.jpg "height=" 460 "/ >

Select Network Load Balancing in the feature

650) this.width=650; "title=" 2015-06-03_161541 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-03_161541 "src=" http://s3.51cto.com/wyfs02/M01/6D/F5/wKioL1Vv4yDyVfRBAAHh-mImDww573.jpg "height=" 458 "/ >

Add the required features and complete the installation

650) this.width=650; "title=" 2015-06-03_161602 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-03_161602 "src=" http://s3.51cto.com/wyfs02/M02/6D/F5/wKioL1Vv4yCRmHg8AAGmgpuhZMM068.jpg "height=" 456 "/ >

Step 2: Configure NLB

Open Server Manager, click Tools, select Network Load Balancing Manager

650) this.width=650; "title=" 2015-06-03_161719 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-03_161719 "src=" Http://s3.51cto.com/wyfs02/M00/6D/F5/wKioL1Vv4yDDuk2KAAHXqTXAdQY969.jpg "height=" 393 "/ >

Right-click Network Load Balancing Manager, select New cluster

650) this.width=650; "title=" 2015-06-04_102616 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_102616 "src=" http://s3.51cto.com/wyfs02/M01/6D/F5/wKioL1Vv4yCChFcJAAE9FovUkio600.jpg "height=" 441 "/ >

Enter the name of the server to be used for Network Load Balancing, click the link, select the IP address for the communication

650) this.width=650; "title=" 2015-06-04_102955 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_102955 "src=" http://s3.51cto.com/wyfs02/M02/6D/F5/wKioL1Vv4yHRwWl4AAEU4sHHwzs777.jpg "height=" 484 "/ >

Select priority, typically the first server is 1, the second one is 2, and so on

650) this.width=650; "title=" 2015-06-04_103030 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_103030 "src=" http://s3.51cto.com/wyfs02/M00/6D/F5/wKioL1Vv4yGiWcGxAAEONOfPQDY324.jpg "height=" 484 "/ >

Click Add to add the cluster IP address

650) this.width=650; "title=" 2015-06-04_103101 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_103101 "src=" http://s3.51cto.com/wyfs02/M01/6D/F5/wKioL1Vv4yGyBMI2AADkm-Gx5is739.jpg "height=" 484 "/ >

Enter the cluster IP address, click OK

650) this.width=650; "title=" 2015-06-04_103144 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_103144 "src=" http://s3.51cto.com/wyfs02/M02/6D/F5/wKioL1Vv4yGzxqhvAAFpkambFjo760.jpg "height=" 484 "/ >

Check the cluster IP configuration, note the cluster cluster operation mode option, where multicast is selected, click Next

Here, let's introduce a little bit about the operation mode of the cluster

Cluster operation mode:

Unicast: The MAC address of all nodes is replaced with a unified cluster MAC address

Multicast: Each node uses its own MAC address

650) this.width=650; "title=" 2015-06-04_121057 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_121057 "src=" http://s3.51cto.com/wyfs02/M00/6D/F5/wKioL1Vv4yHzPI1EAADwbSa0xb8384.jpg "height=" 484 "/ >

Configure port rules, lab environment, default, click Finish

650) this.width=650; "title=" 2015-06-04_103223 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_103223 "src=" http://s3.51cto.com/wyfs02/M01/6D/F5/wKioL1Vv4yKy5eNlAAE71Xt4p4E496.jpg "height=" 484 "/ >

This allows us to configure the completion of a server, let's add a server to the cluster, right-click the cluster IP address, select Add Host to cluster

650) this.width=650; "title=" 2015-06-04_103443 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_103443 "src=" http://s3.51cto.com/wyfs02/M02/6D/F5/wKioL1Vv4yLz-bNlAAHcfl06c_o947.jpg "height=" 441 "/ >

Enter the name of another host SERVER03, click the link, select the IP address to use for communication

650) this.width=650; "title=" 2015-06-04_103514 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_103514 "src=" http://s3.51cto.com/wyfs02/M00/6D/F5/wKioL1Vv4yLzoMTHAAELVEQ5a-0693.jpg "height=" 484 "/ >

You'll find that the priority here is 2, and you can't choose 1, because the priority is 1, the server that was the first to join in.

The rest of the configuration is the same as just a few add cluster IP addresses, click Next, and complete the configuration

650) this.width=650; "title=" 2015-06-04_103550 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_103550 "src=" http://s3.51cto.com/wyfs02/M01/6D/F5/wKioL1Vv4yLgcOA3AAEKw0R-Xio925.jpg "height=" 484 "/ >

Configured Network Load Balancing for example, in this case, it is not configured to complete, net load balancing will take effect immediately, he will have a configuration process, really complete the configuration of the state such as

650) this.width=650; "title=" 2015-06-04_113548 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_113548 "src=" http://s3.51cto.com/wyfs02/M02/6D/F5/wKioL1Vv4yLiNAhtAAH30L5AjoI426.jpg "height=" 441 "/ >

Now let's test it.

Find a client: Long ping 192.168.10.100

650) this.width=650; "title=" 2015-06-04_121343 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_121343 "src=" http://s3.51cto.com/wyfs02/M02/6D/FA/wKiom1Vv4YbAJIIoAAFa8RjjNXI138.jpg "height=" 422 "/ >

Then, we disconnect the SERVER02 network card, simulate the server failure, unable to communicate

650) this.width=650; "title=" 2015-06-04_121355 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_121355 "src=" http://s3.51cto.com/wyfs02/M00/6D/FA/wKiom1Vv4YbCdnwvAAExD2bkgE0588.jpg "height=" 442 "/ >

Then we look at the long ping client, and we find that it's a broken one, and we're communicating normally.

650) this.width=650; "title=" 2015-06-04_121413 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_121413 "src=" http://s3.51cto.com/wyfs02/M01/6D/FA/wKiom1Vv4YfhrjxhAAMzpXeHQH0139.jpg "height=" 422 "/ >

We link the SERVER02 network card, disconnect the SERVER03 network card

650) this.width=650; "title=" 2015-06-04_121449 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_121449 "src=" http://s3.51cto.com/wyfs02/M02/6D/FA/wKiom1Vv4YeTbsJtAAEd-vGXaH8110.jpg "height=" 433 "/ >

Check the long ping client again to find that it still communicates normally

650) this.width=650; "title=" 2015-06-04_121506 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_121506 "src=" http://s3.51cto.com/wyfs02/M00/6D/FA/wKiom1Vv4YeSnqtvAANKEItE4LQ664.jpg "height=" 423 "/ >

This means that our Network Load balancing is normal, and only if the Network Load Balancing is normal, we can use to achieve the high availability of the Web site.

Let's make the Web site highly available

We are now server01 to create a new shared folder and put it on our website.

650) this.width=650; "title=" 2015-06-04_125734 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_125734 "src=" http://s3.51cto.com/wyfs02/M01/6D/FA/wKiom1Vv4Yfzr_riAAD_5-irXKQ525.jpg "height=" 484 "/ >

Then install IIS services on Server02 and SERVER03, and configure the IIS server

650) this.width=650; "title=" 2015-06-04_125945 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_125945 "src=" http://s3.51cto.com/wyfs02/M02/6D/F5/wKioL1Vv4ySS1iFXAAElyMrZ-k0656.jpg "height=" 484 "/ >

IIS configuration is the same on Server02

650) this.width=650; "title=" 2015-06-04_130309 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_130309 "src=" http://s3.51cto.com/wyfs02/M00/6D/F5/wKioL1Vv4ySAO-P5AAEwWj_9xeM483.jpg "height=" 484 "/ >

After the configuration is complete, we now have a browser access to the http://192.168.10.100 on the client

650) this.width=650; "title=" 2015-06-04_124447 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_124447 "src=" http://s3.51cto.com/wyfs02/M01/6D/F5/wKioL1Vv4yTQVBSlAADVvlsI4UU688.jpg "height=" 313 "/ >

Then disconnect the SERVER02 network card and re-access

650) this.width=650; "title=" 2015-06-04_124521 "style=" border-top:0px;border-right:0px;background-image:none; border-bottom:0px;padding-top:0px;padding-left:0px;border-left:0px;padding-right:0px; "border=" 0 "alt=" 2015-06-04_124521 "src=" http://s3.51cto.com/wyfs02/M02/6D/F5/wKioL1Vv4ySSwWHtAADiCJGBcd4879.jpg "height=" 315 "/ >

We found that the normal access is still available to this Web server through NLB for high availability even if the configuration is complete.

Gaga ~ See you next time!

This article is from the "Zhangxiao C" blog, be sure to keep this source http://zhangcong.blog.51cto.com/10005154/1658450

NLB Network Load Balancing for Windows server 2012 servers

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.