Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I see that there are a lot of new ease-of-use improvements to LXC in 12.04 & 12.10, and although I see some description to setting up bridged networking such that my containers have their own LAN IP, I have the sneaky feeling that maybe there's a "simpler" way in ubuntu 12.10 now?

I didn't quite grasp it from the ubuntu server docs. Could anyone help me know which path is best to follow here?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Creating a bridge is a pretty simple process.

A key points to be aware of:

  • Your NIC needs to be run in promiscuous mode for the bridge to work, promiscuous mode isn't supported on many wifi nic's, hence there's no way to make this work on many wifi NICs (check support for promiscuous mode if you need it).

Edit /etc/network/interfaces

Add:
# Bridge for LXC containers
auto br0
iface br0 inet dhcp
  bridge_ports eth0
  bridge_stp off
  bridge_fd 0
  bridge_maxwait 0

sudo service networking restart

Configure network in LXC config as:
lxc.network.type=veth
lxc.network.link=br0
lxc.network.flags=up
lxc.network.ipv4 = 10.0.2.215/24
lxc.network.name = eth0

lxc-start -n <CN>
share|improve this answer
    
Does running the NIC in promiscuous mode mean that the container can see access network traffic promiscuously? –  mc0e Dec 12 '13 at 8:03

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.