Tuesday, January 1, 2013

How to: Setting up NLB in SharePoint 2010 farm

Hi All, 

In my previous blog post, I have described about how to set up a two tier SharePoint 2010 farm by providing an additional web front end. Spence Harbar has written an extremely informative article about SharePoint's high availability, network load balancing (NLB) & recommended to have Central Administration on more than one server in the farm. 


The main purpose of NLB is to provide high availability to the SharePoint 2010 farms so that the web front load is distributed. I wanted to learn how the NLB feature of Windows Server 2008 R2 functions and hence this post. As a I have limited knowledge of Windows NLB feature, I read MSDN documentation and watched a couple of screen casts on YouTube. One of the YouTube videos had been very useful. I watched the complete video and PowerPoint presentation was indeed good resource for me. These are the excerpts of his presentation.

--------------------------------------------------------
Basics of NLB
 

What is load balancing?
System that increases the scalability & high availability of the servers that provide access to data.  

Other NLB methods:
·         >> A virtual IP address (VIA) is used to distribute requites between multiple severs
·         >> Not suitable for all applications
      
      What is Windows NLB?
·         >> Is a fully distributed software solution for load balancing
 >>Is included with all versions of Windows Server 2008  

 Requirements  for Windows NLB:
·        >>  At least one network adapter for load balancing
·         >>Only TCP/IP on the NLB adapter
·         >> All NLB nodes on the same subnet

    What are port rules?
Specify how requests to a certain IP address & port range are handled.
Port rules define:
     >> Filtering mode
     >> Affinity
     >> Load weight
     >> Handling priority 


     What is the filtering mode?

Filtering mode
Description
Single Host
Only the NLB node with the highest priority responds
Disable this port range
All traffic for this port range is blocked
Multiple hosts
All NLB nodes respond based on the weight assigned to each node.


What is affinity?

Affinity controls how requests from a client are distributed among multiple nodes in an NLB cluster

Affinity
Description
None
Each client request could be distributed to any node
Single
All requests from a single client are distributed  to a single node
Network
Directs clients requests to the closest node on the basis of subnet


 ------------------------------------------------------------------------

Scenario: 


NLB is a feature installed on any Windows Server 2008 system and optimized for IIS. It provides basic level of software load balancing. The scenario is that we have 2 or more web   fronts (SharPoint 2010 farm) with two or three IPs that participates in load balancing and create a single virtual IP to our users and NLB decides which web front would serve the users via priority. NLB reduces the load on a web front end & provides quality of service to users.



      
  In this topology above two servers, SP2010WFE1 and SP2010WFE2 and we will install NLB feature at both the machines.  We present to our users a single virtual server with host name to Portal and IP address of 192.168.10.10. 


Step1: Adding NLB feature


Add NLB feature at both SP2010WFE1 & SP2010WFE2 as NLB feature has to installed on both the machines.







Step2: Creating the cluster 


Navigate to Start >> Administrative Tools >> Network Load Balancing Manager on SP2010WFE1 server & right click to create "New Cluster"




The Host would be the first server i.e. SP2010WFE1


The Priority would be first server.   



Now we set up the cluster which is called as virtual IP address (VIP). The IP address that is NOT taken and we cant use SP2010WFE1 and SP2010WFE2. It should be unique. I created a new IP address 192.168.10.10 as the cluster IP address.  


In the cluster IP configuration, I supplied full internet name as portal.contoso.com (I will create a DNS entry in the later step) and in the cluster operation mode to be Multicast. 


Click the "Finish" button and kept the default settings.  



Note: Normally in the production environment, we have to limit this because only NLB nodes should be participated. Thus, we can customize the port rules for the production environment. In my example I have only two nodes, i.e. SP2010WFE1 and SP2010WFE2, so I keep it default settings.


Now, we add the second server (SP2010WFE2). 







I put this server's priority to 2. 



Its waiting time for both the nodes to be converged and keep refreshing the NLB manager till both the nodes are converged. 


We now switch to SP2010WFE2 server and we will observe that both the cluster nodes have been automatically converged. Please note it will take some time to converge the nodes. 




Step4: Creating a DNS entry 


Create "A record" in the SP2010WFE1 server within the  "Forward Lookup Zones" and type in:

Name: portal
IP Address: 192.168.10.10 (virtual IP address)



Step4: IIS Settings 


On the IIS manager, right click on "SharePoint - 80" web application >> Edit Bindings >> Add a new host name.






Perform IIS at both machines by navigating Run >> cmd (prompt) >> IISRESET

Step6: Logging into SharePoint Central Administration 

Navigate to SharePoint 2010 Central Administration >> System Settings >> Configure alternate access mappings, choose correct web application and under "Default" zone type in: http://portal/ 




and punch in the http://portal.contoso.com



I tried the administrator log in credentials numerous times but my attempts went in vain. I again researched and tried to make NLB cluster working. I found that from different blog posts about the same issue and found a workaround. 

Step7:  DisableLoopbackCheck on Windows Server 2008 R2 server. 

What is the issue? 
Windows Server 2003 SP1 and Windows Server 2008 introduced a loopback security check according to Spence Harbar & mentioned that its a Microsoft security feature. Please refer to his blog about more details. 

Even I faced the same issue when  I typed in the http://portal.contoso.com and constantly prompted for the username and password. There is Microsoft KB article 896881 and I followed Method 2. It fixed the issue for me. 

Step8: Failover

For testing the NLB cluster, I navigated to SP2010WFE1 server and stopped the server. 



I was able to browse both at SP2010WFE1 & SP2010WFE2. 


If I stopped both the nodes, I was not able to browse at either of SharePoint Web Front Ends. 


I hope this blog post help you. 

Cheers, 
--aaroh  

  

References:
1) Clustering and High-Availability (MSDN)

2) Network Load Balancing Windows Server 2008 ( YouTube: Arabic)
3) How to Setup Load Balance in SharePoint 2010 Farm
4) SharePoint Central Administration: High Availability, Load Balancing, Security & General Recommendations (Harbar)     

Disable loopback check 

4) SharePoint disable loopback check
5) DisableLoopbackCheck & SharePoint: What every admin and developer should know. (Harbar)
6) Disable the loopback check (MDSN)       

Tuesday, December 25, 2012

How to: Two-tier configuration for SharePoint 2010

Hi All, 

I always wanted to create a demo topology for a multiple SharePoint Server 2010. In corporate environments, we mostly have three tier architecture consisting of application tier, web front end tier and data tier. In my demo environment,  I have created a two tier topology as follows:


1) SharePoint Server 2010: named SP2010WFE1 with the domain controller (AD), SQL Server 2008 R2 SP1
2) SharePoint Server 2010: named SP2010 WFE2 with the same SQL Server 2008 R2 instance as SP2010WFE1. 

In my previous blog posts I have mentioned that setting up a single server for SharePoint 2010 farm with AD, SQL Server in a single box is quite easy. However, if you try out to install a separate box, things could become complicated.  There are quite a few prerequisites as follows: 



  ü  The servers should be in the same domain.
  ü  Static unique IP addresses for each server.
  ü  Network discovery should be enabled for each server.
  ü  Local administrative rights on each server.  

      
I tried following virtualization options: 
  • VMware player  -  Its good for single server set up. We can use vSphere which is a FREE tool to manage different servers. But I found it quite complex to set up vSphere Hypervisor.
  • VirtualBox: I tried VirtualBox which is from Oracle. Its much simpler and very straightforward. 

A) VirtualBox Configuration: 

Note: YouTube has excellent videos on setting up VirtualBox

i) VirtualBox Tutorial 1
ii) VirtualBox Tutorial 2 


  1. Download the latest VirtualBox from this link and choose Windows Hosts
  2. The SetUp will kick in as follows: 










I did not face any Network Interfaces though during the setup.  
























 I created two Windows Server 2008 R2 SP1 instances:

1) SP2010 WFE1 with SQL Server 2008 R2 SP1
2) SP2010 WFE2 that work simultaneously as follows 



It is important to Install Guest Additions on both the machines via Devices >> Install Guest Additions. Its very similar VMware tools.  


 When I created a new machine instance such as SP2010 WFE1, I normally do the following:

a) Install Guest Additions. It will ask for server reboot and ignore it. 
b) Rename the machine name such as SP2010WFE1.   It will ask for server reboot and ignore it.  
c) Change the current time zone. and then I reboot the machine. 

The guest additions install the video & mouse drivers and re-size to full screen.   

B) Setting up the Active Directory

I setup the SP2010 WFE1 as the Active Directory Domain controller. Please follow the previous blog posts and steps which are exactly same. 
For installing SQL Server 2008 R2 & SharePoint Server 2010, navigate to the Devices >> Shared Folders 


and add the Share where SQL Server 2008 & SharePoint Server 2008 ISOs are stored.


and check Auto-mount, Make Permanent options. 

Please ensure the that your network adapter is connected to NAT as illustrated below:
 
 

Its of paramount importance because SharePoint 2010 Prerequisites requires Internet connection. We will cover networking in later steps. 

i) How to: Install and Configure SharePoint 2010 - Part 1 (AD installation and SharePoint Accounts)
ii) How to: Install and Configure SharePoint 2010 - Part 2 (SQL Server 2008 R2 & SharePoint Server 2010 installation)

On the second machine SP2010 WFE2, and perform following actions:

a) Install Guest Additions. It will ask for server reboot and ignore it. 
b) Rename the machine name such as SP2010WFE2.   It will ask for server reboot and ignore it.  
c) Change the current time zone. and then I reboot the machine. 

C) Networking 

I researched for at least 8-10 days about how to connect two servers. I read basic networking concepts and watched numerous videos but neither documentation nor videos helped me.  In lot of videos people have described basics of DNS, DHPC etc. But one of YouTube videos actually helped me what I intended to do.  

Firstly, setup SP2010 WFE1 server and perform following steps: 

Step1: Control Panel >> Change adapter settings >>   Right click on "Local Area Connection contoso.com"  >> Properties >> Select Internet Protocol Version 4 >> Properties >>  Type in: 


IP Address: 192.168.10.5
Subnet mask: 255.255.255.0

Preferred DNS server: 127.0.0.1

Step2: Change the Network Adapter by going to Devices >> Network Adapter >> Attached to: "Host-Only Adapter". and 

Step3: Restart the SP2010 WFE1. 

Step4: Another frustrating roadblock which I ran into is that I have to turn on network discovery so that the second server (SP2010 WFE2) could detect it. Whenever I turn on the network discovery on the SP2010 WFE1 and click in "Save Changes", and try to turn the network discovery it was never turned on.

Finally I found a helpful tip from a blog. 

On the SP2010 WFE1, navigate to services.msc and active following services:         
>> Function Discovery Resource Publication and make the service Automatic
>> SSDP Discovery  and make the service Automatic. 
>> UPnP Device Host  and make the service Automatic. 





Control Panel >> Change advanced sharing settings >> Turn on Network Discovery for "Home or Work", "Public" and "Domain profiles" and hit the "Save changes". 

D) Adding a second SP2010 web front end 

Step1: Switch to SP2010WFE2 server and Install SharePoint Server 2010 by navigating to the Devices >> Shared Folders 


 and SharePoint Server 2010 ISOs are stored.


and check Auto-mount, Make Permanent options. 

Please ensure the that your network adapter is connected to NAT as illustrated below:
 
 

Its of paramount importance because SharePoint 2010 Prerequisites requires Internet connection. Click on "Server Farm" as we are connect this server to SP2010WFE1


Step2: On the second screen of the wizard, choose "Complete".


Step3: The SharePoint Server 2010 on the SP2010WFE2 kicks in:

Step3: We will get SharePoint 2010 configuration wizard as illustrated below: 


At this step we have to disconnect the Internet connection and perform following steps:  

Step4: Control Panel >> Change adapter settings >>   Right click on "Local Area Connection contoso.com"  >> Properties >> Select Internet Protocol Version 4 >> Properties >>  Type in:


IP Address: 192.168.10.3
Subnet mask: 255.255.255.0

Preferred DNS server: 127.0.0.1



Lets ensure we are able to connect to SP2010 WFE1



Step5: Change the Network Adapter by going to Devices >> Network Adapter >> Attached to: "Host-Only Adapter"

Step6: Restart the SP2010 WFE2. 

Step7: On the SP2010 WFE2, navigate to services.msc and active following services:
>> Function Discovery Resource Publication and make the service Automatic
>> SSDP Discovery  and make the service Automatic. 
>> UPnP Device Host  and make the service Automatic.

Control Panel >> Change advanced sharing settings >> Turn on Network Discovery for "Home or Work", "Public" and "Domain profiles" and hit the "Save changes". 


E) Connect two servers together:

On the SP2010 WFE2 server I connected to contoso.com domain. 

Step1: Right click on "Computer"
Step2: Click on the "Advanced system settings" 
Step3: On Computer Name tab, click on "Change" button to change the domain. Type in "contoso.com"


We will get a log in credentials windows. 

  

Now are we connected with the same domain.

F) Run the SharePoint 2010 products configuration wizard.  

Step1: Run the the PSConfig on the SP2010WFE2. We have to provide the database server and database account. 



Step2: Next screen we are prompted about which server farm we want to connect to as illustrated below:  



Step3: Provide the database server. Type in "Database server" and click on "Retrieve Database Names" and database name would be automatically populated. 


 Step4: Provide the Farm Security Settings. I have entered sp2010!sp2010!. and click on "Advanced Settings"



Step5: In the Advance Settings option, check the "Use this machine to host the web site" and complete the SharePoint Products Configuration wizard. The configuration will start as shown below.




Step6: Navigate to SP2010 WFE1's Central Administration & we are able to view two server connected in this two tier farm. 

I hope this two tier SharePoint Server 2010 setup helped you.
Cheers,
--aaroh

References: 

1) YouTube: Adding a Client to a Server Domain
2) Cannot enable Network Discovery on Windows Server 2008 R2



Low Code Reimagined with AI + Copilot Pitch Deck - Copy Copilot day (Virtual) - 2023

 Hi All,  I presneded a session at Pune UG on Low Code Reimagined with AI + Copilot Pitch Deck.  Video is at this address  https://www.youtu...