Virtualbox
NAT Network
Создать новую NAT Network можно следующим образом
File → Preferences → Network → +
Чтобы попасть в Preferences нажмите CTRL + G

Перейдите в Network

Нажмите на плюс справа. Virtualbox создаст сеть с именем NatNetwork

Нажимая на плюс можно создать другие сети. Они будут называться NatNetwork1, NatNetwork2 …

Добавить Adapter
Чтобы добавить адаптер к существующей виртуальной машине сперва нужно выполнить Power Off.
Затем откройте Settings → Network → Выберите адаптер, например Adapter 3 → Поставьте галочку в боксе Enable Network Adapter

Теперь можно настроить Adapter

Экспорт и импорт виртуальных машин
Чтобы перенести виртуальную машину с одного компьютера на другой достаточно зайти в File → Export Appliance… (Ctrl+E) сохранить .ova файл, перенести его на другой компьютер, выполнить File → Import Appliance… (Ctrl+E) и выбрать нужный .ova файл.
Типы сетевых подключений
Каждый сетевой адаптер может быть сконфигурирован для работы в одном из следующих режимов:
- Not attached: In this mode, Oracle VM VirtualBox reports to the guest that a network card is present, but that there is no connection. This is as if no Ethernet cable was plugged into the card. Using this mode, 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.
-
Network Address Translation (NAT): Если всё что вам нужно - сёрфить в Web, загружать файлы и читать электронную почту, то этого
режима, стоящего по умолчанию должно хватить и следущую часть статьи вы можете пропустить.
Существуют некоторые ограничения при использовании Windows file sharing. ( NAT Limitations ) - NAT Network: это внутренняя сеть которая разрешает внешние подключения. ( Network Address Translation Service )
-
Bridged networking: Служить для более сложных целей, таких как network simulations и запуск серверов в гостевой ОС
В этом режиме Oracle VM VirtualBox соединяется с одной из сетевых карт и обменивается пакетами напрямую, в обход сетевого стека домашней ОС. - 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.
- 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.
-
Generic networking: Rarely used modes which share the same generic network interface, by allowing the user to select a driver which can be included with Oracle VM VirtualBox or be distributed in an extension pack.
Доступны следующие подрежимы:- UDP Tunnel: Used to interconnect virtual machines running on different hosts directly, easily, and transparently, over an existing network infrastructure.
- VDE (Virtual Distributed Ethernet) networking: Used to connect to a Virtual Distributed Ethernet switch on a Linux or a FreeBSD host. At the moment this option requires compilation of Oracle VM VirtualBox from sources, as the Oracle packages do not include it.
В таблице вы можете найти обзор самых важных сетевых режимов
Mode | VM→Host | VM←Host | VM1↔VM2 | VM→Net/LAN | VM←Net/LAN |
---|---|---|---|---|---|
Host-only | + | + | + | – | – |
Internal | – | – | + | – | – |
Bridged | + | + | + | + | + |
NAT | + | Port forward | – | + | Port forward |
NATservice | + | Port forward | + | + | Port forward |