1 / 23

HA_4 網卡

HA_4 網卡. 確定 VM 網路環境 : vm workstation > Edit > Virtual Network Editor > VMnet8 (NAT): 10.10.88.0 VMnet1 (Host-Only): 192.168.88.0. ESXi 4 settings 網卡 > 2 張 NAT + 2 張 Host-only ( ESXi 先新增好 網卡 , 再開機 ) 順序為 NAT NAT H-O H-O. 4 張網卡 要接到 4 台 v-switch.

Télécharger la présentation

HA_4 網卡

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. HA_4網卡

  2. 確定 VM 網路環境: • vm workstation > Edit > Virtual Network Editor >VMnet8 (NAT): 10.10.88.0VMnet1 (Host-Only): 192.168.88.0

  3. ESXi 4 settings 網卡> 2張NAT + 2張Host-only(ESXi先新增好 網卡,再開機)順序為NAT NAT H-O H-O

  4. 4張網卡 要接到 4台 v-switch • V-switch的型態(NAT or H-O), 由 連接的網卡決定!!

  5. vSphere Client > Configuration > Networking > Add networking (新增v-switch)

  6. vSphere Client > Configuration > Network Adapters • vmnic2 & 3: Observed IP ranges 怪怪的 • 因為 VMnet1 (H-O) 的 dhcp沒有開 • 可試勾 dhcp, 再把 esxi重開就好了

  7. Linux 新增到4網卡, 分別接到對應的switch

  8. 注意,新增網卡,並非選擇NAT or H-O網卡,而是選要接到那個switch

  9. Linux 網卡

  10. Linux 開機: vm workstation > Ctrl + L > ESXi IP > 開啟 apache01

  11. Linux開機後, 確認 4張網卡都接到正確的switch • eth0 > 接到 Service-01 • eth1 > 接到 Service-02 • eth2 > 接到 DRBD-Heartbeat-01 • eth3 > 接到 DRBD-Heartbeat-02 • 幹嘛確認? 這不是很自然的事,本來就會這樣嗎?  不見得! 所以要確認.

  12. Linux 網卡-switch配對, step 1 • 當然不可以有 eth4, eth5, eth6, eth7 • 請自行 解決 70-persistent… 問題!

  13. Linux 網卡-switch配對, step 2 • 查出 eth0 ~ eth3 mac, 並與 ESXi > apache01 > Edit Settings > 4張網卡 mac 做比對 •  必要時 調整 , 可能如下 ,可能完全不用調

  14. apache01 的bonding網卡 • eth0 & eth1: 綁成 bond0 網卡 • 10.10.88.88 • eth2 & eth3: 綁成 bond1 網卡 • 192.168.88.88

  15. eth0 & eth1: 綁成 bond0 網卡10.10.88.88 • ifcfg-eth0&ifcfg-eth1加 • MASTER=bond0SLAVE=yes • 拿掉所有ip設定:IPADDR, NETMASK, GATEWAY, DHCP • 如下: (無 ip)DEVICE=eth0HWADDR=00:0C:29:B1:20:62ONBOOT=yesMASTER=bond0SLAVE=yes

  16. 新增 ifcfg-bond0 (10.10.88.90) • DEVICE=bond0ONBOOT=yesIPADDR=10.10.88.90NETMASK=255.255.255.0(當然不會有 HWADDR)

  17. 啟用 bonding 機制 • vim /etc/modprobe.d/bonding.conf如下:alias bond0 bonding//啟用 bonding 機制//本來就有 bonding.ko// (modinfo bonding 可以查出 本就有 bonding.ko module)// bond0 為我們需要的介面, bonding 是 Linux 的核心模組options bond0 miimon=100 mode=1 primary=eth0// miimon:多久偵測一次網卡連線有問題 (單位毫秒)// 設定偵測時間&bonding mode為1 • eth2 & 3 綁成, bond1 網卡,只是在此檔補下面兩行: • alias bond1 bondingoptions bond1 miimon=100 mode=1 primary=eth2 • 重啟網路無用 請 reboot

  18. 順便練習: 以 vim 切成如下畫面

  19. ip a 輸出 • http://mylady.tw/public/ipa.htm

  20. 驗證 bond0 & bond1 容錯okwin7 ping bond0 & bond1 ip • ping 10.10.88.88 -t • ping 過程, 把 eth0 停掉, ifdown eth0 • ping 192.168.88.88 -t • ping 過程, 把 eth2 停掉, ifdowneth2

  21. 接下來的 HA 只是把 原來的eth0換成 bond0eth1換成 bond1

More Related