[ovs-discuss] Seeking help on bringing up ovs defined network at boot under Ubuntu bionic

Guru Shetty guru at ovn.org
Thu Jun 28 20:41:43 UTC 2018


On 28 June 2018 at 11:58, Stephen V. Nesbitt <snesbitt at aussieswithtails.com>
wrote:

> Noob alert! I am looking for a recipe that will configure an OVS defined
> network at boot on Ubuntu bionic.
>
> My ovs network comprises the following:
>
> * switch0
>
> * enp3s0 - physical NIC defined as a port tagged with 100 and marked as
> vlan_mode=native-untagged
>
> * vnet100 - port tagged with 100 and set with an internal interface
>
> * vlan100 - a fake bridge (add-br vlan100 switch0 100) which gets the ip
> address
>
> As far as I can tell this is working - my host system is attached to the
> 192.168.0.1/26 and I can give containers access to this network using
> vlan100.
>
> What I don't know how to do is setup an Ubuntu bionic system to bring this
> network up at boot. I've looked at the following options:
>
> * Netplan - doesn't look like it will support this.
>
> * Systemd-networkd - maybe, but it is unclear how.
>

Read this after you read my comment further down below.

We are exploring how to integrate better with systemd. We haven't
completely thought it through. My initial thoughts are that we will likely
have OVS startup scripts call a hook which will execute a bunch of user
defined ovs-vsctl calls. When the device appears, systemd should
automatically setup DNS/DHCP for the interface based on entry
in /etc/systemd/network/ifcfg-*


>
> * switch to ifupdown and define an interfaces file using allow-ovs stanzas.
>
> I've spent most of my time looking at ifupdown. But simply can't get it to
> work. Specifically my interfaces file is apparently ignored. I *think* this
> is caused because ifup needs to be called with the --allow=ovs option. But
> I have no idea how to enable this.
>

The OVS startup script here will call ifup --allow=ovs option after it has
started OVS daemons. See here:

https://github.com/openvswitch/ovs/blob/master/debian/openvswitch-switch.init#L40

But you likely has installed OVS with "apt-get install" from Ubuntu
packages. Ubuntu guys have added systemd startup scripts (not provided by
OVS repo) and that skips the init.d script.

The above only works for allow-ovs stanzas in /etc/network/interfaces and
not in  /etc/systemd/network. I am not very familiar with your system.


> Other questions include whether I need to add an
> openvswitch-nonetwork.system file to ensure the openvswitch is enabled
> prior to bringing up the network and whether the auto clause is needed (and
> where) with the interface definition.
>
> If someone could provide - or point me to - a recipe I'd be very
> appreciative.
>
> Thx in advance,
>
>
> -steve
>
> _______________________________________________
> discuss mailing list
> discuss at openvswitch.org
> https://mail.openvswitch.org/mailman/listinfo/ovs-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.openvswitch.org/pipermail/ovs-discuss/attachments/20180628/ea4c7823/attachment.html>


More information about the discuss mailing list