Dec 21, 2010

Microsoft Network Load Balancing in VMware

At my day job we do, among other things, website hosting. For one of our clients with a dedicated server they wanted two front ends load balanced using Microsoft’s Network Load Balancing (NLB). Easy enough right? Well, not so much.

If you configure NLB in Microsoft, the default setting for the cluster is Unicast mode. The problem with Unicast mode is that although it works well with most routers and layer 2 switches, it causes switch flooding. Switch flooding is when all ports are flooded with NLB traffic, even to nodes not involved in the NLB cluster. VMware virtual switches by default prevent switch flooding.

According to VMware:


On an ESX [ESXi] host, the VMkernel sends a reverse address resolution protocol (RARP) packet each time certain actions occur—for example, when a virtual machine is powered on, when there is a teaming failover, or when certain VMotion operations occur. The RARP packet gives physical switches the MAC address of the virtual machine involved in the action. In a Network Load Balancing cluster environment, after a Network Load Balancing node is powered on, the notification in the RARP packet exposes the MAC address of the cluster NIC. As a result, switchesmight begin to send all inbound traffic destined for the Network Load Balancing cluster through one switch port to a single node of the cluster.

Now, we originally set up their cluster using unicast because it was the default setting. Our problem was that the SQL backend could only ping one server in the cluster. If we failed it over to the other node, SQL couldn’t talk to it. Talk about a headache!

If you absolutely must use unicast, there are some configuration changes you can make on your VMware virtual switches:

To Prevent RARP Packet Transmission for a Virtual Switch
1. Log on to the VI Client and select the ESX host.
2. Click the Configuration tab.
3. Choose Networking and, for the virtual switch, select Properties.
4. On the Ports tab, select the virtual switch and click Edit.
5. Click the NIC Teaming tab, set Notify Switches to No.
6. Click OK and close the vSwitch Properties dialog box.

Complete the following steps to prevent RARP packet transmission only for an individual port group. This setting overrides the setting you make for the virtual switch.


To Prevent RARP Packet Transmission for a Port Group
1. Log on to the VI Client and select the ESX host.
2. Click the Configuration tab.
3. Choose Networking and, for the virtual switch, select Properties.
4. On the Ports tab, select the port group and click Edit.
5. Click the NIC Teaming tab, set Notify Switches to No.
6. Click OK and close the vSwitch Properties
dialog box.

If you don’t want to do all that then do what VMware suggests. Use Multicast mode! We did that, and everything has been right as rain!

nlb

According to VMware:

VMware recommends that you use multicast mode, because unicast mode forces the physical switches on the LAN to broadcast all Network Load Balancing traffic to every machine on the LAN


You do not need to take any special steps to configure your ESX host when you are using multicast mode

So in other words, if you want to make your life easy, just select multicast mode when setting up a NLB cluster on two VMware virtual servers.

[Via VMware]



Twitter Delicious Facebook Digg Stumbleupon Favorites More

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | stopping spam