Debian Codegraph @

man/nm-openvswitch.xml

raw
1 <?xml version='1.0'?>
2 <?xml-stylesheet type="text/xsl" href="http://docbook.sourceforge.net/release/xsl/current/xhtml/docbook.xsl"?>
3 <!DOCTYPE refentry PUBLIC "-//OASIS//DTD DocBook XML V4.5//EN"
4 "http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd" [
5 <!ENTITY % entities SYSTEM "common.ent" >
6 %entities;
7 ]>
8
9 <!--
10 SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
11
12 nm-openvswitch(7) manual page
13
14 Copyright 2017 Red Hat, Inc.
15 -->
16
17 <refentry id="nm-openvswitch">
18 <refentryinfo>
19 <title>nm-openvswitch</title>
20 <author>NetworkManager Open vSwitch support</author>
21 </refentryinfo>
22
23 <refmeta>
24 <refentrytitle>nm-openvswitch</refentrytitle>
25 <manvolnum>7</manvolnum>
26 <refmiscinfo class="source">NetworkManager</refmiscinfo>
27 <refmiscinfo class="manual">Open vSwitch support overview</refmiscinfo>
28 <refmiscinfo class="version">&NM_VERSION;</refmiscinfo>
29 </refmeta>
30
31 <refnamediv>
32 <refname>nm-openvswitch</refname>
33 <refpurpose>overview of NetworkManager Open vSwitch support</refpurpose>
34 </refnamediv>
35
36 <refsect1>
37 <title>Overview</title>
38
39 <para>NetworkManager includes basic Open vSwitch support, good enough
40 to be capable of setting up simple Open vSwitch configurations. It is not
41 extensive and does not expose all functionality of Open vSwitch provides.
42 For large or complicated deployments users are advised to use native tools
43 shipped with Open vSwitch. This document seeks to provide overview of
44 functionality currently provided by NetworkManager, its capabilities and
45 limitations.</para>
46
47 <para>First and foremost: NetworkManager applies the configuration by
48 modifying the OVSDB directly. Its configuration model follows the OVSDB
49 database model closely and it does not provide the level of abstraction
50 <command>ovs-vsctl</command> provides.</para>
51
52 <para>In practical terms it means the following:
53 <itemizedlist>
54 <listitem>
55 <para>NetworkManager only ever talks to a single OVSDB instance via an
56 UNIX domain socket.</para>
57 </listitem>
58 <listitem>
59 <para>The configuration is made up of Bridges, Ports and
60 Interfaces. Interfaces are always attached to Ports, and Ports are always
61 attached to Bridges.</para>
62 </listitem>
63 <listitem>
64 <para>NetworkManager only creates Bridges, Ports and Interfaces
65 you ask it to. Unlike <command>ovs-vsctl</command>, it doesn't create the
66 local interface nor its port automatically.</para>
67 </listitem>
68 <listitem>
69 <para>You can't attach Interface directly to a Bridge. You
70 always need a Port, even if it has just one interface.</para>
71 </listitem>
72 <listitem>
73 <para>There are no VLANs. The VLAN tagging is enabled by setting a
74 <link linkend="nm-settings.property.ovs-port.tag">ovs-port.tag</link>
75 property on a Port.</para>
76 </listitem>
77 <listitem>
78 <para>There are no bonds either. The bonding is enabled by
79 enslaving multiple Interfaces to a Port and configured by setting
80 properties on a port.</para>
81 </listitem>
82 </itemizedlist>
83 </para>
84
85 <refsect2>
86 <title>Bridges</title>
87
88 <para>Bridges are represented by connections of ovs-bridge
89 <link linkend="nm-settings.property.connection.type">type</link>.
90 Due to the limitations of OVSDB, "empty" Bridges (with no Ports) can't exist.
91 NetworkManager inserts the records for Bridges into OVSDB when a Port is
92 attached.
93 </para>
94
95 <para>Known limitation: when the last NetworkManager's owned port is removed,
96 the bridge is removed too, even if there are other externally attached ports.
97 </para>
98 </refsect2>
99
100 <refsect2>
101 <title>Ports</title>
102
103 <para>Ports are represented by connections of ovs-port
104 <link linkend="nm-settings.property.connection.type">type</link>.
105 Due to the limitations of OVSDB, "empty" Ports (with no Interfaces) can't
106 exist. Ports can also be configured to do VLAN tagging or Bonding.
107 NetworkManager inserts the records for Ports into OVSDB when an Interface is
108 attached. Ports must be attached to a Bridge.</para>
109
110 <para>Known limitation: when the last NetworkManager's owned interface is removed,
111 the port is removed too, even if there are other externally attached interfaces.
112 </para>
113 </refsect2>
114
115 <refsect2>
116 <title>Interfaces</title>
117
118 <para>Interfaces are represented by a connections attached to a Port. The
119 system interfaces (that have a corresponding Linux link) have a respective
120 <link linkend="nm-settings.property.connection.type">connection.type</link>
121 of the link (e.g. "wired", "bond", "dummy", etc.). Other interfaces ("internal"
122 or "patch" interfaces) are of ovs-interface type. The OVSDB entries are
123 inserted upon attachment to a Port.</para>
124 </refsect2>
125 </refsect1>
126
127
128 <refsect1>
129 <title>Examples</title>
130
131 <example><title>Creating a Bridge with a single internal Interface</title>
132 <screen><prompt>$ </prompt><userinput>nmcli conn add type ovs-bridge conn.interface bridge0</userinput>
133 Connection 'ovs-bridge-bridge0' (d10fc64d-1d48-4394-a1b8-e1aea72f27d5) successfully added.
134 <prompt>$ </prompt><userinput>nmcli conn add type ovs-port conn.interface port0 controller bridge0</userinput>
135 Connection 'ovs-port-port0' (5ae22bae-bba4-4815-9ade-7e635633e1f0) successfully added.
136 <prompt>$ </prompt><userinput>nmcli conn add type ovs-interface port-type ovs-port conn.interface iface0 \
137 controller port0 ipv4.method manual ipv4.address 192.0.2.1/24</userinput>
138 Connection 'ovs-interface-iface0' (3640d2a1-a2fd-4718-92f1-cffadb5b6cdc) successfully added.
139 </screen>
140 <para>As said above, you need to create a Port even for a single interface.
141 Also, before you add the Interface, the Bridge and Port devices appear active,
142 but are not configured in OVSDB yet. You can inspect the results with
143 <command>ovs-vsctl show</command>.</para>
144 </example>
145
146 <example><title>Adding a Linux interface to a Bridge</title>
147 <screen><prompt>$ </prompt><userinput>nmcli conn add type ovs-port conn.interface port1 controller bridge0</userinput>
148 Connection 'ovs-port-port1' (67d041eb-8e7b-4458-afee-a1d07c9c4552) successfully added.
149 <prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth0 controller port1</userinput>
150 Connection 'ovs-slave-eth0' (d459c45c-cf78-4c1c-b4b7-505e71379624) successfully added.
151 </screen>
152 <para>Again, you need a port.</para>
153 </example>
154
155 <example><title>Creating a VLAN</title>
156 <screen><prompt>$ </prompt><userinput>nmcli conn add type ovs-port conn.interface port2 controller bridge0 ovs-port.tag 120</userinput>
157 Connection 'ovs-port-port2' (3994c093-4ef7-4549-a4fd-627b831c3cb8) successfully added.
158 <prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth1 controller port2</userinput>
159 Connection 'ovs-slave-eth1' (099be06e-71ad-484d-8d5a-fcadc5f207f5) successfully added.
160 </screen>
161 <para>It's just a port with a tag.</para>
162 </example>
163
164 <example><title>Creating a Bond</title>
165 <screen><prompt>$ </prompt><userinput>nmcli conn add type ovs-port conn.interface bond0 controller bridge0</userinput>
166 Connection 'ovs-port-bond0' (d154ebf9-e999-4e1b-a084-a3de53d25d8a) successfully added.
167 <prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth2 controller bond0</userinput>
168 Connection 'ovs-slave-eth2' (475ac1bf-30b2-4534-a877-27f33f58b082) successfully added.
169 <prompt>$ </prompt><userinput>nmcli conn add type ethernet conn.interface eth3 controller bond0</userinput>
170 Connection 'ovs-slave-eth3' (8dedeecb-ed12-482b-b77a-24a4fb835136) successfully added.
171 </screen>
172 <para>It's just a Port with multiple interfaces. See nm-settings-nmcli manual for
173 Bonding options you can use with "nmcli c add" or "nmcli c modify". You could
174 even set a VLAN tag on the same Port to do VLAN tagging and bonding at the same
175 time.</para>
176 </example>
177 </refsect1>
178
179 <refsect1>
180 <title>Bugs</title>
181
182 <itemizedlist>
183 <listitem>
184 <para>Not all Open vSwitch capabilities are supported.</para>
185 </listitem>
186 <listitem>
187 <para>Open vSwitch devices don't expose many useful properties on D-Bus.</para>
188 </listitem>
189 </itemizedlist>
190 <para>Probably many more.</para>
191 </refsect1>
192
193 <refsect1>
194 <title>See Also</title>
195 <para>
196 <ulink url="https://www.rfc-editor.org/rfc/rfc7047.txt">RFC 7047: The Open vSwitch Database Management Protocol</ulink>,
197 <citerefentry><refentrytitle>ovs-vsctl</refentrytitle><manvolnum>8</manvolnum></citerefentry>,
198 <citerefentry><refentrytitle>ovs-vswitchd.conf.db</refentrytitle><manvolnum>5</manvolnum></citerefentry>,
199 <link linkend='nm-settings-nmcli'><citerefentry><refentrytitle>nm-settings-nmcli</refentrytitle><manvolnum>5</manvolnum></citerefentry></link>,
200 <link linkend='nmcli'><citerefentry><refentrytitle>nmcli</refentrytitle><manvolnum>1</manvolnum></citerefentry></link>
201 </para>
202 </refsect1>
203 </refentry>