{"id":2460,"date":"2018-02-07T21:50:29","date_gmt":"2018-02-07T21:50:29","guid":{"rendered":"http:\/\/microsoftgeek.com\/?p=2460"},"modified":"2018-09-06T23:17:57","modified_gmt":"2018-09-06T23:17:57","slug":"configuring-network-load-balancing-in-windows-server","status":"publish","type":"post","link":"https:\/\/microsoftgeek.com\/?p=2460","title":{"rendered":"Configuring Network Load Balancing in Windows Server"},"content":{"rendered":"<p>Services and applications that are affected by high load require technologies to address this issue. Network Load Balancing is a technology that allows system administrators to configure clusters that distribute traffic between several servers. Suppose you have a website that receives a large number of requests and cannot be handled by one server. In this case you would configure a NLB cluster to distribute traffic across multiple web servers and thus ensuring that the website can serve all requests.<\/p>\n<p>In this article I will show you how to configure\u00a0<i>Network Load Balancing (NLB)<\/i>\u00a0within your\u00a0Windows Server infrastructure. For this tutorial I will be using two virtual machines hosted in my VMWare testing environment.<\/p>\n<p>let\u2019s open up the\u00a0<i>Server Manager<\/i>\u00a0console and install the\u00a0<i>Network Load Balancing<\/i>\u00a0feature. Note that this feature must be installed on both servers. Click on\u00a0<i>Add roles and features<\/i>button and skip all pages until you reach the\u00a0<i>Features<\/i>\u00a0section. From the features list select\u00a0<i>Network Load Balancing<\/i>\u00a0and proceed with the installation. Note that Powershell support for NLB will also be installed:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2864 size-full\" title=\"Network Load Balancing Installation\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/network-load-balancing-installation.png\" sizes=\"auto, (max-width: 796px) 100vw, 796px\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/network-load-balancing-installation.png 796w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/network-load-balancing-installation-300x211.png 300w\" alt=\"Network Load Balancing Installation\" width=\"796\" height=\"562\" \/><\/p>\n<p>Once the install operation is completed, open the\u00a0<i>Network Load Balancing Manager<\/i>console from\u00a0<i>Administrative Tools<\/i>.<\/p>\n<p>Within the\u00a0<i>NLB<\/i>\u00a0<i>console<\/i>, click on\u00a0<i>Cluster<\/i>\u00a0from the upper menu and select\u00a0<i>New<\/i>. Now enter the local server IP address and click on\u00a0<i>Connect<\/i>. Select one of the available network interfaces that will be part of the NLB process and proceed with the following section. I\u2019ve added one of my two servers to the cluster, you will need to add the second machine afterwards.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2865 size-full\" title=\"New NLB Cluster Parameters\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/new-nlb-cluster-parameters.png\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/new-nlb-cluster-parameters.png 483w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/new-nlb-cluster-parameters-300x281.png 300w\" alt=\"New NLB Cluster Parameters\" width=\"483\" height=\"454\" \/><\/p>\n<p>In the following section we\u2019ll need to configure the priority of the specified server and the initial host state. Note that you can\u00a0add multiple IP addresses\u00a0for one host. Continue the wizard by pressing the\u00a0<i>Next<\/i>\u00a0button. We\u2019ll need to assign an IP address for the load balancing cluster that is shared between all nodes. This IP address is not physically assigned to a network card and instead a virtual network adapter is created. Note that you can add multiple IPs for load balancing, but the first one will be considered the primary address. For testing purposes I will add a random IP address:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2868 size-full\" title=\"NLB Cluster IP Addresses\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-cluster-ip-addresses.png\" sizes=\"auto, (max-width: 482px) 100vw, 482px\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-cluster-ip-addresses.png 482w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-cluster-ip-addresses-300x281.png 300w\" alt=\"NLB Cluster IP Addresses\" width=\"482\" height=\"453\" \/><\/p>\n<p>The next section is used to configure cluster parameters. Enter the cluster full internet name (in my example\u00a0<i>cluster1.ppscu.com<\/i>) and the cluster\u2019s operation mode. A NLB cluster must operate in one of the following modes:<\/p>\n<p><i>Unicast<\/i>\u00a0\u2013 the MAC address of the cluster virtual network adapter is shared with all cluster nodes. If your servers have only one network adapter then the MAC address of the VNA replaces the MAC address of the physical interface. By using only one network adapter on each server, communication will be made only with devices that are part of the same subnet as the given node. It\u2019s recommended that you use two network adapters for each node, one used for load balancing and the other one for server management.<\/p>\n<p><i>Multicast<\/i>\u00a0\u2013 the server will retain its original MAC and IP address while also using the MAC and IP address of the cluster\u2019s virtual network adapter. All devices from all subnets can communicate with the node, but multicasting is used for cluster communication.<\/p>\n<p><i>IGMP Multicast<\/i>\u00a0\u2013 uses the\u00a0<i>IGMP<\/i>\u00a0protocol (<i>Internet Group Management Protocol<\/i>) to increase network performance by using multicast clients registered to a IGMP multicast server.<\/p>\n<p>From the three available options, choose multicast and proceed with the next section:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2869 size-full\" title=\"NLB IGMP Multicast\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-igmp-multicast.png\" sizes=\"auto, (max-width: 482px) 100vw, 482px\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-igmp-multicast.png 482w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-igmp-multicast-300x282.png 300w\" alt=\"NLB IGMP Multicast\" width=\"482\" height=\"454\" \/><\/p>\n<p>From the port rules section we configure how traffic is managed on the NLB cluster. By specifying the designated port or port range you filter packets so that only desired traffic is received by the NLB cluster:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2871 size-full\" title=\"NLB Specify Port or Port Range\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-specify-port-or-port-range.png\" sizes=\"auto, (max-width: 483px) 100vw, 483px\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-specify-port-or-port-range.png 483w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-specify-port-or-port-range-300x281.png 300w\" alt=\"NLB Specify Port or Port Range\" width=\"483\" height=\"454\" \/><\/p>\n<p>Rules can be created on each of the cluster\u2019s IP address. By pressing the\u00a0<i>Edit<\/i>\u00a0button we configure the\u00a0<i>port range<\/i>,\u00a0<i>protocol<\/i>\u00a0(<i>TCP<\/i>\u00a0or\u00a0<i>UDP<\/i>) and the\u00a0<i>filtering mode<\/i>. There are three available filtering methods, as follows:<\/p>\n<p><i>Multiple host<\/i>\u00a0\u2013 used to configure all nodes within the NLB cluster to respond to requests. The node\u2019s affinity determines which of the cluster\u2019s servers handles the traffic. There are three options available here:<\/p>\n<p>\u00b7\u00a0<i>None<\/i>\u00a0\u2013 traffic is distributed between all cluster nodes<\/p>\n<p>\u00b7\u00a0<i>Single<\/i>\u00a0\u2013 uses all nodes to handle NLB traffic, but a node will receive all traffic for a specific request. This is used when stateful connections are used and is the default option. The timeout parameter is configured to discard connections once a connection passes a certain period of time.<\/p>\n<p>\u00b7\u00a0<i>Network<\/i>\u00a0\u2013 redirects client requests to the closest available node. Just like netmask ordering, requests are sent to the appropriate node based on the subnet of the client.<\/p>\n<p><i>Single host<\/i>\u00a0\u2013 in this mode the traffic that matches a filtering rule will be handled by one node only.<\/p>\n<p><i>Disable this port range<\/i>\u00a0\u2013 this mode is used to block the traffic sent on the specified ports.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2867 size-full\" title=\"NLB Add or Edit Port Rule\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-add-or-edit-port-rule.png\" sizes=\"auto, (max-width: 371px) 100vw, 371px\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-add-or-edit-port-rule.png 371w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-add-or-edit-port-rule-241x300.png 241w\" alt=\"NLB Add or Edit Port Rule\" width=\"371\" height=\"460\" \/><\/p>\n<p>The newly created node will appear in the NLB Manager console. We will add the second server by\u00a0<i>right clicking<\/i>\u00a0the cluster and selecting\u00a0<i>Add Host to Cluster:<\/i><\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2866 size-full\" title=\"NLB Add Host to Cluster\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-add-host-to-cluster.png\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-add-host-to-cluster.png 1074w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-add-host-to-cluster-300x172.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-add-host-to-cluster-1024x590.png 1024w\" alt=\"NLB Add Host to Cluster\" width=\"1074\" height=\"619\" \/><\/p>\n<p>Now you will need to follow the same procedure as we did earlier for the first node. Once the wizard is completed, the second node will be added to the NLB cluster.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-2870 size-full\" title=\"NLB Manager Add Node to Cluster\" src=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-manager-add-node-to-cluster.png\" sizes=\"auto, (max-width: 1074px) 100vw, 1074px\" srcset=\"https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-manager-add-node-to-cluster.png 1074w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-manager-add-node-to-cluster-300x173.png 300w, https:\/\/www.poweradmin.com\/blog\/wp-content\/uploads\/2014\/11\/nlb-manager-add-node-to-cluster-1024x592.png 1024w\" alt=\"NLB Manager Add Node to Cluster\" width=\"1074\" height=\"621\" \/><\/p>\n<p>With this NLB cluster we can now distribute traffic destined for our applications between these two hosts. I\u2019ve used this type of configuration when balancing traffic between\u00a0two IIS servers. The port rules where handling only HTTP (port 80) and HTTPS (port 443) traffic. Most enterprises use dedicated network devices for load balancing such as Netscaler, Cisco Ace, etc, but it\u2019s good to remember that Windows Server Editions can support this feature as well. Hope this article will serve you well in understanding how this technology works and how to install and configure NLB clusters.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Services and applications that are affected by high load require technologies to address this issue. Network Load Balancing is a technology that allows system administrators to configure clusters that distribute traffic between several servers. Suppose you have a website that receives a large number of requests and cannot be handled by one server. In this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[48,63],"tags":[],"class_list":["post-2460","post","type-post","status-publish","format-standard","hentry","category-microsoft-windows-server-2012","category-server-2016-2016"],"_links":{"self":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2460","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2460"}],"version-history":[{"count":1,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2460\/revisions"}],"predecessor-version":[{"id":2461,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=\/wp\/v2\/posts\/2460\/revisions\/2461"}],"wp:attachment":[{"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2460"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2460"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/microsoftgeek.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2460"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}