Piranha+LVS+IIS--Windows作為後端真實主機的設定方法

來源:互聯網
上載者:User

標籤:

背景: 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



方法如下:


  1.   安裝虛擬網卡.

    在運行中輸入"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作為後端真實主機的設定方法

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.