0

I'm trying to get lxc containers running with a bridged network connection so the container get ip addresses like the host does from a dhcp server.

I red several tutorials, but I couldn't find one that explicitly mentions 15.04. Mostly they were about ubuntu 12. So maybe that's the problem somehow?

Here is what I tried:

  • install ubuntu 15.04 server
  • sudo apt-get install lxc lxctl lxc-templates
  • install lxc webpanel as root: wget http://lxc-webpanel.github.io/tools/install.sh -O - | bash

/etc/network/interfaces change to the following:

auto lo iface lo inet loopback auto eth0 iface eth0 inet manual auto br0 iface br0 inet dhcp bridge_ports eth0 bridge_stp off bridge_fd 0 bridge_maxwait 0 
  • After rebooting I have lxcbr0 and br0 in ifconfig
  • create a lxc container in the webpanel with ubuntu in it
  • in the webpanel, configure the new container to use br0 instead of lxcbr0
  • start the container

=> the new container's MAC is not seen in the dhcp servers lease list as well logging in to the container with lxc-console and running ifconfig shows that it doesn't get an IP address.

Btw. If I keep lxcbr0 the container gets an IP address, but that is masqueraded and not accessible from the outside. But that works.

What's the thing I'm missing here? Maybe some security issue?

[edit]

brctl show shows this:

bridge name bridge id STP enabled interfaces br0 8000.000c29e793a1 no eth0 vethSCX4N3 lxcbr0 8000.000000000000 no 

Also, the ubuntu 15.04 server is running on an esxi 6.0. [/edit]

3
  • 1
    Could you show what you get by brctl show while your container is running? And is your Ubuntu 15.04 server on another virtualization host like VMware? Commented Aug 4, 2015 at 10:59
  • I added the answers to your questions to my question. Commented Aug 4, 2015 at 11:18
  • 1
    On ESXi you need to allow at least "MAC address changes" and "Forged transmits" for guests to send/receive packets with MAC other than it's assigned. See VMware docs for details. Commented Aug 4, 2015 at 11:50

1 Answer 1

0

yaegashi's VMWare comment pushed me in the right direction. I had to enable promiscuous mode on the Virtual Machine Port Group on the esxi host. Otherwise, the virtual switch won't allow traffic through the port with a mac address different from the the virtual adapter's mac address.

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.