Windows 2012 Clustering : Network Load Balancing (NLB) ,How To , Step by Step

Now that Windows 2012 is here and you want to test if the OS is as good as you want and see if the application is still running on windows 2012.

In this case We build a NLB website easy with just the basic steps any one can do this.

First we add the roles and features to the servers that we are going to use for the NLB.

Select the Features “ Network Load Balancing ” only this you need for NLB

 

 

clip_image002

After this I look at my NIC’s most important that you use two nic’s in a VM this is easy in a physical box now days there are at least 2 nic’s in the server. use them.

I gave the Nic’s an IP that is not in the same subnet as the production lan, and also you can use a different VLAN for the NLB traphic but if you want to use it on your lan than you need routing !

NLB node 01

clip_image004 clip_image006 For Quick see what my nic is doing I give them names

clip_image008  clip_image010

Now that I added the features I can open the MMC and right click to create a new cluster

image now that we create a new cluster We type in the IP adress of the first NLB node name

clip_image014 There are two IP addresses , one public IP and One NLB IP

Remember this is not the Cluster NLB IP but the node IP , Select the IP and choose Next

 

clip_image016  clip_image018

Now we can create the cluster IP choose ADD and fill in the IP address that will be used for the CLUSTER NLB

clip_image020 clip_image022

You can use multiple IP’s the work in the NLB , that way you can run multi sites on one NLB management but all on different IP’s / FQDN names / DNS. and on different ports. or settings

clip_image024 Now I choose a FQDN for the NLB cluster name

clip_image026 clip_image028 clip_image030

I don’t want to balance all the ports , just the ports that I need in this case port 80.

clip_image032 clip_image034 Now that the cluster is ready  ( one node ) we can do the properties of the cluster

image clip_image038

I add a second IP to the cluster

clip_image040 clip_image042

clip_image044 clip_image046

as you can see I use a different port for this IP

clip_image048 clip_image050

clip_image052 Now that I have two IP’s and on different ports I’m ready to go.

image Now a second nlb node

clip_image056clip_image058clip_image060

 

Now that the clusternode is joined you can see here the cluster nlb IP’s

clip_image062 clip_image064

clip_image066 

Both nodes are now joined to the nlb cluster and we can build a nlb website

image clip_image068

 

image as you can see the site runs only on port 80.

 

Now your NLB cluster is ready for productions

Author: Robert Smit [MVP]

Robert Smit is Senior Technical Evangelist and is a current Microsoft MVP in Clustering as of 2009. Robert has over 20 years experience in IT with experience in the educational, health-care and finance industries. Robert’s past IT experience in the trenches of IT gives him the knowledge and insight that allows him to communicate effectively with IT professionals who are trying to address real concerns around business continuity, disaster recovery and regulatory compliance issues. Robert holds the following certifications: MCT - Microsoft Certified Trainer, MCTS - Windows Server Virtualization, MCSE, MCSA and MCPS. He is an active participant in the Microsoft newsgroup community and is currently focused on Hyper-V, Failover Clustering, SQL Server, Azure and all things related to Cloud Computing and Infrastructure Optimalization. Follow Robert on Twitter @ClusterMVP Or follow his blog https://robertsmit.wordpress.com Linkedin Profile Http://nl.linkedin.com/in/robertsmit Robert is also capable of transferring his knowledge to others which is a rare feature in the field of IT. He makes a point of not only solving issues but also of giving on the job training of his colleagues. A customer says " Robert has been a big influence on our technical staff and I have to come to know him as a brilliant specialist concerning Microsoft Products. He was Capable with his in-depth knowledge of Microsoft products to troubleshoot problems and develop our infrastructure to a higher level. I would certainly hire him again in the future. " Details of the Recommendation: "I have been coordinating with Robert implementing a very complex system. Although he was primarily a Microsoft infrastructure specialist; he was able to understand and debug .Net based complext Windows applications and websites. His input to improve performance of applications proved very helpful for the success of our project

37 thoughts on “Windows 2012 Clustering : Network Load Balancing (NLB) ,How To , Step by Step”

  1. it can be if your nics are on this subnet. example lan nic is 10.x and nlb nic is 192.x so nlb is 192.168.1.1 make sure your router is getting this.

  2. Hi can we configure this on two different desktop’s which have two different subnets or can we use with same subnet as well

  3. Thanks for your Comment.
    Well It all depends on what your policy is on the servers, I assume the GPO does this for you and this is not something you do in the NLB. But yes if you do not set this this will fail.

    Bust as a guide on NLB this is a full working guide. there are so many things on a server that can change the working of a guide I can’t describe all those issues.

    Thanks for reading my blog.

  4. Hi,
    Suppose you have a 172.* corp net and want to do NLB in 192.* Make sure the NLB machine has a own network ( so TWO NIC’s ) one wit 172 and one with 192. just create the NLB on 192. and you are done make sure the network guy understands the 192.x on your network and is not blocked by anything

  5. yes, it sounds like it will work. heres my situation: I have a MPLS connection between two sites using 172.16.29.x (only that scheme can pass through the MPLS). at site 1 we have 172.16.10.x and site 2 has 172.16.29.x. i need to set up a cluster with a server on 172.16.10.x and 172.16.29.x, but only 172.16.10.x is at site 1, i cannot use 172.16.29.x at site 1 which is where my problem lies

  6. So build your NLB in 16.10 and use the NLB connections in the 16.29 and this is also the access point nobody is connecting to the nlb host. The NLB addresses are important this is what the connection is using!

    You need to know what site is gona use the NLB ! and what IP stack is this.

  7. Hi,

    So can I now configure ADFS farm with NLB, using 2 ADFS nodes located in different GEO locations (site to site in place, but static IP’s on server in diff subnet).

    Thanks

  8. you should use a second nic for the teaming and this nic will hold the NLB. the GEO locations must be connected to both servers as it is an NLB site. be aware of latency timing on the wan lines.

  9. i want to use NLB NIC for hearbeat between NLB and public NIC would be different with Natting. is that possible..

  10. so that any hit would come to Public NIC and NLB NIC for simple hearbeat connection between servers

  11. How about configuring NLB using two servers separately. Means that, I need to configure same as above?

  12. Sorry for my bad english.. What is the meaning of host parameters and cluster IP address when inserting the IP address?

  13. I see in your example. you configure different port for the 2 nodes; port 80 for xxx.xxx.xxx.201 and port 3389 for xxx.xxx.xxx.202.
    I have 2 file servers. I intend to use NLB for the file servers. Do I configure port 445 for both nodes?

  14. Hi,
    I’m super lost on this one…
    i set up a network load balancing cluster, and it’s working fine. we use it for our image download services. But we’re starting to integrate one of our other websites (portal) into the cluster, and it needs to re-route back to our main dot-com website (not in the cluster), but traffic keeps timing out to the cluster’s subnet, which is the same subnet as the main website

    Like this:
    cluster Public IP x.x.x.215 subnet: 255.255.255.224
    each cluster host also has its own local address: 192.168.0.x subnet 255.255.255.0
    all cluster hosts are only using one NIC with both addresses

    i remote into one of the cluster hosts using RDP, and attempt to connect to our main website via a browser or pinging from the command line, (public IP x.x.x.194, subnet 255.255.255.224) it times out. i get no response. and from what i can tell, our router doesn’t even get any of the requests. it can communicate with the domain controller (local address), and the name resolves to the IP address, but the traffic times out when it tries to connect to any of our public addresses on the public subnet.

    all other traffic in and out on the local 192.168.0.x network is working fine. i can connect to any of the hosts, and i can even get a remote desktop connection if i use the public address in an RDP connection.

  15. you should using two nic’s one for the lan and one for the Teaming. that way the cluster can always talk to the DC and other lan.
    the Team is based on the other nic and if you are using multiple sites in the same NLB just create a new cluster IP in the NLB and put this also in the IIS site! and trim the nlb ports so not all the ranges but only port 80 or 3389

  16. so for each server, you’re suggesting…
    -nic1 private static address
    -nic2 DHCP address, cluster address
    right?

    so here’s the problem i see with that:

    when using two nic’s, both have to be connected to the same network (the same router handles public and private addresses). eg, both cards on each server have an address on the local subnet 192.168.0.x(because of the default DHCP addressing on the NIC that’s “for the teaming”) [FYI: NIC Teaming is a whole different beast.], and at that point, it would make no difference whether there are two cards or not. The NLB cluster only adds the public/cluster address to whichever NIC you tell it to add it to. and the server doesn’t differentiate between one NIC that has a local subnet address, and one that has a local subnet address AND a public/cluster address because they’re both on the same subnet. so instead of all of the traffic not getting sent or received to the public subnet, only half of the traffic wouldn’t get sent.

    … so what am i missing?

  17. not to mention, i’d still run into the same problem because the cluster address is still on the same subnet as the address i’m trying to reroute to…

  18. Dear Team,

    I am having existing Windows NLB cluster configured on windows 2008 R2. Now i want to add another 2 node windows 2012 in existing NLB cluster.
    please let us known if it is possible.

    This changes will be only for temporary purpose. once testing done in next 2 days we will be removing windows 2008 R2 Node from nlb cluster.

    Application host on node are Exchange client access server.

    Regards
    Asif Iqbal

  19. Yes, but only temporarily you can mix 2008 and 2012R2 NLB nodes
    NLB does not support a mixed environment of unicast and multicast within a single cluster. Within each cluster, all network adapters in that cluster must be either multicast or unicast. Otherwise, the cluster will not function properly.

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.