# Open vSwitch support in conf.d/net

## yenn

Hi,

I recently tried openvswitch instead of "classic" bridge (bridge-utils) on server. According to http://wiki.gentoo.org/wiki/QEMU_with_Open_vSwitch_network#OpenRC, init script brings switch up, but I'm not sure what is the best way to set IP address of that switch. Can conf.d/net handle Open vSwitch or should I set IP address in init script?

----------

## KaZeR

That doc has a few mistakes. First of all, you don't need the ovs-controller service to run, it's merely a test service.

You can definitely have openRC setup your OVS, without having to add another specific init script :

```

config_enp5s0f0="0.0.0.0"

config_brex="172.16.128.31/24"

routes_brex="default via 172.16.128.1"

dns_servers_brex="8.8.8.8"

```

My OVS bridge has been defined that way :

```

# ovs-vsctl add-br brex

# ovs-vsctl add-port brex enp5s0f0

```

There is two gotchas currently:

1/ you cannot use dashes in the name of your bridge, because of the conf.d/net file doesn't support it (if someone knows how to circumvent this...)

2/ you need to have your net.enp5s0f0, ovsdb-server and ovs-vswitchd services all started at boot

That's all. Also ensure that the openvswitch module is loaded at boot, of course.

----------

