Virtualbox虛擬機網絡設置

Virtualbox提供了5種網絡模式


1. Not attached //有網卡但無連接
2. Network Address Translation (NAT) 網絡地址轉換
3. Bridged networking 橋接網絡
4. Internal networking 內部網絡
5.Host-only networking 主機網絡

1. Not attached

In this mode, VirtualBox reports to the guest that a network card is present, but that there is no connection -- as if no Ethernet cable was plugged into the card. This way it is possible to "pull" the virtual Ethernet cable and disrupt the connection, which can be useful to inform a guest operating system that no network connection is available and enforce a reconfiguration.

2. Network Address Translation (NAT)

If all you want is to browse the Web, download files and view e-mail inside the guest, then this default mode should be sufficient for you, and you can safely skip the rest of this section.
可以這樣理解:Vhost訪問網絡的所有數據都是由主機提供的,vhost並不真實存在於網絡中,主機與網絡中的任何機器都不能查看和訪問到Vhost的 存在。
虛擬機與主機關係:
只能單向訪問,虛擬機可以通過網絡訪問到主機,主機無法通過網絡訪問到虛擬機。
虛擬機與網絡中其他主機的關係:
只能單向訪問,虛擬機可以訪問到網絡中其他主機,其他主機不能通過網絡訪問到虛擬機。
虛擬機與虛擬機之間的關係:

3.Bridged networking 橋接網絡

This is for more advanced networking needs such as network simulations and running servers in a guest. When enabled, VirtualBox connects to one of your installed network cards and exchanges network packets directly, circumventing your host operating system's network stack.
可以這樣理解,它是通過主機網卡,架設了一條橋,直接連入到網絡中了。因此,它使得虛擬機能被分配到一個網絡中獨立的IP,所有網絡功能完全和在網絡中的真實機器一樣。

4. Internal networking 內部網絡

This can be used to create a different kind of software-based network which is visible to selected virtual machines, but not to applications running on the host or to the outside world.
虛擬機與外網完全斷開,只實現虛擬機於虛擬機之間的內部網絡模式。
虛擬機與主機關係:
不能相互訪問,彼此不屬於同一個網絡,無法相互訪問。
虛擬機與網絡中其他主機關係:
不能相互訪問,理由同上。
虛擬機與虛擬機關係:
可以相互訪問.

5.Host-only networking 主機網絡

This can be used to create a network containing the host and a set of virtual machines, without the need for the host's physical network interface. Instead, a virtual network interface (similar to a loopback interface) is created on the host, providing connectivity among virtual machines and the host.

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章