OpenVswitch - how do I assign ip address to ovs bridge?

Hi everybody,
I am experiencing a strange problem: I need to move my XEN VMs to new hardware with OpenSuse 13.1 and I want to use openvswitch.

The OpenVswitch installation itself was fine and the concept is easy to understand, but when I created a bridge using ovs-vsctl, I found I can not assign ip address, so that it would stay permanent.

Here is my ovs configuration:
ovs-vsctl show
Bridge br-ex
Port “enp0s25”
Interface “enp0s25”
Port “vif0”
Interface “vif0”
Port br-ex
Interface br-ex
type: internal
ovs_version: “1.11.0”

I tried both ways: to assign ip address in /etc/sysconfig/network/ifcfg-br-ex
The other way is to try and get IP address from dhcp, but no success. Here is my current ifcfg-br-ex file:
BRIDGE_PORTS= ‘br-ex enp0s25’

But this does not work, after reboot I do not have correct IP.

But if I type from command line:

ifdown br-ex; ifup br-ex

After this I have correct IP address from dhcp and everything is fine. After this XEN can start my virtual machines and everything works.

Looks like I am missing something small but important?


Although you <may> have a specific issue, at the moment troubleshooting may be clouded by a <more general> issue I’ve been looking at for a few months now.

Although it has happened less often recently, from time to time my openSUSE Guests don’t pick up DHCP addresses reliably. At first I was doing “ifdown/ifup” as you described, but currently I just restart my network service which does the same thing (with a single command)

systemctl restart network

So, I don’t know if you have something specific to your setup or more general like what I describe which is not specific to using OpenVswitch.
And, this seems to be not specific to any virtualization technology, I’m getting this in KVM, VirtualBox and VMware Workstation.


Thanks for the answer. I am now focusing on setting permanent IP to my bridges and this kinda works.