You are on page 1of 4

Technical Note

Implementing Microsoft Network Load Balancing in a Virtualized Environment


VMware Infrastructure 3
NetworkLoadBalancingisafeatureofrecentMicrosoftserveroperatingsystems,includingWindows2000 AdvancedServer,WindowsServer2003,andWindowsServer2008.Thisclusteringtechnologyenablesyouto improvethescalabilityandavailabilityofInternetserverprograms,suchasWebservers,proxyservers,DNS servers,FTPservers,virtualprivatenetworkservers,streamingmediaservers,andterminalservicesservers. Inaddition,itcandetecthostfailuresandautomaticallyredistributetraffictoserversthatarestilloperating. InaVMwareInfrastructure3environment,youcancreateaclusterforNetworkLoadBalancingusing virtualmachinesonthesamehostorvirtualmachinesonmultiplehosts. ThistechnicalnoteprovidesinstructionsforimplementingNetworkLoadBalancinginmulticastorunicast mode.Itcoversthefollowingtopics: NetworkLoadBalancingBasicsonpage 1 PlanningaNetworkLoadBalancingClusteronpage 1 ConfiguringNetworkLoadBalancinginWindowsonpage 2 Referencesonpage 3

Network Load Balancing Basics


NetworkLoadBalancingisimplementedinaspecialdriverinstalledoneachWindowshostinacluster.The clusterpresentsasingleIPaddresstoclients.Whenclientrequestsarrive,theygotoallhostsinthecluster, andanalgorithmimplementedinthedrivermapseachrequesttoaparticularhost.Theotherhostsinthe clusterdroptherequest.Youcansetloadpartitioningtodistributespecifiedpercentagesofclientconnections toparticularhosts.Youalsohavetheoptionofroutingallrequestsfromaparticularclienttothehostthat handledthatclientsfirstrequest. Hostsintheclusterexchangeheartbeatmessagessotheycanmaintainconsistentinformationaboutwhat hostsaremembersofthecluster.Ifahostfails,clientrequestsarerebalancedacrosstheremaininghosts,with eachremaininghosthandlingapercentageofrequestsproportionaltothepercentageyouspecifiedinthe initialconfiguration.

Planning a Network Load Balancing Cluster


NetworkLoadBalancingreliesonthefactthatincomingpacketsaredirectedtoallclusterhostsandpassedto theNetworkLoadBalancingdriverforfiltering. YoucanconfigureaNetworkLoadBalancingclusterinoneofthefollowingmodes: MulticastMulticastmodeallowscommunicationamonghostsbecauseitaddsaLayer2multicast addresstotheclusterinsteadofchangingthecluster.Communicationamonghostsispossiblebecause

Copyright 2008 VMware, Inc. All rights reserved.

Implementing Microsoft Network Load Balancing in a Virtualized Environment

thehostsretaintheiroriginaluniquemediaaccesscontrol(MAC)addressesandalreadyhaveunique, dedicatedIPaddresses.However,theaddressresolutionprotocol(ARP)replythatissentbyahostinthe cluster(inresponsetoanARPrequest)mapstheclustersunicastIPaddresstoitsmulticastMACaddress. SomeroutersdonotsupporttheresolutionofunicastIPaddressestomulticastMACaddresses,andthey discardtheARPreply.Asaresult,anadministratormustaddastaticARPentryintherouter,mapping theclusterIPaddresstoitsMACaddress. ToconfigureaNetworkLoadBalancingclusterinmulticastmodecorrectly,youneedtocompletethe stepsinConfiguringNetworkLoadBalancinginWindowsonpage 2. NOTEVMwarerecommendsthatyouusemulticastmode,becauseunicastmodeforcesthephysical switchesontheLANtobroadcastallNetworkLoadBalancingtraffictoeverymachineontheLAN. UnicastUnicastmodeworksseamlesslywithallroutersandLayer2switches.However,thismode inducesswitchflooding,aconditioninwhichallswitchportsarefloodedwithNetworkLoadBalancing traffic,evenportstowhichserversnotinvolvedinNetworkLoadBalancingareattached.To communicateamonghosts,youmusthaveasecondvirtualadapterforeachhost. Normally,switchedenvironmentsavoidportfloodingwhenaswitchlearnstheMACaddressesofthe hoststhataresendingnetworktrafficthroughit.TheNetworkLoadBalancingclustermaskstheclusters MACaddressforalloutgoingtraffictopreventtheswitchfromlearningtheMACaddress. OnanESXhost,theVMkernelsendsareverseaddressresolutionprotocol(RARP)packeteachtime certainactionsoccurforexample,whenavirtualmachineispoweredon,whenthereisateaming failover,orwhencertainVMotionoperationsoccur.TheRARPpacketgivesphysicalswitchestheMAC addressofthevirtualmachineinvolvedintheaction.InaNetworkLoadBalancingclusterenvironment, afteraNetworkLoadBalancingnodeispoweredon,thenotificationintheRARPpacketexposesthe MACaddressoftheclusterNIC.Asaresult,switchesmightbegintosendallinboundtrafficdestinedfor theNetworkLoadBalancingclusterthroughoneswitchporttoasinglenodeofthecluster. BecausethevirtualswitchoperateswithcompletedataabouttheunderlyingMACaddressesofthe virtualNICsinsideeachvirtualmachine,italwayscorrectlyforwardspacketscontainingaMACaddress matchingthatofarunningvirtualmachine.Asaresultofthisbehavior,thevirtualswitchdoesnot forwardtrafficdestinedfortheNetworkLoadBalancingMACaddressoutsidethevirtualenvironment intothephysicalnetwork,becauseitisabletoforwardittoalocalvirtualmachine. TocorrectlyconfigureaNetworkLoadBalancingclusterinunicastmode,youneedtocompletethesteps inConfiguringNetworkLoadBalancinginWindowsonpage 2andConfiguringUnicastModeon page 3.

Configuring Network Load Balancing in Windows


1 InstallaWindowsoperatingsystemthatsupportsNetworkLoadBalancinginyourvirtualmachines. YoushouldinstalltwovirtualNICsineachvirtualmachinethatwillbepartoftheNetworkLoad Balancingcluster.OnevirtualNICfromeachvirtualmachineisusedforNetworkLoadBalancing.The othervirtualNICisusedformanagementoftheWindowsvirtualmachine. 2 EachNetworkLoadBalancingnoderequiresastaticIPaddresstobeassignedtotheNetworkLoad Balancingboundadapter.YouneedoneormoreadditionalstaticIPaddressestobeusedasthevirtualIP addressesoftheNetworkLoadBalancingcluster.UseIPaddressesthatbelongtothesamesubnet. ConfigureNetworkLoadBalancingoptionsusingoneofthefollowing: NetworkLoadBalancingManager NetworkLoadBalancingPropertiesdialogboxaccessedthroughNetworkConnections VMwarerecommendsthatyouusetheNetworkLoadBalancingManager. UsingbothNetworkLoadBalancingManagerandNetworkConnectionstochangeNetworkLoad Balancingpropertiescanleadtounpredictableresults.

Copyright 2008 VMware, Inc. All rights reserved.

Implementing Microsoft Network Load Balancing in a Virtualized Environment

YoucanuseNetworkLoadBalancingManagerfrominsideanodeorfromaremotemachinethatcan communicatewithallnodes.Bydefault,NetworkLoadBalancingManagerisinstalledonWindows Server2003,andyoucanaccessitbyclickingSettings>ControlPanel>AdministrativeTools>Network LoadBalancingManager.

Configuring Multicast Mode


YoudonotneedtotakeanyspecialstepstoconfigureyourESXhostwhenyouareusingmulticastmode.

Configuring Unicast Mode


ThisprocedurehelpspreventRARPpackettransmissionforthevirtualswitchasawhole.Thissettingaffects alltheportgroupsthatusetheswitch.Youcanoverridethissettingforindividualportgroupsusingthe instructionsinToPreventRARPPacketTransmissionforaPortGrouponpage 3. To Prevent RARP Packet Transmission for a Virtual Switch 1 2 3 4 5 6 LogontotheVIClientandselecttheESXhost. ClicktheConfigurationtab. ChooseNetworkingand,forthevirtualswitch,selectProperties. OnthePortstab,selectthevirtualswitchandclickEdit. ClicktheNICTeamingtab,setNotifySwitchestoNo. ClickOKandclosethevSwitchPropertiesdialogbox.

CompletethefollowingstepstopreventRARPpackettransmissiononlyforanindividualportgroup.This settingoverridesthesettingyoumakeforthevirtualswitch. To Prevent RARP Packet Transmission for a Port Group 1 2 3 4 5 6 LogontotheVIClientandselecttheESXhost. ClicktheConfigurationtab. ChooseNetworkingand,forthevirtualswitch,selectProperties. OnthePortstab,selecttheportgroupandclickEdit. ClicktheNICTeamingtab,setNotifySwitchestoNo. ClickOKandclosethevSwitchPropertiesdialogbox.

Formoreinformation,seetheVMwareknowledgebasearticleMicrosoftNLBNotWorkingProperlyin UnicastMode.Foralink,seeReferencesonpage 3.

References
Foradditionalinformation,seethefollowingsources: Checklist:EnablingandconfiguringNetworkLoadBalancing http://go.microsoft.com/fwlink/?LinkId=18371 ClusteringServicesinWindows2003 http://www.microsoft.com/windowsserver2003/technologies/clustering/default.mspx MicrosoftCommunitiesWebSite http://go.microsoft.com/fwlink/?LinkId=18374 MicrosoftNLBNotWorkingProperlyinUnicastMode http://kb.vmware.com/kb/1556

Copyright 2008 VMware, Inc. All rights reserved.

Implementing Microsoft Network Load Balancing in a Virtualized Environment

ReasonsforUsingNetworkLoadBalancing http://technet2.microsoft.com/windowsserver/en/library/7698646d510e47f99b09b31dec12be3a1033.m spx VMwareVirtualNetworkingConcepts http://www.vmware.com/resources/techresources/997 WindowsServer2003DeploymentKit http://go.microsoft.com/fwlink/?LinkId=18370

If you have comments about this documentation, submit your feedback to: docfeedback@vmware.com VMware, Inc. 3401 Hillview Ave., Palo Alto, CA 94304 www.vmware.com Copyright 2008 VMware, Inc. All rights reserved. Protected by one or more of U.S. Patent Nos. 6,397,242, 6,496,847, 6,704,925, 6,711,672, 6,725,289, 6,735,601, 6,785,886, 6,789,156, 6,795,966, 6,880,022, 6,944,699, 6,961,806, 6,961,941, 7,069,413, 7,082,598, 7,089,377, 7,111,086, 7,111,145, 7,117,481, 7,149, 843, 7,155,558, 7,222,221, 7,260,815, 7,260,820, 7,269,683, 7,275,136, 7,277,998, 7,277,999, 7,278,030, 7,281,102, 7,290,253, and 7,356,679; patents pending. VMware, the VMware boxes logo and design, Virtual SMP and VMotion are registered trademarks or trademarks of VMware, Inc. in the United States and/or other jurisdictions. All other marks and names mentioned herein may be trademarks of their respective companies. Revision 20080904 Item: EN-000012-00

You might also like