[ovs-discuss] Exporting and importing configurations

Gurucharan Shetty shettyg at nicira.com
Fri Apr 11 17:00:10 UTC 2014


On Fri, Apr 11, 2014 at 9:34 AM, Brian Candler <b.candler at pobox.com> wrote:
> On 11/04/2014 16:04, Gurucharan Shetty wrote:
>>
>>   if it is a basic
>> configuration, you may want to look at
>> debian/openvswitch-switch.README.Debian in the git repo that explains
>> how to configure Open vSwitch with 'interfaces'. That way, you can
>> just copy the interfaces file to a different machine.
>
> Before reading this, what I had done was just the following:
>
> auto br-wan
> iface br-wan inet dhcp
>
> auto br-lan
> iface br-lan inet static
> address 192.168.56.13
> netmask 255.255.255.0
>
> auto eth0
> iface eth0 inet manual
>
> auto eth1
> iface eth1 inet manual
>
> Given that openvswitch was already stored a configuration with bridge br-wan
> containing port eth0, and bridge br-lan containing port eth1, it appears to
> work fine. When the machine comes up, openvswitch starts, the bridge
> interfaces are created, the ports are brought up, and the bridges get IP
> addresses.
Open vSwitch starts a little later than networking, I think. I would expect
a race condition where the bridges are not yet created and there is an
attempt to add an IP address.

I haven't looked at 14.04 to see if such a race condition cannot
exist. If such a race condition does not exist, it may be a nice
strategy.


>
> Is that a reasonable / supported way of working?
>
> Contrasting this to how debian/openvswitch-switch.README.Debian says to do
> it, it seems to be very complicated. The "bridge with one port" example is:
>
> allow-ovs br0
> iface br0 inet dhcp
>     ovs_type OVSBridge
>     ovs_ports eth0
>
> allow-br0 eth0
> iface eth0 inet manual
>     ovs_bridge br0
>     ovs_type OVSPort
>
> That is: you have to say that the bridge br0 exists and contains port eth0;
> but you must also say that the port eth0 exists and it is a member of br0?
It is not saying something "exists". It is asking ovs-vsctl to create
"br0" with port "eth0".

In other mail, when I said that the controller can get confused about
UUIDs, it is not just about system-id. Every database record has a
UUID.

>
> You don't need to do that with bridge-utils. You'd simply write:
>
> auto eth0
> iface eth0 inet manual
>
> auto br-wan
> iface br-wan inet dhcp
>     bridge_ports eth0
In this case, someone would already need to create the bridges. You
are only using this to assign IP addresses, right?



>
>
> The other thing which concerns me is what it says at the top of that README
> file:
>
> * To use the Linux kernel-based switch implementation, you will need
>   to build and install the Open vSwitch kernel module.  To do so, install
>   the openvswitch-datapath-source package, then follow the instructions
>   given in /usr/share/doc/openvswitch-datapath-source/README.Debian

When the documentation was written, most likely Open vSwitch was not
part of Linux kernel by default.
The advantage of the dkms module is that you can upgrade your kernel
module in case of bugs. i.e., Open vSwitch is released with different
versions. Each version would have new features and bug fixes.

>
> I haven't installed openvswitch-datapath-{source|dkms} package, and it
> appears to work fine. It has loaded the openvswitch modules which came with
> the kernel.
It is fine to use the openvswitch module that comes with the kernel.

>
> So is that instruction now incorrect? Can I be sure that I'm using the
> kernel datapath and not the userland data path?
lsmod | grep openvswitch

If it exists, you should be fine.
>
> Regards,
>
> Brian.
>



More information about the discuss mailing list