Blame man/nm-openvswitch.xml

Packit 5756e2
Packit 5756e2
Packit 5756e2
Packit 5756e2
"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
Packit 5756e2
Packit 5756e2
%entities;
Packit 5756e2
]>
Packit 5756e2
Packit 5756e2
Packit 5756e2
  nm-openvswitch(7) manual page
Packit 5756e2
Packit 5756e2
  Copyright 2017 Red Hat, Inc.
Packit 5756e2
Packit 5756e2
  Permission is granted to copy, distribute and/or modify this document
Packit 5756e2
  under the terms of the GNU Free Documentation License, Version 1.1
Packit 5756e2
  or any later version published by the Free Software Foundation;
Packit 5756e2
  with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
Packit 5756e2
  Texts. You may obtain a copy of the GNU Free Documentation License
Packit 5756e2
  from the Free Software Foundation by visiting their Web site or by
Packit 5756e2
  writing to:
Packit 5756e2
Packit 5756e2
  Free Software Foundation, Inc.,
Packit 5756e2
  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
Packit 5756e2
-->
Packit 5756e2
Packit 5756e2
<refentry id="nm-openvswitch">
Packit 5756e2
  <refentryinfo>
Packit 5756e2
    <title>nm-openvswitch</title>
Packit 5756e2
    <author>NetworkManager Open vSwitch support</author>
Packit 5756e2
  </refentryinfo>
Packit 5756e2
Packit 5756e2
  <refmeta>
Packit 5756e2
    <refentrytitle>nm-openvswitch</refentrytitle>
Packit 5756e2
    <manvolnum>7</manvolnum>
Packit 5756e2
    <refmiscinfo class="source">NetworkManager</refmiscinfo>
Packit 5756e2
    <refmiscinfo class="manual">Open vSwitch support overview</refmiscinfo>
Packit 5756e2
    <refmiscinfo class="version">&NM_VERSION;</refmiscinfo>
Packit 5756e2
  </refmeta>
Packit 5756e2
Packit 5756e2
  <refnamediv>
Packit 5756e2
    <refname>nm-openvswitch</refname>
Packit 5756e2
    <refpurpose>overview of NetworkManager Open vSwitch support</refpurpose>
Packit 5756e2
  </refnamediv>
Packit 5756e2
Packit 5756e2
  <refsect1>
Packit 5756e2
    <title>Overview</title>
Packit 5756e2
Packit 5756e2
    <para>NetworkManager includes basic Open vSwitch support, good enough
Packit 5756e2
    to be capable of setting up simple Open vSwitch configurations. It is not
Packit 5756e2
    extensive and does not expose all functionality of Open vSwitch provides.
Packit 5756e2
    For large or complicated deployments users are advised to use native tools
Packit 5756e2
    shipped with Open vSwitch. This document seeks to provide overview of
Packit 5756e2
    functionality currently provided by NetworkManager, its capabilities and
Packit 5756e2
    limitations.</para>
Packit 5756e2
Packit 5756e2
    <para>First and foremost: NetworkManager applies the configuration by
Packit 5756e2
    modifying the OVSDB directly. Its configuration model follows the OVSDB
Packit 5756e2
    database model closely and it does not provide the level of abstraction
Packit 5756e2
    <command>ovs-vsctl</command> provides.</para>
Packit 5756e2
Packit 5756e2
    <para>In practical terms it means the following:
Packit 5756e2
      <itemizedlist>
Packit 5756e2
        <listitem>
Packit 5756e2
          <para>NetworkManager only ever talks to a single OVSDB instance via an
Packit 5756e2
          UNIX domain socket.</para>
Packit 5756e2
        </listitem>
Packit 5756e2
        <listitem>
Packit 5756e2
          <para>The configuration is made up of Bridges, Ports and
Packit 5756e2
          Interfaces. Interfaces are always enslaved to Ports, and Ports are always
Packit 5756e2
          enslaved to Bridges.</para>
Packit 5756e2
        </listitem>
Packit 5756e2
        <listitem>
Packit 5756e2
          <para>NetworkManager only creates Bridges, Ports and Interfaces
Packit 5756e2
          you ask it to. Unlike <command>ovs-vsctl</command>, it doesn't create the
Packit 5756e2
          local interface nor its port automatically.</para>
Packit 5756e2
        </listitem>
Packit 5756e2
        <listitem>
Packit 5756e2
          <para>You can't enslave Interface directly to a Bridge. You
Packit 5756e2
          always need a Port, even if it has just one interface.</para>
Packit 5756e2
        </listitem>
Packit 5756e2
        <listitem>
Packit 5756e2
          <para>There are no VLANs. The VLAN tagging is enabled by setting a
Packit 5756e2
          <link linkend="nm-settings.property.ovs-port.tag">ovs-port.tag</link>
Packit 5756e2
          property on a Port.</para>
Packit 5756e2
        </listitem>
Packit 5756e2
        <listitem>
Packit 5756e2
          <para>There are no bonds either. The bonding is enabled by
Packit 5756e2
          enslaving multiple Interfaces to a Port and configured by setting
Packit 5756e2
          properties on a port.</para>
Packit 5756e2
        </listitem>
Packit 5756e2
      </itemizedlist>
Packit 5756e2
    </para>
Packit 5756e2
Packit 5756e2
    <refsect2>
Packit 5756e2
      <title>Bridges</title>
Packit 5756e2
Packit 5756e2
      <para>Bridges are represented by connections of ovs-bridge
Packit 5756e2
      <link linkend="nm-settings.property.connection.type">type</link>.
Packit 5756e2
      Due to the limitations of OVSDB, "empty" Bridges (with no Ports) can't exist.
Packit 5756e2
      NetworkManager inserts the records for Bridges into OVSDB when a Port is
Packit 5756e2
      enslaved.
Packit 5756e2
      </para>
Packit 5756e2
    </refsect2>
Packit 5756e2
Packit 5756e2
    <refsect2>
Packit 5756e2
      <title>Ports</title>
Packit 5756e2
Packit 5756e2
      <para>Ports are represented by connections of ovs-port
Packit 5756e2
      <link linkend="nm-settings.property.connection.type">type</link>.
Packit 5756e2
      Due to the limitations of OVSDB, "empty" Ports (with no Interfaces) can't
Packit 5756e2
      exist.  Ports can also be configured to do VLAN tagging or Bonding.
Packit 5756e2
      NetworkManager inserts the records for Ports into OVSDB when an Interface is
Packit 5756e2
      enslaved. Ports must be enslaved to a Bridge.</para>
Packit 5756e2
    </refsect2>
Packit 5756e2
Packit 5756e2
    <refsect2>
Packit 5756e2
      <title>Interfaces</title>
Packit 5756e2
Packit 5756e2
      <para>Interfaces are represented by a connections enslaved to a Port. The
Packit 5756e2
      system interfaces (that have a corresponding Linux link) have a respective
Packit 5756e2
      <link linkend="nm-settings.property.connection.type">connection.type</link>
Packit 5756e2
      of the link (e.g. "wired", "bond", "dummy", etc.). Other interfaces ("internal"
Packit 5756e2
      or "patch" interfaces) are of ovs-interface type. The OVSDB entries are
Packit 5756e2
      inserted upon enslavement to a Port.</para>
Packit 5756e2
    </refsect2>
Packit 5756e2
  </refsect1>
Packit 5756e2
Packit 5756e2
Packit 5756e2
  <refsect1>
Packit 5756e2
    <title>Examples</title>
Packit 5756e2
Packit 5756e2
    <example><title>Creating a Bridge with a single internal Interface</title>
Packit 5756e2
<screen><prompt>$ </prompt><userinput>nmcli conn add type ovs-bridge conn.interface bridge0</userinput>
Packit 5756e2
Connection 'ovs-bridge-bridge0' (d10fc64d-1d48-4394-a1b8-e1aea72f27d5) successfully added.
Packit 5756e2
<prompt>$ </prompt><userinput>nmcli conn add type ovs-port conn.interface port0 master bridge0</userinput>
Packit 5756e2
Connection 'ovs-port-port0' (5ae22bae-bba4-4815-9ade-7e635633e1f0) successfully added.
Packit 5756e2
<prompt>$ </prompt><userinput>nmcli conn add type ovs-interface slave-type ovs-port conn.interface iface0 \
Packit 5756e2
  master port0 ipv4.method manual ipv4.address 192.0.2.1/24</userinput>
Packit 5756e2
Connection 'ovs-interface-iface0' (3640d2a1-a2fd-4718-92f1-cffadb5b6cdc) successfully added.
Packit 5756e2
</screen>
Packit 5756e2
      <para>As said above, you need to create a Port even for a single interface.
Packit 5756e2
      Also, before you add the Interface, the Bridge and Port devices appear active,
Packit 5756e2
      but are not configured in OVSDB yet. You can inspect the results with
Packit 5756e2
      <command>ovs-vsctl show</command>.</para>
Packit 5756e2
    </example>
Packit 5756e2
Packit 5756e2
    <example><title>Adding a Linux interface to a Bridge</title>
Packit 5756e2
<screen><prompt>$ </prompt><userinput>nmcli conn add type ovs-port conn.interface port1 master bridge0</userinput>
Packit 5756e2
Connection 'ovs-port-port1' (67d041eb-8e7b-4458-afee-a1d07c9c4552) successfully added.
Packit 5756e2
<prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth0 master port1</userinput>
Packit 5756e2
Connection 'ovs-slave-eth0' (d459c45c-cf78-4c1c-b4b7-505e71379624) successfully added.
Packit 5756e2
</screen>
Packit 5756e2
<para>Again, you need a port.</para>
Packit 5756e2
    </example>
Packit 5756e2
Packit 5756e2
    <example><title>Creating a VLAN</title>
Packit 5756e2
<screen><prompt>$ </prompt><userinput>nmcli conn add type ovs-port conn.interface port2 master bridge0 ovs-port.tag 120</userinput>
Packit 5756e2
Connection 'ovs-port-port2' (3994c093-4ef7-4549-a4fd-627b831c3cb8) successfully added.
Packit 5756e2
<prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth1 master port2</userinput>
Packit 5756e2
Connection 'ovs-slave-eth1' (099be06e-71ad-484d-8d5a-fcadc5f207f5) successfully added.
Packit 5756e2
</screen>
Packit 5756e2
      <para>It's just a port with a tag.</para>
Packit 5756e2
    </example>
Packit 5756e2
Packit 5756e2
    <example><title>Creating a Bond</title>
Packit 5756e2
<screen><prompt>$ </prompt><userinput>nmcli conn add type ovs-port conn.interface bond0 master bridge0</userinput>
Packit 5756e2
Connection 'ovs-port-bond0' (d154ebf9-e999-4e1b-a084-a3de53d25d8a) successfully added.
Packit 5756e2
<prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth2 master bond0</userinput>
Packit 5756e2
Connection 'ovs-slave-eth2' (475ac1bf-30b2-4534-a877-27f33f58b082) successfully added.
Packit 5756e2
<prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth3 master bond0</userinput>
Packit 5756e2
Connection 'ovs-slave-eth3' (8dedeecb-ed12-482b-b77a-24a4fb835136) successfully added.
Packit 5756e2
</screen>
Packit 5756e2
      <para>It's just a Port with multiple interfaces. See nm-settings manual for
Packit 5756e2
      Bonding options you can use with "nmcli c add" or "nmcli c modify". You could
Packit 5756e2
      even set a VLAN tag on the same Port to do VLAN tagging and bonding at the same
Packit 5756e2
      time.</para>
Packit 5756e2
    </example>
Packit 5756e2
  </refsect1>
Packit 5756e2
Packit 5756e2
  <refsect1>
Packit 5756e2
    <title>Bugs</title>
Packit 5756e2
Packit 5756e2
    <itemizedlist>
Packit 5756e2
       <listitem>
Packit 5756e2
          <para>Not all Open vSwitch capabilities are supported.</para>
Packit 5756e2
       </listitem>
Packit 5756e2
       <listitem>
Packit 5756e2
          <para>Open vSwitch devices don't expose many useful properties on D-Bus.</para>
Packit 5756e2
       </listitem>
Packit 5756e2
    </itemizedlist>
Packit 5756e2
    <para>Probably many more.</para>
Packit 5756e2
  </refsect1>
Packit 5756e2
Packit 5756e2
  <refsect1>
Packit 5756e2
    <title>See Also</title>
Packit 5756e2
    <para>
Packit 5756e2
      <ulink url="https://www.rfc-editor.org/rfc/rfc7047.txt">RFC 7047: The Open vSwitch Database Management Protocol</ulink>,
Packit 5756e2
      <citerefentry><refentrytitle>ovs-vsctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
Packit 5756e2
      <citerefentry><refentrytitle>ovs-vswitchd.conf.db</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
Packit 5756e2
      <link linkend='nm-settings'><citerefentry><refentrytitle>nm-settings</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
Packit 5756e2
      <link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>
Packit 5756e2
    </para>
Packit 5756e2
  </refsect1>
Packit 5756e2
</refentry>