Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng

Quản trị net diễn đàn chia sẻ thông tin các thủ thuật mạng, internet bảo mật thông tin dành cho giới IT VIệt hy vọng là nơi bổ ích cho cộng đồng (http://quantrinet.com/forum/index.php)
-   Module 10: Loadbalancing, Luster on Windows Server 2008 (http://quantrinet.com/forum/forumdisplay.php?f=401)
-   -   Network load balancing (http://quantrinet.com/forum/showthread.php?t=3175)

hoctinhoc 06-08-2009 11:03 PM

Network load balancing
 
NETWORK LOAD BALANCING


http://msopenlab.com/uploads/thumb_h1111hpZS.jpg

I. Giới thiệu
- Như chúng ta đã biết trong hệ thống mạng khi cần cân bằng tải cho những dịch vụ như: Web, Mail, FTP, VPN, File, Print service… thì chúng ta cần phải cấu hình hệ thống Load Balancing hoặc Clustering
- Trong bài viết này tôi sẽ giới thiệu với các bạn cách cấu hình dịch vụ Network Load Balancing trên Windows Server 2008 để cân bằng tải cho hệ thống Web

Bài lab bao gồm các bước:
1. Cài đặt Network Load Balancing
2. Cấu hình Network Load Balancing
3. Máy Client kiểm tra

II. Chuẩn bị

- Bài lab gồm 3 máy:
Web Server 1: Windows Server 2008
Web Server 2: Windows Server 2008
Client: Windows Vista hoặc Windows XP
- Cấu hình TCP/IP cho 3 máy như trong mô hình
- Máy Web Server 1 và Web Server 2 cài đặt Web Server (IIS) role (Tham khảo bài viết Internet Information Service 7.0)

III.
Mô hình

http://www.msopenlab.com/lab/loadbalancing/h1.JPG


IV. Thực hiện
1. Cài đặt Network Load Balancing trên Web Server 1 và Web Server 2
- Mở Server Manager từ Administrative Tools
- Trong cửa sổ Server Manager, Right click Features chọn Add Features


http://www.msopenlab.com/lab/loadbalancing/h2.JPG


- Trong cửa sổ Select Features, đánh dấu chọn Network Load Balancing, chọn Next



http://www.msopenlab.com/lab/loadbalancing/h3.JPG

- Trong cửa sổ Confirm Installation Selections chọn Install


http://www.msopenlab.com/lab/loadbalancing/h4.jpg


- Trong cửa sổ Installation Results, kiểm tra cài đặt thành công, chọn Close

http://www.msopenlab.com/lab/loadbalancing/h5.jpg



2. Cấu hình Network Load Balancing trên Web Server 1
Bước 1: Tạo Netwok Load Balancing Cluster và add Web Server 1 vào Cluster
- Mở Network Load Balancing Manager từ Administrative Tools
- Right click Network Load Balancing Clusters chọn New Cluster

http://www.msopenlab.com/lab/loadbalancing/h6.jpg

- Trong hộp thoại New Cluster: Connect, nhập địa chỉ Web Server 1 (192.168.3.23) vào ô Host, chọn Connect

http://www.msopenlab.com/lab/loadbalancing/h7.jpg



- Kiềm tra trong ô Interface available for configuring a new cluster xuất hiện Interface của Web Server 1,chọn Next

http://www.msopenlab.com/lab/loadbalancing/h8.jpg


- Trong hộp thoại New Cluster: Host Parameter, chọn Priority=1, các thông số khác để mặc định, chọn Next


http://www.msopenlab.com/lab/loadbalancing/h9.jpg


- Trong hộp thoại New Cluster IP Addresses, chọn Add

http://www.msopenlab.com/lab/loadbalancing/h10.jpg



- Trong hộp thoại Add IP Address nhập:
IPv4 Address: 192.168.3.100
Subnet mask: 255.255.255.0
chọn OK


http://www.msopenlab.com/lab/loadbalancing/h11.jpg

- Trong hộp thoại New Cluster IP Addresses, chọn Next


http://www.msopenlab.com/lab/loadbalancing/h12.jpg

- Trong hộp thoại New Cluster: Parameters, nhập thông số như trong hình, chọn Next


http://www.msopenlab.com/lab/loadbalancing/h13.jpg

- Trong hộp thoại New Cluster: Port Rules chọn Edit

http://www.msopenlab.com/lab/loadbalancing/h14.jpg



- Trong hộp thoại Add/Edit Port Rule, cấu hình các thông tin như trong hình, chọn OK


http://www.msopenlab.com/lab/loadbalancing/h15.jpg


- Trong hộp thoại New Cluster: Port Rules chọn Finish

http://www.msopenlab.com/lab/loadbalancing/h16.jpg


- Trong cửa sổ Network Load Balancing Manager kiểm tra kết quả như trong hình


http://www.msopenlab.com/lab/loadbalancing/h17.jpg


B
ước 2:Add Web Server 2 vào Cluster

- Trong cửa sổ Network Load Balancing Manager, Right click trên Cluster www.nhatnghe.com chọn Add Host to Cluster
- Trong hộp thoại Add Host to Cluster: Connect, nhập địa chỉ của Web Server 2 (192.168.3.21) vào ô Host, chọn
Connect



http://www.msopenlab.com/lab/loadbalancing/h18.jpg


- Kiểm tra xuất hiện Interface của máy Web Sever 2, chọn Next

http://www.msopenlab.com/lab/loadbalancing/h19.jpg



- Trong hộp thoại Add Host to Cluster: Host Parameter, chọn Priority=2, các thông tin còn lại để mặc định, chọn Next



http://www.msopenlab.com/lab/loadbalancing/h20.jpg


- Trong hộp thoại Add Host to Cluster: Port Rule chọn Finish



http://www.msopenlab.com/lab/loadbalancing/h21.jpg


- Trong cửa sổ Network Load Balancing Manager: kiểm tra kết quả như trong hình



http://www.msopenlab.com/lab/loadbalancing/h22.jpg

Bước 3:
Kiểm tra trên 2 máy Web Server
- Mở Command line, gõ lệnh ipconfig /all, kiểm tra trên 2 máy Web Server đã được gán Cluster virtual IP: 192.169.3.100


http://www.msopenlab.com/lab/loadbalancing/h23.jpg


3.
Máy Client kiểm tra truy cập vào Web Site của 2 Web Server

- Mở Internet Explorer, truy cập vào địa chỉ của Web Server 1 http://192.168.3.23 .Kiểm tra truy cập thành công


http://www.msopenlab.com/lab/loadbalancing/h24.jpg

- Truy cập vào địa chỉ của Web Server 2 http://192.168.3.21 . Kiểm tra truy cập thành công


http://www.msopenlab.com/lab/loadbalancing/h25.jpg


4. Máy Client kiểm tra truy cập vào Web Site bằng Cluster Virtual IP
- Mở Internet Explorer, truy cập vào địa chỉ http://192.168.3.100 . Kiểm tra truy cập thành công


http://www.msopenlab.com/lab/loadbalancing/h26.jpg


5. Stop Default Web Site của Web Server 1
- Mở Internet Information Service (IIS) Manager từ Administrative Tools
- Bung Site, Right click Default Web Site chọn Manage Web Site, chọn Stop


http://www.msopenlab.com/lab/loadbalancing/h27.jpg

6.
Máy Client kiểm tra truy cập vào Web Site bằng Cluster Virtual IP
- Mở Internet Explorer, truy cập vào địa chỉ http://192.168.3.100 . Kiểm tra truy cập thành công

http://www.msopenlab.com/lab/loadbalancing/h28.jpg


7. Start Default Web Site của Web Server 1
- Mở Internet Information Service (IIS) Manager từAdministrative Tools
- Bung Site, Right click Default Web Site, chọn Manage Web Site, chọn Start
8. Stop Default Web Site của Web Server 2

- Mở Internet Information Service (IIS) Manager từAdministrative Tools
- Bung Site, Right click Default Web Site, chọn Manage Web Site, chọn Stop
9. Máy Client kiểm tra truy cập vào Web Site bằng Cluster Virtual IP
- Mở Internet Explorer, truy cập vào địa chỉ http://192.168.3.100 . Kiểm tra truy cập thành công

http://www.msopenlab.com/lab/loadbalancing/h29.jpg


-----Done-----
Theo: Trần Thủy Hoàng (Msopenlab)

:battay:


Bây giờ là 01:27 AM. Giờ GMT +7

Diễn đàn tin học QuantriNet
quantrinet.com | quantrimang.co.cc
Founded by Trương Văn Phương | Developed by QuantriNet's members.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.