Windows Server 2019: Network Load Balancing for Web server

Windows Server 2019: Network Load Balancing for Web server

Configure Network Load Balancing for Web server in Windows Server 2019

1. Prepare - DC31 : Domain Controller (Yi.vn) | DC32, DC33 : Web Server (IP 10.0.0.32, 10.0.0.33) | WIN101, WIN102 : Client

2. Step by step : Configure Network Load Balancing for DC32, DC33

- DC31 : Create a new record DNS : www.Yi.vn 10.0.0.100

- DC32 : Install Web service and Network Load Balancing

+ Create a simple website with content "This is Website at DC32"

+ Server Manager - Manage - Add Roles and Features - Next to Server Roles : Select "Web Server (IIS)" - Add Features

- Features : Select "Network Load Balancing" - Add Features - Next to Install

+ Server Manager - Tools - Internet Information Services (IIS) Manager - DC32 - Site - Right-Click Default Web Site

   - remove - Yes - Right-Click Sites - Add Website... : Site name : WEB, Physical path : C:\WEB - OK

- DC33 : Do the same DC32, website with content "This is Website at DC33"

- DC32 : Configure Network Load Balancing

 + Server Manager - Tools - Network Load Balancing Manager - Right-click "Network Load Balancing Cluster" - New Cluster - Host : 10.0.0.32

 - Connect - Next to "New Cluster : Cluster IP Address" - Add... : 10.0.0.100 255.255.255.0

 - Cluster operation mode : Multicast - "New Cluster : Port Rules" : Edit... - Port range : From 80, To 80 - Finish

 + Right-click 10.0.0.100 - Add Host To Cluster - Host : 10.0.0.33 - Connect - Finish

 - Win101 : Internet Explorer - http://www.Yi.vn === This is Website at DC33 (or DC32)

 - Win102 : Internet Explorer - http://www.Yi.vn === This is Website at DC32 (or DC33)

#########################################


Step 1)

[DC31] > Server Manager > Tools > DNS > DNS Manager > DNS > DC31 > Forword Lookup Zones > (right-click) Yi.vn > New Host (A or AAAA) > New Host - Name: www | FQDN (www.Yi.vn.) | IP Address: 10.0.0.100 > Add Host >

// Install loadbalancing feature on DC32

Step 2)

[DC32] > Create C:\DC32 (folder) > Create index.htm under C:\DC32 > Click on view (under file explorer) - (click on) Options - under Folder options, goto view, uncheck (*) hide extensions for known file types > Edit index.htm - by input:"   This is website at DC32 ">

[DC32] > Server Manager > Manage > Add roles and features > Add roles and features wizard - Selection - Name: DC32.Yi.vn | IP Address: 10.0.0.32 > Add roles and features wizard - Server Roles - (x) Web Server (IIS) - Add Features > Add roles and features wizard - Features - (x) Network Load Balancing - Add Features > Next > Install >

// Set (DC32) Default IIS Web startup page to be C:\DC32\

Step 3)

[DC32] > Server Manager > Tools > IIS > Internet Information Services (IIS) Manager - DC32 (Yi\Administrator) - Sites - (right-click) Default Web Site - remove >

[DC32] > Server Manager > Tools > IIS > Internet Information Services (IIS) Manager - DC32 (Yi\Administrator) - Sites - Add Website - Site Name: WEB | Physical Path:- C:\DC32 > OK >

// Check to see if C:\DC32\index.htm can be seen from web browser:
[Web Browser] > http://localhost/

// Install loadbalancing feature on DC33

Step 4)

[DC33] > Create C:\DC33 (folder) > Create index.htm under C:\DC33 > Click on view (under file explorer) - (click on) Options - under Folder options, goto view, uncheck (*) hide extensions for known file types > Edit index.htm - by input:"   This is website at DC33 ">

[DC33] > Server Manager > Manage > Add roles and features > Add roles and features wizard - Selection - Name: DC33.Yi.vn | IP Address: 10.0.0.33 > Add roles and features wizard - Server Roles - - (x) Web Server (IIS) - Add Features > Add roles and features wizard - Features - (x) Network Load Balancing - Add Features > Next > Install >

// Set (DC33) Default IIS Web startup page to be C:\DC33\

Step 5)


[DC33] > Server Manager > Tools > IIS > Internet Information Services (IIS) Manager - DC33 (Yi\Administrator) - Sites - (right-click) Default Web Site - remove >

[DC33] > Server Manager > Tools > IIS > Internet Information Services (IIS) Manager - DC33 (Yi\Administrator) - Sites - Add Website - Site Name: WEB | Physical Path:- C:\DC33 > OK >

// Check to see if C:\DC33\index.htm can be seen from web browser:
[Web Browser] > http://localhost/

Step 6)

// Setup DC32 Loadbalancing cluster

[DC32] Server Manager > Tools > Network Load Balancing Manager > (right-click) Network Load Balancing Manager - New Cluster > New Cluster: Connect - Host: 10.0.0.32 > Connect > Next > Next > New Cluster : Cluster IP Address - Add > Add IP Address - (x) Add IPv4 Address | IPv4 Address: 10.0.0.100 | Subnet Mask: 255.255.255.0 > New Cluster : Cluster Parameters - Cluster Operation Mode:- Multicast > New Cluster : Port Rules - Edit - Add/Edit Port Rule - Port Range: From:-  80 | To: 80 > Protocols: Both > OK >

[DC32] Server Manager > Tools > Network Load Balancing Manager > Network Load Balancing Manager - 10.0.0.100 - (Wait for port rules to appear) DC32 (Ethernet) >

// Add DC33 to Loadbalancing cluster

[DC32] Server Manager > Tools > Network Load Balancing Manager > Network Load Balancing Manager - (right-click) 10.0.0.100 > Add Host to Cluster > Add Host to Cluster : Connect - Host: 10.0.0.33 > Connect > Next > Finish >


[DC32] Server Manager > Tools > Network Load Balancing Manager > Network Load Balancing Manager - 10.0.0.100 - (Wait for port rules to appear) DC33 (Ethernet) >

Step 7)

[Win101] > Web browser > http:\\www.yi.vn\ > You'll see:- " This is website at DC33 " >

[Win102] > Web browser > http:\\www.yi.vn\ > You'll see:- " This is website at DC32 " >











Comments