實作,在VMware Workstation內
把 esxi 的這個VM,的2個 vNIC 做 Actve / Active Mode
即:
當esxi的其中1張 vNIC 掛點時
另一張 vNIC 即接手工作
一、設定Fortigate VM64 綁定2個port
二、設定Fortigate VM64 設為 vlan 50
三、驗證Failover
一、設定Fortigate VM64 綁定2個port
01-01.登入 Fortigate VM64
還記得
Fortigate VM64 的管理IP嗎?
請用 瀏覽器開
http://192.168.10.254
畫面應該如下

01-02.綁定2個port為 switch port
Network > Interfaces > Create New > Interface

依序設定如下:
Interfaec Name: NFS
Type: Software Switch
Physical Interface Members: port5, port7

二、設定Fortigate VM64 設為 vlan 50
02-01.設定 vlan50
Network > Interfaces > Create New > Interface

依序設定如下:
Interface Name: vlan50
Type: VLAN
Interface: NFS
VLAN ID: 50
IP/Network Mask: 192.168.50.254/255.255.255.0

完成後
Fortigate VM64 的 interface 應該會像這樣

三、驗證Failover
03-01.測試 unconnection vNIC_5 for this esxi VM
在此Lab中
這台esxi是VM,跑NFS的是第5張和第7張NIC
現在要來模擬esxi的第5張NIC發生異常
測試是否還可以正常存取NFS Share Storage
回到VMware Workstation將第5張停用
先選到 Network Adapter 5 Custom(VMnet5)
再將 Connected 取消勾選
按下 OK

再回到 vSphere Client看一下
網路的部分,這張網卡是否有 顯示異常
因為VM Guest這層 和 Hyervisor這層
所起始的 Number 不一樣,所以這邊要注意一下
組態 > 硬體 > 網路功能 > vSphere Standard Switch

組態 > 硬體 > 網路介面卡

確認異常後
現在,再開啟儲存區的NFS Share Storage試試
看看是否可以正常開啟
組態 > 硬體 > 儲存區 > 資料存放區 > FreeNAS40_4T 滑鼠右鍵

建個新檔案

測試正常

03-02.測試 unconnection vNIC_5 for this esxi VM
記得
把剛剛建好的測試資料夾刪掉
再把
剛剛給 Unconnection 的 NIC5 給勾選起來,讓他恢復正常

並且
把 NIC7 給取消勾選,模擬 這張 vNIC異常

回到 vSphere Client觀察看看
網路卡狀況
應該換vmnic6異常了


再去看看儲存區
是否有異常
如果,都依然可以瀏覽,及建立資料匣
那麼就代表這2張網卡都有作用
03-03.觀察FreeNAS的流量狀況
不過...
這樣就滿足了嗎?不
因為資料是往FreeNAS送過去的
照道理,應該可以從 FreeNAS上看到
某個interface 的傳輸資料的狀況
請到 FreeNAS 的底層
即 VMware Workstation 的介面
進Shell 輸入>>9

輸入>>systat -ifstat 1
觀察各interface即時的流量狀況


03-04.觀察esxi的網卡流量狀況
先把esxi的SSH開啟吧~

有些操作,很基本
位置在哪裡,也要開始熟悉材行喔

先點選SSH
再按下"選項"

啟動吧~

再用Putty去開
192.168.10.28

輸入帳號密碼後登入

我們要監看的是Network的部分,並且1秒鐘更新一次
請依序輸入
esxtop > s > 1 >n

03-04.觀察傳輸資料時,esxi和FreeNAS的網卡流量狀況
剛剛已經把 esxi、 FreeNAS的即時流量監控介面開好囉
這時候
再回到 esxi 的 vShpere Client
去上傳一個 ISO檔,到ISO的資料匣內
這邊的操作和一般Windows稍微有點不一樣
要去習慣啊~

上傳一個
Windows 2008 R2的 ISO檔好了
上傳的同時
就到 esxi 的底層觀察,流量跑在哪個 interface
如下圖,一開始跑在 vmnic4
傳出約 397.31Mb/s 除以 8 = 50MB /s

然後
再去把 這台esxi 的 vmnic4 給 disable 後
再到 esxi 底層觀察,流量切到哪個 interface
如下圖,現在跑在 vmnic6
傳出約 368.17Mb/s 除以 8 = 46MB/s

再把
剛剛disable的 vNIC 給 connection起來
觀察FreeNAS和 esxi 底層觀察,流量切到哪個 interface
如下圖,流量跑回 vmnic4


上傳的ISO檔
也順利傳完了
網卡的異常,不影響傳輸
後面Lab,我們會用這個上傳的Windows 2008r2 來進行安裝AD+DC+NTP
順便可以驗證,這個ISO檔上傳後的完整性、可用性

我觀察到
不論esxi這端,流量是由哪張網卡流出
在Storage這端,也都是由同一張網卡流入
這合不合理,我還要再思考一下
畢竟這是Lab環境,不是正式環境
到這邊,我們完成了
1.esxi 的 NIC 做 Failover
2.到 esxi 底層,觀察流量狀況
3.到 FreeNAS 底層,觀察流量狀況
沒有留言:
張貼留言