Network mode --NAT mode under Linux, bridge mode, host mode

linux virtual network machine has three modes, namely the Bridged (bridge mode), the NAT (network address translation mode), Host-only (host mode).

1, NAT (network address translation mode)
NAT mode, so that the virtual system by means of NAT functionality to access the public network via a network host is located. In this mode, the host becomes dual card host simultaneously involved in a host of existing LAN and the new virtual local area network, but due to the incorporation of a virtual NAT server, so that the virtual machines within the virtual local area network when an external access is the use of It is the IP address of the host, so that from the external network point of view, can only see the host, can not see the new virtual LAN.

In this case the virtual machine access to the Internet can ping a host, but the host ping through virtual machines.

2, Bridged (bridge mode)
bridge mode, virtual LAN system is like a stand-alone host, it can access any machine within the network, you need to manually configure the IP address, subnet mask of the virtual system, but also to the host machine and the same network segment, so virtual machines and host systems to communicate the relationship between virtual system and host machine, just connect two computers on the same switch. Technically understood from the network corresponding to the front end of the host plus provided a virtual switch, the switch then share the host and all virtual machines.

Hosts and virtual machines can communicate with each other, the virtual machine may in this case on the external network.

3, Host-only (host mode)
Host-only mode, in this mode all the virtual machines on the host can communicate with each other, but the real network and the virtual machine is isolated from.

In this mode, a local area network built by the host and all virtual machines constituted, but the LAN and the host itself which is independent of the existing LAN, if not extra route setting, both local area network inter do not communicate, so the new local area network can be considered as belonging to a separate private network is currently the host of its members for the current host and all associated virtual machines.

Technically equivalent from the network adds a virtual network adapter for the host, allowing the host to become a dual-NIC host (host virtual network adapter card +). While the back-end host plus set up a virtual switch, let the host and all the virtual institution to another virtual LAN. Since includes dual card, the host can simultaneously participate in two local area networks (LAN + conventional host new virtual local area network), but not the two LAN communication by default.

Guess you like

Origin blog.csdn.net/qq125281823/article/details/87163810