Translation(s): none
Please find alternative network setups for containers on the LXC mainpage.
In case of VLAN networking, here's an example setup that may be useful.
Assuming the host is on a regular private local network, and you place the guest inside the .123 VLAN, here's what /etc/network/interfaces may look like :
auto eth0
iface eth0 inet static
address 192.168.1.12
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1
iface eth0.123 inet manual
vlan-raw-device eth0
auto br0.123
iface br0.123 inet manual
bridge_ports eth0.123
bridge_fd 0
bridge_maxwait 0Then, you'd configure the LXC container/guest with something like :
lxc.utsname = guestvm lxc.network.type = veth lxc.network.flags = up lxc.network.link = br0.123 lxc.network.name = eth0 lxc.network.ipv4 = 192.168.2.1/24 lxc.network.veth.pair = vethvm1
where 192.168.2.x would be on the 123 VLAN.
Hope this helps.
To the guest, this will then be transparent : inside the guest, a single eth0 will be available, with 192.168.2.1/24 IP address (and no VLAN).
You'll probably need ebtables firewalling to control the traffic through the bridge.
