[Lxc-users] Problem with bridges and virtual interfaces in containers

Ferenc Holzhauser ferenc.holzhauser at gmail.com
Mon Aug 26 12:47:10 UTC 2013


Hi Jelena,

I'm using similar setup with 4 bridges (actually 5 including the lxcbr0
that lxc creates for DHCP/NAT) on Ubuntu with no problems. Could it be that
you are accidentally reusing MAC in the lxc guest config of the new guests?

Example pieces of my configuration below. I hope it helps.

host /etc/network/interfaces
...
auto br2
iface br2 inet static
  address 10.2.0.1
  netmask 255.255.255.0
  network 10.2.0.0
  pre-up brctl addbr br2
  post-down brctl delbr br2
...
guest config
...
lxc.network.type = veth
lxc.network.link = br2
lxc.network.name = eth2
lxc.network.flags = up
...
guest /etc/network/interfaces
...
auto eth2
iface eth2 inet static
  address 10.2.0.10
  netmask 255.255.255.0
  network 10.2.0.0
...
another guest
...
auto eth2
iface eth2 inet static
  address 10.2.0.11
  netmask 255.255.255.0
  network 10.2.0.0
...


BR,
Ferenc


On 26 August 2013 13:24, Jelena Seovic <jelena.seovic at gmail.com> wrote:

> Hi all,
>
> I have problem with connecting virtual interfaces in containers on
> bridges. I wont to create for example two virtual interfaces in container
> and each of them to connect to different bridge. On that way I wont connect
> one container with other containers and to ping one form another (like
> creating small network container1-bridge1-container2-bridge2-container3...).
>
> First I started with two containers (container1-bridge-container2). I have
> created one virtual interfaces in each container in config file
> (/var/lib/lxc/container1/config and /var/lib/lxc/container2/config). Beside
> that i created bridge and i could ping one interface from another.
>
> Then I wonted to connect one more container
> (container1-bridge1-container2-bridge2-container3). Created one more
> interface in config file in container2, and one in container3. Also I
> created one more bridge. But I couldn't ping interface in container2 from
> container3 and vice versa. Still I was able to ping container1 from
> container2.
>
> I checked every config file several times, bridges too but i couldn't
> find problem.
> I'm sure that I am making mistake somewhere, but I don't know where. Can
> anyone help me?
>
> Regards,
> Jelena
>
>
> ------------------------------------------------------------------------------
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> _______________________________________________
> Lxc-users mailing list
> Lxc-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lxc-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.linuxcontainers.org/pipermail/lxc-users/attachments/20130826/eca7a4bc/attachment.html>


More information about the lxc-users mailing list