Connecting LXC to the host network
There are three main modes of connecting LXC containers to the host network:
Using a physical network interface on the host OS, which requires one physical interface on the host for each container
Using a virtual interface connected to the host software bridge using NAT
Sharing the same network namespace as the host, using the host network device in the container
The container configuration file provides the lxc.network.type
option as we saw earlier in Table 5.1. Let's take a look at the available parameters for that configuration option:
Parameter |
Description |
|
The container will share the host's network namespace. |
|
LXC will create only the loopback interface. |
|
A virtual interface is created on the host and connected to interface inside the container's network namespace. |
|
Creates a VLAN interface linked to the device specified with |
|
Allows a single... |