標籤:
背景: Piranha是配置LVS的web工具,LVS(DR模式)+IIS架構中,主要痛點是windows做為後端的伺服器迴環介面的安裝和配置,此處主要介紹這個痛點,LVS安裝可以參考我前面寫的文章。
環境架構說明:
環境:
作業系統 Centos 6.6 _X64 +LVS
WEB windows2008R2+ IIS
結構:
LVS-ACTIVE:10.6.1.167
LVS-BACKUP: 10.6.1.168
LVS-VIP: 10.6.1.16
Realsever: 10.6.1.58,10.6.1.59
方法如下:
安裝虛擬網卡.
在運行中輸入"hdwwiz.exe",手動從列表中添加新硬體:Windows Loopback Adapter。
2. 設定 Windows Lookback Adapter ip地址為虛擬IP地址. 設定Subnet mask: 255.255.255.255,並重新命名虛擬網卡為realserver。 真實網卡一般為本地串連.
3. 修改網卡資訊
以管理員身份運行以下批處理指令碼,指令碼如下:
++++++++++++++++++++++++++++++++++++++++++++++++
@echo off
netsh interface ipv4 set interface "realserver" weakhostreceive=enabled
netsh interface ipv4 set interface "realserver" weakhostsend=enabled
netsh interface ipv4 set interface "本地串連" weakhostreceive=enabled
netsh interface ipv4 set interface "本地串連" weakhostsend=enabled
pause
++++++++++++++++++++++++++++++++++++++++++++++++
完成。
驗證
找一台機器訪問http://10.6.1.16, 顯示如下:
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/83/C9/wKioL1d8i_WwR068AAD2-bwMgZ4138.jpg-wh_500x0-wm_3-wmp_4-s_708246572.jpg" style="float:none;" title="0ADC3880-AC1C-4DCE-AC68-83DB15402519.jpg" alt="wKioL1d8i_WwR068AAD2-bwMgZ4138.jpg-wh_50" />
換另外一台訪問同個地址, 顯示如下:
650) this.width=650;" src="http://s3.51cto.com/wyfs02/M02/83/C9/wKioL1d8i_XCNAgmAAEMrlD6usc332.jpg-wh_500x0-wm_3-wmp_4-s_2426872902.jpg" style="float:none;" title="CE4A690F-43DD-4BB9-BB35-E7CB45999237.jpg" alt="wKioL1d8i_XCNAgmAAEMrlD6usc332.jpg-wh_50" />
本文出自 “技術成就夢想” 部落格,請務必保留此出處http://pizibaidu.blog.51cto.com/1361909/1799645
Piranha+LVS+IIS--Windows作為後端真實主機的設定方法