Host-Routed Mode
The implementations of host-routed mode for Containers and virtual machines have much in common but also show some differences. Therefore, we describe them in different sections.
Host-routed mode for Containers
By default, a newly created Container starts operating in the host-routed mode. In this mode, the Container is connected with the other Containers on the server and with the server itself using a special virtual network adapter called
venet0
. The picture below provides an example of the network structure when all Containers (
Container #1, Container #2, Container #3
) are functioning in the host-routed mode.
All Containers use the
venet0
virtual adapter as the default gateway to send and receive data to/from other networks (shown as the
PUBLIC NETWORK
in the picture above). The procedure of handling incoming and outgoing IP packets can be described as follows:
-
All IP packets from Containers come to the
venet0
adapter and are redirected through a public IP address of the server to the corresponding server on the public network.
-
All IP packets coming from external networks and destined for Container IP addresses reach the public IP address of the server first and, afterwards, are sent through
venet0
to the IP addresses of the corresponding Containers.
The
venet0
adapter is also used to exchange the traffic among Containers. All network traffic of a Container is isolated from that of the other Containers—that is, all Containers are protected from each other in the way that makes traffic snooping impossible.
Host-routed mode for virtual machines
By default, a new virtual machine is created with the network adapter that operates in the virtual network mode. To change the mode to host-routed, you can use the
pctl set
command or Parallels Management Console. In the host-routed mode, all virtual machines use special virtual adapters on the server to connect to each other, the server, and computers on external networks. The picture below demonstrates an example network structure when all virtual machines (
VM #1
,
VM #2
, and
VM #3
) are operating in the host-routed mode.
In this network:
-
All virtual machines use special networks adapters (
Virtual Adapter 1
,
Virtual Adapter 2
, and
Virtual Adapter 3
) as the default gateways to send and receive data to/from other networks.
-
All IP packets from virtual machines come to the corresponding adapters and are redirected through a public IP address of the server to the destination computer.
-
All IP packets coming from external networks and destined for virtual machines reach the public IP address of the first and, afterwards, are sent through virtual adapters to the IP addresses of the destination virtual machine.
Virtual adapters are also used to exchange the traffic among virtual machines. All network traffic of a virtual machine is isolated from that of the other virtual machines—that is, all virtual machines are protected from each other in the way that makes traffic snooping impossible.
|