Recently I needed to install Citrix Web Interface 5.4 and I wanted to use Network Load Balancing on top of VMware vSphere. The installation are configuration went fine however I could not ping the cluster IP from a client machine but I could ping it from the NLB nodes.
The problem and solution seem to be common on the web however but I found most of the pages I looked at were a little confusing or missing some information, so I thought I would create my own.
This post will focus on setting up NLB within VMware and will not cover how to install and configure web interface.
In my case wanted to create a basic two node NLB.
Cluster name: CTXWeb
Cluster IP: 192.168.1.182
Node1 name: CTXWeb01
Node1 IP: 192.168.1.180
Node2 name: CTXWeb02
Node2 IP: 192.168.1.181
Server Setup
Setup you two (or more) virtual servers, VMware recommends giving the virtual servers two NIC’s one being dedicated to NLB.
In my case I decided to use a single NIC and my virtual servers were both created from the same template so I took the decision to remove and re-add the virtual NIC on one of the server to make sure and identifiers were unique.
Installing NLB
Using Server Manager GUI Method
- Select “Features” from the Server Manager menu on the left
- Press “Add Features”
- Select the checkbox next to “Network Load Balancing”
- Press “Next”
- Press “Install”
- Installation will proceed to install the necessary components
- Press “Close”
- After the installing has finished repeat the process on the other NLB nodes
Using Server Manager Command Line Method
Network Load Balancing may also be installed from a command prompt with elevated privileges (right click on the command prompt in the Start menu and select Run as administrator) by running the servermanagercmd -install nlb command.
For example:
C:\Windows\system32>servermanagercmd -install nlb
……
Start Installation…
[Installation] Succeeded: [Network Load Balancing].
<100/100>
Success: Installation succeeded.
Configuring NLB on the First Node (CTXWeb01)
- Open the Network Load Balancing Manager from Start -> All Programs -> Administrative Tools menu or from a command prompt by executing nlbmgr.
- Under the Cluster Menu option select “New”
- Enter the hostname of the first node (In my case CTXWeb01) and press Connect
- You will have the option to choose which network adapter you want to use, the NIC should be on the same subnet as the other servers in the NLB cluster.
- Press “Next”
- Enter the Priority ID as, 1 (each node in the NLB cluster should have a UNIQUE ID)
- Make sure the correct adapter was selected under “Dedicated IP Address”
- Select “Started” for the “Initial host state” (this tells NLB whether you want this node to participate in the cluster at startup)
- Press “Next”
- Press “Add”
- Enter the Cluster IP and Subnet mask
- Press “OK”
- Make sure the “Cluster IP addresses” are correct
- Press “Next”
- Select the IP Address for this cluster
- Enter the NLB address “CTXWeb.testdomain.local”
- Enter “Multicast” as the “Cluster operation mode”
- Make a note of the Network Address as we will need this latter
- Press “Next”
- Change the ports as needed and press “Finish”
Configuring NLB on the Second Node (CTXWeb02)
- Right click the cluster name and select “Add Host to Cluster”
- Enter node twos host name and press “Connect”
- Select the network adapter you want to use for Load Balancing
- Press “Next”
- This step is very important; each node in the NLB cluster should have a unique identifier. This identifier is used to identify the node in the cluster.
- Enter the Priority ID as, 2 (each node in the NLB cluster should have a UNIQUE ID)
- Make sure the correct adapter was selected under “Dedicated IP Address”
- Select “Started” for the “Initial host state” (this tells NLB whether you want this node to participate in the cluster at startup)
- Press “Next”
- Change the ports as needed and press “Finish”
- Make sure that both node’s status changes to “Converged”
- Make sure each node has a unique “host priority” ID
- Make sure each node is “started” under “initial host state”
- Make sure you see a “succeeded” message in the log window for the second node
Add a DNS Entry
On your DNS server add a DNS entry for the cluster name and IP
Add a Static ARP Record to Your Switch Network
A static arp entry needs to be added to the physical layer 3 switch or router that acts as default gateway (note the default gateway from within Windows) for the NLB nodes.
I am using Cisco kit so the below is for Cisco but if you are using anything other than Cisco you will probably still need to add a static ARP.
On the switch / router get into global config mode (Conf t) then enter the command
arp <ip of nlb cluster> <mac of nlb cluster> arpa
The IP is the one we entered above in my case 192.168.1.182 and MAC address is the one we mode a node of again in my case 03-bf-0a-64-64-e1
Example:
arp 192.168.1.182 03bf.0a64.64e1 arpa
Next exit global config and show run a show ip arp | include <ip of nlb cluster> and make sure everthing looks ok.
You should now be able to ping and connect from your clients
References
http://www.vi-tips.com/2009/04/nlb-in-vmware.html
http://www.jppinto.com/2009/05/install-and-configure-wlbs-nlb-on-windows-server-2008/