Try   HackMD

VMWare虛擬化環境建置-網路建置說明

目錄


  • [VM網路介面與其功能]
    [NIC]
    [vSwitch]
    [連接埠群組]
    [虛擬機連網]

VMWare網路環境建置是非常重要的一個步驟,希望你跟著教學文件可以一步一步學會它。

一、VM網路介面與其功能

(一)、NIC

目前我想新增一個可連接的網路,所先到實體nic選擇想要使用的區塊,目前我選擇3號。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
一條實體線就會佔一個NIC

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

NIC會去跟虛擬交換器做連接(vSwitch

照上面步驟根本看不懂,因為NIC的設定需要看實體機的部分,

到Server主機位置,選擇4號網路Port(我的本地環境Port是從0開始,所以我選四號,0、1、2、3),將網路線接到ADSL或者出外網的Gateway裝置。

圖一、伺服器

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
手指處就是實體的網路Port, 這個Port旁邊有一個數字4, 可以得知它是3號port(數字從0開始,不是從1)

圖二、防火牆(出外網的Gateway裝置)

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
將剛剛連接實體網路Port的線接到防火牆,注意,防火牆必須要有L3功能才可以,今天不用防火牆,你也可以選擇L3Switch或路由,甚至如上文所指,直接接到ADSL

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

(二)、vSwitch

vSwitch你可以想像成實體的交換器,VMware就是模擬實體的環境,介面如下圖:

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

嘗試新增vSwitch吧,新增>取名>選擇NIC, 我選擇的NIC是上文中有設定好的那個NIC

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

(三)、連接埠群組

你可以分配連接埠群組給建立好的虛擬機,如此,虛擬機們都有各自的網路群組,一方面也可以做好管理。

連接埠群組建立很簡單,你只要選取剛剛設定好的虛擬交換器就可以了,按下新增去建立吧

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

(四)、虛擬機連網

到建立虛擬機或者編輯虛擬機的時候,可以看到網路介面卡的部分,選擇剛剛設定好的連接埠群組,就完成了。

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
網路介面卡可以在虛擬機開機的時候做更換,如果其他的連接埠群組都有設定好,並確認可以連出外網,也可以隨時更換。

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →
完成過後確認網路是否可以正常連線

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

Image Not Showing Possible Reasons
  • The image was uploaded to a note which you don't have access to
  • The note which the image was originally uploaded to has been deleted
Learn More →

結論:總結一下,VMware虛擬化網路環境建置主要該注意的點有三,分別是NIC vSwitch 連接埠群組,設定是由NIC一直往下做的,沒有1就沒有3,將中間概念連貫起來,其實會很簡單。

許多剛接觸虛擬化的工程師可能會對網路這塊比較不熟悉,特此製作本技術手冊,祝學習順利。