[Lxc-users] ovs-switch networking

Serge Hallyn serge.hallyn at canonical.com
Thu Dec 13 12:05:26 UTC 2012


Quoting Kalyana sundaram (kalyanceg at gmail.com):
> Could somebody let me know how to set up veth network on container using
> openv-switch. I read through few links on net which asked to run a script
> which has (http://people.canonical.com/~serge/user-data-lxc-ovs.sh)

To make sure this is clear, this script is meant to be run as a userdata
file to a ec2 or openstack node being brought up.

> ovs-vsctl add-port br0 \$5
> 
> what does $5 signifies?

It's the name of the interface, passed in as argument 5 to the
lxc.network.script= script.  (The \ is to avoid $ being escaped
by the shell as I'm catting into the script)

> Is it possible to use openvswitch without making the host interface
> entering promiscuous mode?

(It brings the host if into promiscuous mode?)

> What is the advantage of using openvswitch instead of bridge?

The fact that you can use a gre tunnel (as shown in the comment at the
bottom of that script) to connect containers on different lxc hosts,
regardless of the networking topology behind the hosts.

So for instance when I'm going to reproduce a bunch of distro bugs, I
have a script that uses juju to fire up n openstack nodes (on a cloud
over which I have no control, such as amazon's ec2).  These nodes
pre-populate lvm-backed containers.  When I want to create a new precise
container I run 'startcontainer precise' which will clone a new
container on the next lxc host node.  All the containers are linked with
a gre tunnel to each other (served by a dnsmasq running on the first
lxc node).

-serge




More information about the lxc-users mailing list